commit
stringlengths 40
40
| old_file
stringlengths 4
264
| new_file
stringlengths 4
264
| old_contents
stringlengths 0
3.26k
| new_contents
stringlengths 1
4.43k
| subject
stringlengths 15
624
| message
stringlengths 15
4.7k
| lang
stringclasses 3
values | license
stringclasses 13
values | repos
stringlengths 5
91.5k
|
---|---|---|---|---|---|---|---|---|---|
8a975088008ab33e6cb3dc42567cb1ca195563fa | packs/dimensiondata/actions/create_pool_member.py | packs/dimensiondata/actions/create_pool_member.py | from lib.actions import BaseAction
__all__ = [
'CreatePoolMemberAction'
]
class CreatePoolMemberAction(BaseAction):
api_type = 'loadbalancer'
def run(self, region, pool_id, node_id, port):
driver = self._get_lb_driver(region)
pool = driver.ex_get_pool(pool_id)
node = driver.ex.get_node(node_id)
member = driver.ex_create_pool_member(pool, node, port)
return self.resultsets.formatter(member)
| from lib.actions import BaseAction
__all__ = [
'CreatePoolMemberAction'
]
class CreatePoolMemberAction(BaseAction):
api_type = 'loadbalancer'
def run(self, region, pool_id, node_id, port):
driver = self._get_lb_driver(region)
pool = driver.ex_get_pool(pool_id)
node = driver.ex_get_node(node_id)
member = driver.ex_create_pool_member(pool, node, port)
return self.resultsets.formatter(member)
| Fix add pool member code | Fix add pool member code
| Python | apache-2.0 | armab/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,pidah/st2contrib,StackStorm/st2contrib,armab/st2contrib,tonybaloney/st2contrib,StackStorm/st2contrib,pidah/st2contrib,pearsontechnology/st2contrib,pidah/st2contrib,pearsontechnology/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,armab/st2contrib,StackStorm/st2contrib |
760506e88d22d86be818017fb6075abe7af2a068 | dactyl.py | dactyl.py | from slackbot.bot import respond_to
from slackbot.bot import listen_to
import re
import urllib
| from slackbot.bot import respond_to
from slackbot.bot import listen_to
import re
import urllib
def url_validator(url):
try:
code = urllib.urlopen(url).getcode()
if code == 200:
return True
except:
return False
def test_url(message, url):
if url_validator(url[1:len(url)-1]):
message.reply('VALID URL')
else:
message.reply('NOT VALID URL')
| Add url_validator function and respond aciton to test url | Add url_validator function and respond aciton to test url
| Python | mit | KrzysztofSendor/dactyl |
01b67c00b6ab1eea98da9b54737f051a01a726fb | auslib/migrate/versions/009_add_rule_alias.py | auslib/migrate/versions/009_add_rule_alias.py | from sqlalchemy import Column, String, MetaData, Table
def upgrade(migrate_engine):
metadata = MetaData(bind=migrate_engine)
def add_alias(table):
alias = Column('alias', String(50))
alias.create(table)
add_alias(Table('rules', metadata, autoload=True))
add_alias(Table('rules_history', metadata, autoload=True))
def downgrade(migrate_engine):
metadata = MetaData(bind=migrate_engine)
Table('rules', metadata, autoload=True).c.alias.drop()
Table('rules_history', metadata, autoload=True).c.alias.drop()
| from sqlalchemy import Column, String, MetaData, Table
def upgrade(migrate_engine):
metadata = MetaData(bind=migrate_engine)
def add_alias(table):
alias = Column('alias', String(50), unique=True)
alias.create(table)
add_alias(Table('rules', metadata, autoload=True))
add_alias(Table('rules_history', metadata, autoload=True))
def downgrade(migrate_engine):
metadata = MetaData(bind=migrate_engine)
Table('rules', metadata, autoload=True).c.alias.drop()
Table('rules_history', metadata, autoload=True).c.alias.drop()
| Create alias column as unique. | Create alias column as unique.
| Python | mpl-2.0 | nurav/balrog,mozbhearsum/balrog,tieu/balrog,mozbhearsum/balrog,aksareen/balrog,aksareen/balrog,aksareen/balrog,mozbhearsum/balrog,tieu/balrog,nurav/balrog,testbhearsum/balrog,mozbhearsum/balrog,nurav/balrog,testbhearsum/balrog,aksareen/balrog,testbhearsum/balrog,tieu/balrog,nurav/balrog,testbhearsum/balrog,tieu/balrog |
1b8efb09ac512622ea3541d950ffc67b0a183178 | survey/signals.py | survey/signals.py | import django.dispatch
survey_completed = django.dispatch.Signal(providing_args=["instance", "data"])
| import django.dispatch
# providing_args=["instance", "data"]
survey_completed = django.dispatch.Signal()
| Remove puyrely documental providing-args argument | Remove puyrely documental providing-args argument
See https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
| Python | agpl-3.0 | Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey |
231657e2bbc81b8299cc91fd24dcd7394f74b4ec | python/dpu_utils/codeutils/identifiersplitting.py | python/dpu_utils/codeutils/identifiersplitting.py | from functools import lru_cache
from typing import List
import sys
REGEX_TEXT = ("(?<=[a-z0-9])(?=[A-Z])|"
"(?<=[A-Z0-9])(?=[A-Z][a-z])|"
"(?<=[0-9])(?=[a-zA-Z])|"
"(?<=[A-Za-z])(?=[0-9])|"
"(?<=[@$])(?=[a-zA-Z0-9])|"
"(?<=[a-zA-Z0-9])(?=[@$])|"
"_")
if sys.version_info >= (3, 7):
import re
SPLIT_REGEX = re.compile(REGEX_TEXT)
else:
import regex
SPLIT_REGEX = regex.compile("(?V1)"+REGEX_TEXT)
@lru_cache(maxsize=5000)
def split_identifier_into_parts(identifier: str) -> List[str]:
"""
Split a single identifier into parts on snake_case and camelCase
"""
identifier_parts = list(s for s in SPLIT_REGEX.split(identifier) if len(s)>0)
if len(identifier_parts) == 0:
return [identifier]
return identifier_parts
| from functools import lru_cache
from typing import List
import sys
REGEX_TEXT = ("(?<=[a-z0-9])(?=[A-Z])|"
"(?<=[A-Z0-9])(?=[A-Z][a-z])|"
"(?<=[0-9])(?=[a-zA-Z])|"
"(?<=[A-Za-z])(?=[0-9])|"
"(?<=[@$.'\"])(?=[a-zA-Z0-9])|"
"(?<=[a-zA-Z0-9])(?=[@$.'\"])|"
"_|\\s+")
if sys.version_info >= (3, 7):
import re
SPLIT_REGEX = re.compile(REGEX_TEXT)
else:
import regex
SPLIT_REGEX = regex.compile("(?V1)"+REGEX_TEXT)
@lru_cache(maxsize=5000)
def split_identifier_into_parts(identifier: str) -> List[str]:
"""
Split a single identifier into parts on snake_case and camelCase
"""
identifier_parts = list(s.lower() for s in SPLIT_REGEX.split(identifier) if len(s)>0)
if len(identifier_parts) == 0:
return [identifier]
return identifier_parts
| Revert to some of the previous behavior for characters that shouldn't appear in identifiers. | Revert to some of the previous behavior for characters that shouldn't appear in identifiers.
| Python | mit | microsoft/dpu-utils,microsoft/dpu-utils |
81460f88ee19fb736dfc3453df2905f0ba4b3974 | common/permissions.py | common/permissions.py | from rest_framework.permissions import BasePermission
class ObjectHasTokenUser(BasePermission):
"""
The object's user matches the token's user.
"""
def has_object_permission(self, request, view, obj):
token = request.auth
if not token:
return False
if not hasattr(token, 'scope'):
assert False, ('TokenHasReadWriteScope requires the'
'`OAuth2Authentication` authentication '
'class to be used.')
if hasattr(obj, 'user'):
print 'token.user', token.user
print 'obj.user', obj.user
return token.user == obj.user
| from rest_framework.permissions import BasePermission
class ObjectHasTokenUser(BasePermission):
"""
The object's user matches the token's user.
"""
def has_object_permission(self, request, view, obj):
token = request.auth
if not token:
return False
if not hasattr(token, 'scope'):
assert False, ('ObjectHasTokenUser requires the'
'`OAuth2Authentication` authentication '
'class to be used.')
if hasattr(obj, 'user'):
return token.user == obj.user
| Remove debugging code, fix typo | Remove debugging code, fix typo
| Python | mit | PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans |
65336509829a42b91b000d2e423ed4581ac61c98 | app/mpv.py | app/mpv.py | #!/usr/bin/env python
# and add mpv.json to ~/.mozilla/native-messaging-hosts
import sys
import json
import struct
import subprocess
# Read a message from stdin and decode it.
def getMessage():
rawLength = sys.stdin.read(4)
if len(rawLength) == 0:
sys.exit(0)
messageLength = struct.unpack('@I', rawLength)[0]
message = sys.stdin.read(messageLength)
return json.loads(message)
# Encode a message for transmission,
# given its content.
def encodeMessage(messageContent):
encodedContent = json.dumps(messageContent)
encodedLength = struct.pack('@I', len(encodedContent))
return {'length': encodedLength, 'content': encodedContent}
# Send an encoded message to stdout
def sendMessage(encodedMessage):
sys.stdout.write(encodedMessage['length'])
sys.stdout.write(encodedMessage['content'])
sys.stdout.flush()
while True:
mpv_args = getMessage()
if (len(mpv_args) > 1):
subprocess.call(["mpv", mpv_args])
| #!/usr/bin/env python
import sys
import json
import struct
import subprocess
import shlex
# Read a message from stdin and decode it.
def getMessage():
rawLength = sys.stdin.read(4)
if len(rawLength) == 0:
sys.exit(0)
messageLength = struct.unpack('@I', rawLength)[0]
message = sys.stdin.read(messageLength)
return json.loads(message)
# Encode a message for transmission,
# given its content.
def encodeMessage(messageContent):
encodedContent = json.dumps(messageContent)
encodedLength = struct.pack('@I', len(encodedContent))
return {'length': encodedLength, 'content': encodedContent}
# Send an encoded message to stdout
def sendMessage(encodedMessage):
sys.stdout.write(encodedMessage['length'])
sys.stdout.write(encodedMessage['content'])
sys.stdout.flush()
while True:
mpv_args = getMessage()
if (len(mpv_args) > 1):
args = shlex.split("mpv " + mpv_args)
subprocess.call(args)
sys.exit(0)
| Handle shell args in python scripts | Handle shell args in python scripts
| Python | mit | vayan/external-video,vayan/external-video,vayan/external-video,vayan/external-video |
d7298374409912c6ace10e2bec323013cdd4d933 | scripts/poweron/DRAC.py | scripts/poweron/DRAC.py | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
def run2(command):
run = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Wait for the process to return
out, err = [ e.splitlines() for e in run.communicate() ]
return run.returncode, out, err
drac_path='/usr/sbin/racadm'
def DRAC( power_on_ip, user, password):
if( not os.path.exists(drac_path)):
raise DRAC_NO_SUPP_PACK()
cmd='%s -r %s -u %s -p %s serveraction powerup' % (drac_path, power_on_ip, user, password)
retcode,out,err=run2(cmd)
if(len(err)==0):
return str(True)
else:
raise DRAC_POWERON_FAILED()
def main():
if len(sys.argv)<3:
exit(0)
ip=sys.argv[1]
user=sys.argv[2]
password=sys.argv[3]
print DRAC(ip,user,password)
if __name__ == "__main__":
main() | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
def run2(command):
run = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Wait for the process to return
out, err = [ e.splitlines() for e in run.communicate() ]
return run.returncode, out, err
drac_path='/opt/dell/srvadmin/sbin/racadm'
def DRAC( power_on_ip, user, password):
if( not os.path.exists(drac_path)):
raise DRAC_NO_SUPP_PACK()
cmd='%s -r %s -u %s -p %s serveraction powerup' % (drac_path, power_on_ip, user, password)
retcode,out,err=run2(cmd)
if(len(err)==0):
return str(True)
else:
raise DRAC_POWERON_FAILED()
def main():
if len(sys.argv)<3:
exit(0)
ip=sys.argv[1]
user=sys.argv[2]
password=sys.argv[3]
print DRAC(ip,user,password)
if __name__ == "__main__":
main() | Change path to the supplemental pack | CA-40618: Change path to the supplemental pack
Signed-off-by: Javier Alvarez-Valle <cf4c8668a0b4c5e013f594a6940d05b3d4d9ddcf@citrix.com>
| Python | lgpl-2.1 | simonjbeaumont/xcp-rrdd,koushikcgit/xcp-rrdd,djs55/squeezed,koushikcgit/xcp-rrdd,johnelse/xcp-rrdd,johnelse/xcp-rrdd,sharady/xcp-networkd,simonjbeaumont/xcp-rrdd,djs55/xcp-networkd,sharady/xcp-networkd,djs55/xcp-rrdd,djs55/xcp-rrdd,koushikcgit/xcp-rrdd,djs55/xcp-networkd,koushikcgit/xcp-networkd,robhoes/squeezed,koushikcgit/xcp-networkd |
83d5cc3b4ffb4759e8e073d04299a55802df09a8 | src/ansible/views.py | src/ansible/views.py | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect, HttpResponse
from .models import Playbook
def index(request):
return "200"
| from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect, HttpResponse
from .models import Playbook
def index(request):
return HttpResponse("200")
| Fix return to use HttpResponse | Fix return to use HttpResponse
| Python | bsd-3-clause | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin |
9dcfccc3fc5524c3c2647e66a8977c1aa1758957 | tests/Physics/TestNTC.py | tests/Physics/TestNTC.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(object):
def test_ntc_resistance(self):
# Values arbitrarily from Murata NCP15WB473D03RC
assert_approx_equal(ntc_resistance("47k", "4050K", "25°C"), 47000)
assert_approx_equal(ntc_resistance("47k", "4050K", "0°C"), 162942.79)
assert_approx_equal(ntc_resistance("47k", "4050K", "5°C"), 124819.66)
assert_approx_equal(ntc_resistance("47k", "4050K", "60°C"), 11280)
| #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(object):
def test_ntc_resistance(self):
# Values arbitrarily from Murata NCP15WB473D03RC
assert_approx_equal(ntc_resistance("47k", "4050K", "25°C"), 47000)
assert_approx_equal(ntc_resistance("47k", "4050K", "0°C"), 162942.79)
assert_approx_equal(ntc_resistance("47k", "4050K", "5°C"), 124819.66)
assert_approx_equal(ntc_resistance("47k", "4050K", "60°C"), 11280.407)
| Fix wrong unit test value | Fix wrong unit test value
| Python | apache-2.0 | ulikoehler/UliEngineering |
88e5ecad9966057203a9cbecaeaecdca3e76b6da | tests/fake_filesystem.py | tests/fake_filesystem.py | import os
import stat
from StringIO import StringIO
from types import StringTypes
import paramiko as ssh
class FakeFile(StringIO):
def __init__(self, value=None, path=None):
init = lambda x: StringIO.__init__(self, x)
if value is None:
init("")
ftype = 'dir'
size = 4096
else:
init(value)
ftype = 'file'
size = len(value)
attr = ssh.SFTPAttributes()
attr.st_mode = {'file': stat.S_IFREG, 'dir': stat.S_IFDIR}[ftype]
attr.st_size = size
attr.filename = os.path.basename(path)
self.attributes = attr
def __str__(self):
return self.getvalue()
def write(self, value):
StringIO.write(self, value)
self.attributes.st_size = len(self.getvalue())
class FakeFilesystem(dict):
def __init__(self, d=None):
# Replicate input dictionary using our custom __setitem__
d = d or {}
for key, value in d.iteritems():
self[key] = value
def __setitem__(self, key, value):
if isinstance(value, StringTypes) or value is None:
value = FakeFile(value, key)
super(FakeFilesystem, self).__setitem__(key, value)
| import os
import stat
from StringIO import StringIO
from types import StringTypes
import paramiko as ssh
class FakeFile(StringIO):
def __init__(self, value=None, path=None):
init = lambda x: StringIO.__init__(self, x)
if value is None:
init("")
ftype = 'dir'
size = 4096
else:
init(value)
ftype = 'file'
size = len(value)
attr = ssh.SFTPAttributes()
attr.st_mode = {'file': stat.S_IFREG, 'dir': stat.S_IFDIR}[ftype]
attr.st_size = size
attr.filename = os.path.basename(path)
self.attributes = attr
def __str__(self):
return self.getvalue()
def write(self, value):
StringIO.write(self, value)
self.attributes.st_size = len(self.getvalue())
def close(self):
"""
Always hold fake files open.
"""
pass
class FakeFilesystem(dict):
def __init__(self, d=None):
# Replicate input dictionary using our custom __setitem__
d = d or {}
for key, value in d.iteritems():
self[key] = value
def __setitem__(self, key, value):
if isinstance(value, StringTypes) or value is None:
value = FakeFile(value, key)
super(FakeFilesystem, self).__setitem__(key, value)
| Define noop close() for FakeFile | Define noop close() for FakeFile
| Python | bsd-2-clause | kxxoling/fabric,rodrigc/fabric,qinrong/fabric,elijah513/fabric,bspink/fabric,MjAbuz/fabric,cmattoon/fabric,hrubi/fabric,felix-d/fabric,askulkarni2/fabric,SamuelMarks/fabric,mathiasertl/fabric,tekapo/fabric,StackStorm/fabric,ploxiln/fabric,kmonsoor/fabric,raimon49/fabric,haridsv/fabric,bitprophet/fabric,fernandezcuesta/fabric,itoed/fabric,rane-hs/fabric-py3,sdelements/fabric,likesxuqiang/fabric,bitmonk/fabric,getsentry/fabric,opavader/fabric,jaraco/fabric,xLegoz/fabric,TarasRudnyk/fabric,pgroudas/fabric,akaariai/fabric,rbramwell/fabric,amaniak/fabric,cgvarela/fabric,tolbkni/fabric,pashinin/fabric |
f45b3e73b6258c99aed2bff2e7350f1c797ff849 | providers/provider.py | providers/provider.py | import copy
import json
import requests
import html5lib
from application import APPLICATION as APP
# Be compatible with python 2 and 3
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
class BaseProvider(object):
# ==== HELPER METHODS ====
def parse_html(self, url, css_selector, timeout=60, cache=True):
html = self._http_get(url, timeout=timeout, cache=cache)
document = html5lib.parse(html)
results = document.cssselect(css_selector)
data = [result.text_content() for result in results]
return data
def traverse_json(self, data, path):
if not path:
return data
new_data = copy.copy(data)
for item in path.split("."):
if item.isdigit():
item = int(item)
try:
new_data = new_data[item]
except (IndexError, KeyError):
return {}
return new_data
def parse_json(self, url, path=None, timeout=60, cache=True):
data = self._http_get(url, timeout=timeout, cache=cache)
data = json.loads(data)
data = self.traverse_json(data, path)
return data
def urlencode(self, data):
return urlencode(data)
# ==== PRIVATE METHODS ====
def _http_get(self, url, timeout=60, cache=True):
base = requests if not cache else APP.setting("WEBCACHE")
response = base.get(url, timeout=timeout)
return response.text
| import copy
import json
from urllib.parse import urlencode
import html5lib
import requests
from application import APPLICATION as APP
class BaseProvider(object):
# ==== HELPER METHODS ====
def parse_html(self, url, css_selector, timeout=60, cache=True):
html = self._http_get(url, timeout=timeout, cache=cache)
document = html5lib.parse(html)
results = document.cssselect(css_selector)
data = [result.text_content() for result in results]
return data
def traverse_json(self, data, path):
if not path:
return data
new_data = copy.copy(data)
for item in path.split("."):
if item.isdigit():
item = int(item)
try:
new_data = new_data[item]
except (IndexError, KeyError):
return {}
return new_data
def parse_json(self, url, path=None, timeout=60, cache=True):
data = self._http_get(url, timeout=timeout, cache=cache)
data = json.loads(data)
data = self.traverse_json(data, path)
return data
def urlencode(self, data):
return urlencode(data)
# ==== PRIVATE METHODS ====
def _http_get(self, url, timeout=60, cache=True):
base = requests if not cache else APP.setting("WEBCACHE")
response = base.get(url, timeout=timeout)
return response.text
| Remove support for Python 2. | Remove support for Python 2.
| Python | mit | EmilStenstrom/nephele |
cdd32dd3e346f72f823cc5d3f59c79c027db65c8 | common.py | common.py | """Functions common to other modules."""
import json
import os
import re
import time
import urllib.request
from settings import net
def clean(name):
"""Strip all [^a-zA-Z0-9_] characters and convert to lowercase."""
return re.sub(r"\W", r"", name, flags=re.ASCII).lower()
def exists(path):
"""Check to see if a path exists."""
return True if os.path.exists(path) else False
def ls(path):
"""The contents of a directory."""
return os.listdir(path)
def mkdir(path):
"""Create the given directory path if it doesn't already exist."""
os.makedirs(path, exist_ok=True)
return path
def open_url(url, task):
"""Retrieve data from the specified url."""
for attempt in range(0, net.retries):
try:
return urllib.request.urlopen(url)
except OSError:
print("Error: {} (retry in {}s)".format(task, net.wait))
time.sleep(net.wait)
raise ConnectionError("Halted: Unable to access resource")
def urlopen_json(url, task):
"""Retrieve json data from the specified url."""
for attempt in range(0, net.retries):
try:
reply = urllib.request.urlopen(url)
reply = json.loads(reply.read().decode())
return reply["DATA"]["RECORD"]
except:
print("Error: {} (retry in {}s)".format(task, net.wait))
time.sleep(net.wait)
raise ConnectionError("Halted: Unable to access resource")
| """Functions common to other modules."""
import json
import os
import re
import time
import urllib.request
from settings import net
def clean(name):
"""Strip all [^a-zA-Z0-9_] characters and convert to lowercase."""
return re.sub(r"\W", r"", name, flags=re.ASCII).lower()
def exists(path):
"""Check to see if a path exists."""
return True if os.path.exists(path) else False
def ls(path):
"""The contents of a directory."""
return os.listdir(path)
def mkdir(path):
"""Create the given directory path if it doesn't already exist."""
os.makedirs(path, exist_ok=True)
return path
def open_url(url, task):
"""Retrieve data from the specified url."""
for attempt in range(0, net.retries):
try:
return urllib.request.urlopen(url)
except OSError:
print("Error: {} (retry in {}s)".format(task, net.wait))
time.sleep(net.wait)
raise ConnectionError("Halted: Unable to access resource")
def urlopen_json(url, task="Unknown task"):
"""Retrieve json data from the specified url."""
for attempt in range(0, net.retries):
try:
reply = urllib.request.urlopen(url)
reply = json.loads(reply.read().decode())
return reply["DATA"]["RECORD"]
except:
print("Error: {} (retry in {}s)".format(task, net.wait))
time.sleep(net.wait)
raise ConnectionError("Halted: Unable to access resource")
| Make task an optional argument. | Make task an optional argument.
| Python | bsd-2-clause | chingc/DJRivals,chingc/DJRivals |
d362b066f2c577d731adb0643799e47d30ae2f91 | config.py | config.py | import os.path
"""
TODO:
pylokit.lokit.LoKitExportError: b'no output filter found for provided suffix'
Raised when trying to export to unsupported dest (eg. pptx -> txt)
"""
SUPPORTED_FORMATS = {
"pdf": {
"path": "pdf",
"fmt": "pdf",
},
"txt": {
"path": "txt",
"fmt": "txt",
},
"html": {
"path": "html",
"fmt": "html",
}
}
SUPPORTED_MIMETYPES = {
"application/ms-word": {
"formats": ["pdf", "txt", "html"],
}
}
DEBUG = True
LIBREOFFICE_PATH = "/usr/lib/libreoffice/program/" # for ubuntu 16.04
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
MEDIA_PATH = os.path.join(BASE_DIR, "media/")
MEDIA_URL = "/media/"
ORIGINAL_FILE_TTL = 60 * 10 # 10 minutes
RESULT_FILE_TTL = 60 * 60 * 24 # 24 hours
| import os
"""
TODO:
pylokit.lokit.LoKitExportError: b'no output filter found for provided suffix'
Raised when trying to export to unsupported dest (eg. pptx -> txt)
"""
SUPPORTED_FORMATS = {
"pdf": {
"path": "pdf",
"fmt": "pdf",
},
"txt": {
"path": "txt",
"fmt": "txt",
},
"html": {
"path": "html",
"fmt": "html",
}
}
SUPPORTED_MIMETYPES = {
"application/ms-word": {
"formats": ["pdf", "txt", "html"],
}
}
DEBUG = os.environ.get("DEBUG", False)
LIBREOFFICE_PATH = os.environ.get("LIBREOFFICE_PATH", "/usr/lib/libreoffice/program/") # for ubuntu 16.04
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
MEDIA_PATH = os.path.join(BASE_DIR, "media/")
MEDIA_URL = "/media/"
ORIGINAL_FILE_TTL = 60 * 10 # 10 minutes
RESULT_FILE_TTL = 60 * 60 * 24 # 24 hours
| Use DEBUG and LIBREOFFICE_PATH vars from env | Use DEBUG and LIBREOFFICE_PATH vars from env
| Python | mit | docsbox/docsbox |
de1142300a7628289d62f6686833bb795c124979 | config.py | config.py | SECRET_KEY = "TODO-change-this"
SQLALCHEMY_DATABASE_URI = "postgresql://postgres:postgres@localhost/cifer"
USERNAME = "postgres"
PASSWORD = "postgres"
| SECRET_KEY = "TODO-change-this"
SQLALCHEMY_DATABASE_URI = "postgres://ljknddhjuxlbve:V1QbynNKExcP5ZrctxQSXp2Cz1@ec2-54-204-36-244.compute-1.amazonaws.com:5432/d2rvtrvqnshjm9"
USERNAME = "ljknddhjuxlbve"
PASSWORD = "V1QbynNKExcP5ZrctxQSXp2Cz1"
| Use Heroku database connection settings | Use Heroku database connection settings
| Python | mit | uva-financial-engineering/cifer-tournament,uva-financial-engineering/cifer-tournament |
9614fe5657c478c32dcbc4c6b6b0127adac55009 | python/fsurfer/log.py | python/fsurfer/log.py | #!/usr/bin/env python
# Copyright 2016 University of Chicago
# Licensed under the APL 2.0 license
import log
import log.handlers
import os
LOG_FILENAME = '~/logs/fsurf.log'
MAX_BYTES = 1024*1024*50 # 50 MB
NUM_BACKUPS = 10 # 10 files
def initialize_logging():
"""
Initialize logging for fsurf
:return: None
"""
logger = log.getLogger('fsurf')
log_file = os.path.abspath(os.path.expanduser(LOG_FILENAME))
handle = log.handlers.RotatingFileHandler(log_file,
mode='a',
maxBytes=MAX_BYTES,
backupCount=NUM_BACKUPS)
handle.setLevel(log.WARN)
logger.addHandler(handle)
def set_debugging():
"""
Configure logging to output debug messages
:return: None
"""
logger = log.getLogger('fsurf')
log_file = os.path.abspath(os.path.expanduser('~/logs/fsurf_debug.log'))
handle = log.FileHandler(log_file)
handle.setLevel(log.DEBUG)
logger.addHandler(handle)
def get_logger():
"""
Get logger that can be used for logging
:return: logger object
"""
return log.getLogger('fsurf') | #!/usr/bin/env python
# Copyright 2016 University of Chicago
# Licensed under the APL 2.0 license
import logging
import logging.handlers
import os
LOG_FILENAME = '~/logs/fsurf.log'
MAX_BYTES = 1024*1024*50 # 50 MB
NUM_BACKUPS = 10 # 10 files
def initialize_logging():
"""
Initialize logging for fsurf
:return: None
"""
logger = logging.getLogger('fsurf')
log_file = os.path.abspath(os.path.expanduser(LOG_FILENAME))
handle = logging.handlers.RotatingFileHandler(log_file,
mode='a',
maxBytes=MAX_BYTES,
backupCount=NUM_BACKUPS)
handle.setLevel(logging.WARN)
logger.addHandler(handle)
def set_debugging():
"""
Configure logging to output debug messages
:return: None
"""
logger = logging.getLogger('fsurf')
log_file = os.path.abspath(os.path.expanduser('~/logs/fsurf_debug.log'))
handle = logging.FileHandler(log_file)
handle.setLevel(logging.DEBUG)
logger.addHandler(handle)
def get_logger():
"""
Get logger that can be used for logging
:return: logger object
"""
return logging.getLogger('fsurf')
| Fix issues due to module rename | Fix issues due to module rename
| Python | apache-2.0 | OSGConnect/freesurfer_workflow,OSGConnect/freesurfer_workflow |
27864fd59c12127bc35f3da2578c77efd8315629 | brickit.py | brickit.py | from datetime import datetime
import io
import os
import legofy
from PIL import Image
from flask import Flask, render_template, request, redirect, send_file
BRICK_PATH = os.path.join(os.path.dirname(legofy.__file__), "assets", "bricks", "1x1.png")
BRICK_IMAGE = Image.open(BRICK_PATH)
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/upload', methods=['POST'])
def upload():
uploaded = request.files['file']
if not uploaded:
return redirect('/')
try:
image = Image.open(uploaded)
except IOError:
return redirect('/')
new_size = legofy.get_new_size(image, BRICK_IMAGE)
image.thumbnail(new_size, Image.ANTIALIAS)
lego_image = legofy.make_lego_image(image, BRICK_IMAGE)
new_image = io.BytesIO()
lego_image.save(new_image, format='PNG')
new_image.seek(0)
response = send_file(new_image, mimetype='image/png')
response.headers['Last-Modified'] = datetime.now()
response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = '-1'
return response
| from datetime import datetime
import io
import os
import legofy
from PIL import Image
from flask import Flask, render_template, request, redirect, send_file
BRICK_PATH = os.path.join(os.path.dirname(legofy.__file__), "assets", "bricks", "1x1.png")
BRICK_IMAGE = Image.open(BRICK_PATH)
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/upload', methods=['POST'])
def upload():
uploaded = request.files['file']
if not uploaded:
return redirect('/')
try:
image = Image.open(uploaded)
except IOError:
return redirect('/')
new_size = legofy.get_new_size(image, BRICK_IMAGE)
image.thumbnail(new_size, Image.ANTIALIAS)
lego_image = legofy.make_lego_image(image, BRICK_IMAGE)
new_image = io.BytesIO()
lego_image.save(new_image, format='PNG')
new_image.seek(0)
response = send_file(new_image, mimetype='image/png')
response.headers['Last-Modified'] = datetime.now()
response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = '-1'
return response
if __name__ == '__main__':
app.run(debug=True)
| Add debugging if run directly | Add debugging if run directly
| Python | mit | aaronkurtz/bricky,aaronkurtz/bricky |
86080d1c06637e1d73784100657fc43bd7326e66 | tools/conan/conanfile.py | tools/conan/conanfile.py | from conans import ConanFile, CMake, tools
class LibWFUTConan(ConanFile):
name = "libwfut"
version = "0.2.4"
license = "GPL-2.0+"
author = "Erik Ogenvik <erik@ogenvik.org>"
homepage = "https://www.worldforge.org"
url = "https://github.com/worldforge/libwfut"
description = "A client side C++ implementation of WFUT (WorldForge Update Tool)."
topics = ("mmorpg", "worldforge")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [False, True]}
default_options = {"shared": False}
generators = "cmake"
requires = ["sigc++/2.10.0@worldforge/stable",
"zlib/1.2.11",
"libcurl/7.66.0@worldforge/stable"]
scm = {
"type": "git",
"url": "https://github.com/worldforge/libwfut.git",
"revision": "auto"
}
def build(self):
cmake = CMake(self)
cmake.configure(source_folder=".")
cmake.build()
cmake.install()
def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)
self.cpp_info.includedirs = ["include/wfut-0.2"]
def package(self):
pass
| from conans import ConanFile, CMake, tools
class LibWFUTConan(ConanFile):
name = "libwfut"
version = "0.2.4"
license = "GPL-2.0+"
author = "Erik Ogenvik <erik@ogenvik.org>"
homepage = "https://www.worldforge.org"
url = "https://github.com/worldforge/libwfut"
description = "A client side C++ implementation of WFUT (WorldForge Update Tool)."
topics = ("mmorpg", "worldforge")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [False, True], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
generators = "cmake"
requires = ["sigc++/2.10.0@worldforge/stable",
"zlib/1.2.11",
"libcurl/7.66.0@worldforge/stable"]
scm = {
"type": "git",
"url": "https://github.com/worldforge/libwfut.git",
"revision": "auto"
}
def build(self):
cmake = CMake(self)
cmake.configure(source_folder=".")
cmake.build()
cmake.install()
def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)
self.cpp_info.includedirs = ["include/wfut-0.2"]
def package(self):
pass
| Build with PIC by default. | Build with PIC by default.
| Python | lgpl-2.1 | worldforge/libwfut,worldforge/libwfut,worldforge/libwfut,worldforge/libwfut |
b906446bfed0f716b3337fbf33d0b6ded7854669 | genome_designer/main/upload_template_views.py | genome_designer/main/upload_template_views.py | """
Handlers for fetching upload templates.
"""
from django.shortcuts import render
CONTENT_TYPE__CSV = 'text/csv'
TEMPLATE__SAMPLES_BATCH_IMPORT_FROM_SERVER = 'sample_list_targets_template.csv'
TEMPLATE__SAMPLES_BATCH_BROWSER_UPLOAD = (
'sample_list_browser_upload_template.tsv')
def sample_list_targets_template(request):
"""Let the user download a blank sample targets template as a
comma-separated values file (.csv) so they can fill it in and upload
it back to the server.
"""
context = {}
return render(request, TEMPLATE__SAMPLES_BATCH_IMPORT_FROM_SERVER, context,
content_type=CONTENT_TYPE__CSV)
def variant_set_upload_template(request):
"""Let the user download a blank variant set template as a blank
VCF file to be filled in.
"""
context = {}
return render(request, 'variant_set_upload_template.vcf', context,
content_type='text/tab-separated-values')
def sample_list_browser_upload_template(request):
"""Template that allows the user to indicate the names of samples they
will updload through the browser form.
"""
context = {}
return render(request, TEMPLATE__SAMPLES_BATCH_BROWSER_UPLOAD, context,
content_type=CONTENT_TYPE__CSV)
| """
Handlers for fetching upload templates.
"""
from django.shortcuts import render
CONTENT_TYPE__CSV = 'text/csv'
TEMPLATE__SAMPLES_BATCH_IMPORT_FROM_SERVER = 'sample_list_targets_template.csv'
TEMPLATE__SAMPLES_BATCH_BROWSER_UPLOAD = (
'sample_list_browser_upload_template.csv')
def sample_list_targets_template(request):
"""Let the user download a blank sample targets template as a
comma-separated values file (.csv) so they can fill it in and upload
it back to the server.
"""
context = {}
return render(request, TEMPLATE__SAMPLES_BATCH_IMPORT_FROM_SERVER, context,
content_type=CONTENT_TYPE__CSV)
def variant_set_upload_template(request):
"""Let the user download a blank variant set template as a blank
VCF file to be filled in.
"""
context = {}
return render(request, 'variant_set_upload_template.vcf', context,
content_type='text/tab-separated-values')
def sample_list_browser_upload_template(request):
"""Template that allows the user to indicate the names of samples they
will updload through the browser form.
"""
context = {}
return render(request, TEMPLATE__SAMPLES_BATCH_BROWSER_UPLOAD, context,
content_type=CONTENT_TYPE__CSV)
| Fix test broken by last commit. | Fix test broken by last commit.
| Python | mit | churchlab/millstone,woodymit/millstone,woodymit/millstone,churchlab/millstone,churchlab/millstone,churchlab/millstone,woodymit/millstone,woodymit/millstone |
0d3322de1944a1a64d6c77d4b52452509979e0c1 | src/cobwebs/setup.py | src/cobwebs/setup.py | import sys
import shutil
import os
from setuptools import setup, find_packages
import cobwebs
import subprocess
if len(sys.argv) > 0:
if sys.argv[1] in ("install", "develop"):
try:
os.mkdir("/etc/spider/")
except FileExistsError:
print("Warning: /etc/spider directory already exists...")
print("Copying file to /etc/spider/")
ret = shutil.copy("conf/cobwebs.yaml", "/etc/spider/cobwebs.yaml")
print(ret)
subprocess.call(["ls", "-l", "/etc/spider"])
setup(
name='cobwebs',
version=cobwebs.__version__,
packages=find_packages(),
author="Asteroide",
author_email="asteroide__AT__domtombox.net",
description="A house for spider utilities",
long_description=open('README.md').read(),
# install_requires= ,
include_package_data=True,
url='https://github.com/asteroide/immo_spider',
classifiers=[
"Programming Language :: Python",
"Development Status :: 1 - Planning",
"License :: OSI Approved",
"Natural Language :: French",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.5",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)"
],
)
| import sys
import shutil
import os
from setuptools import setup, find_packages
import subprocess
if len(sys.argv) > 0:
if sys.argv[1] in ("install", "develop"):
try:
os.mkdir("/etc/spider/")
except FileExistsError:
print("Warning: /etc/spider directory already exists...")
print("Copying file to /etc/spider/")
ret = shutil.copy("conf/cobwebs.yaml", "/etc/spider/cobwebs.yaml")
print(ret)
subprocess.call(["ls", "-l", "/etc/spider"])
import cobwebs
setup(
name='cobwebs',
version=cobwebs.__version__,
packages=find_packages(),
author="Asteroide",
author_email="asteroide__AT__domtombox.net",
description="A house for spider utilities",
long_description=open('README.md').read(),
# install_requires= ,
include_package_data=True,
url='https://github.com/asteroide/immo_spider',
classifiers=[
"Programming Language :: Python",
"Development Status :: 1 - Planning",
"License :: OSI Approved",
"Natural Language :: French",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.5",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)"
],
)
| Move import of the main library. | Move import of the main library.
| Python | apache-2.0 | asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider |
bbaf4aa6dbdbb41395b0859260962665b20230ad | __openerp__.py | __openerp__.py | # -*- coding: utf-8 -*-
{
'name': 'Chilean VAT Ledger',
'description': '''
Chilean VAT Ledger Management
=================================
Creates Sale and Purchase VAT report menus in
"accounting/period processing/VAT Ledger"
''',
'version': '0.1',
'author': u'Blanco Martín & Asociados',
'website': 'http://blancomartin.cl',
'depends': [
'report_aeroo',
'l10n_cl_invoice'
],
'category': 'Reporting subsystems',
'data': [
'account_vat_report_view.xml',
'report/account_vat_ledger_report.xml',
'security/security.xml',
'security/ir.model.access.csv',
],
'installable': True,
'active': False
}
| # -*- coding: utf-8 -*-
{
'name': 'Chilean VAT Ledger',
'license': 'AGPL-3',
'description': '''
Chilean VAT Ledger Management
=================================
Creates Sale and Purchase VAT report menus in
"accounting/period processing/VAT Ledger"
''',
'version': '0.1',
'author': u'Blanco Martín & Asociados',
'website': 'http://blancomartin.cl',
'depends': [
'report_aeroo',
'l10n_cl_invoice'
],
'category': 'Reporting subsystems',
'data': [
'account_vat_report_view.xml',
'report/account_vat_ledger_report.xml',
'security/security.xml',
'security/ir.model.access.csv',
],
'installable': True,
'active': False
}
| Set license to AGPL-3 in manifest | Set license to AGPL-3 in manifest
| Python | agpl-3.0 | odoo-chile/l10n_cl_account_vat_ledger,odoo-chile/l10n_cl_account_vat_ledger |
3964cb1645c2d0f1a7080c195ff33c36a590358a | sklearn_pmml/extensions/linear_regression.py | sklearn_pmml/extensions/linear_regression.py | from sklearn.linear_model import LinearRegression
from bs4 import BeautifulSoup
import numpy
def from_pmml(self, pmml):
"""Returns a model with the intercept and coefficients represented in PMML file."""
model = self()
# Reads the input PMML file with BeautifulSoup.
with open(pmml, "r") as f:
lm_soup = BeautifulSoup(f, "xml")
if not lm_soup.RegressionTable:
raise ValueError("RegressionTable not found in the input PMML file.")
else:
##### DO I WANT TO PULL THIS OUT AS ITS OWN FUNCTION? #####
# Pulls out intercept from the PMML file and assigns it to the
# model. If the intercept does not exist, assign it to zero.
intercept = 0
if "intercept" in lm_soup.RegressionTable.attrs:
intercept = lm_soup.RegressionTable['intercept']
model.intercept_ = intercept
# Pulls out coefficients from the PMML file, and assigns them
# to the model.
if not lm_soup.find_all('NumericPredictor'):
raise ValueError("NumericPredictor not found in the input PMML file.")
else:
coefs = []
numeric_predictors = lm_soup.find_all('NumericPredictor')
for i in numeric_predictors:
coefs.append(i['coefficient'])
model.coef_ = numpy.array(coefs)
return model
# TODO: check input data's X order and rearrange the array
LinearRegression.from_pmml = classmethod(from_pmml)
| from sklearn.linear_model import LinearRegression
from bs4 import BeautifulSoup
import numpy
def from_pmml(self, pmml):
"""Returns a model with the intercept and coefficients represented in PMML file."""
model = self()
# Reads the input PMML file with BeautifulSoup.
with open(pmml, "r") as f:
lm_soup = BeautifulSoup(f, "xml")
if not lm_soup.RegressionTable:
raise ValueError("RegressionTable not found in the input PMML file.")
else:
##### DO I WANT TO PULL THIS OUT AS ITS OWN FUNCTION? #####
# Pulls out intercept from the PMML file and assigns it to the
# model. If the intercept does not exist, assign it to zero.
intercept = 0
if "intercept" in lm_soup.RegressionTable.attrs:
intercept = lm_soup.RegressionTable['intercept']
model.intercept_ = float(intercept)
# Pulls out coefficients from the PMML file, and assigns them
# to the model.
if not lm_soup.find_all('NumericPredictor'):
raise ValueError("NumericPredictor not found in the input PMML file.")
else:
coefs = []
numeric_predictors = lm_soup.find_all('NumericPredictor')
for i in numeric_predictors:
i_coef = float(i['coefficient'])
coefs.append(i_coef)
model.coef_ = numpy.array(coefs)
return model
# TODO: check input data's X order and rearrange the array
LinearRegression.from_pmml = classmethod(from_pmml)
| Change the intercept and coefficients to be floats, not unicode | Change the intercept and coefficients to be floats, not unicode
| Python | mit | jeenalee/sklearn_pmml |
dcd9f381bc7eeaa0ffad72d286bb6dc26ebf37a4 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Sergey Margaritov
# Copyright (c) 2013 Sergey Margaritov
#
# License: MIT
#
"""This module exports the scss-lint plugin linter class."""
import os
from SublimeLinter.lint import Linter, util
class Scss(Linter):
"""Provides an interface to the scss-lint executable."""
syntax = ['sass', 'scss']
executable = 'scss-lint'
regex = r'^.+?:(?P<line>\d+) (?:(?P<error>\[E\])|(?P<warning>\[W\])) (?P<message>[^`]*(?:`(?P<near>.+?)`)?.*)'
tempfile_suffix = 'scss'
defaults = {
'--include-linter:,': '',
'--exclude-linter:,': ''
}
inline_overrides = ('bundle-exec', 'include-linter', 'exclude-linter')
comment_re = r'^\s*/[/\*]'
config_file = ('--config', '.scss-lint.yml', '~')
def cmd(self):
if self.get_view_settings().get('bundle-exec', False):
return ['bundle', 'exec', self.executable]
return [self.executable_path] | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Sergey Margaritov
# Copyright (c) 2013 Sergey Margaritov
#
# License: MIT
#
"""This module exports the scss-lint plugin linter class."""
import os
from SublimeLinter.lint import RubyLinter, util
class Scss(RubyLinter):
"""Provides an interface to the scss-lint executable."""
syntax = ('sass', 'scss')
executable = 'scss-lint'
regex = r'^.+?:(?P<line>\d+) (?:(?P<error>\[E\])|(?P<warning>\[W\])) (?P<message>[^`]*(?:`(?P<near>.+?)`)?.*)'
tempfile_suffix = 'scss'
defaults = {
'--include-linter:,': '',
'--exclude-linter:,': ''
}
inline_overrides = ('bundle-exec', 'include-linter', 'exclude-linter')
comment_re = r'^\s*/[/\*]'
config_file = ('--config', '.scss-lint.yml', '~')
def cmd(self):
if self.get_view_settings().get('bundle-exec', False):
return ('bundle', 'exec', self.executable)
return (self.executable_path) | Use RubyLinter instead of Linter so rbenv and rvm are supported | Use RubyLinter instead of Linter so rbenv and rvm are supported
| Python | mit | attenzione/SublimeLinter-scss-lint |
150e338b7d2793c434d7e2f21aef061f35634476 | openspending/test/__init__.py | openspending/test/__init__.py | """\
OpenSpending test module
========================
Run the OpenSpending test suite by running
nosetests
in the root of the repository, while in an active virtualenv. See
doc/install.rst for more information.
"""
import os
import sys
from paste.deploy import appconfig
from openspending import mongo
from helpers import clean_all
__all__ = ['TestCase', 'DatabaseTestCase']
here_dir = os.getcwd()
config = appconfig('config:test.ini', relative_to=here_dir)
mongo.configure(config)
class TestCase(object):
def setup(self):
pass
def teardown(self):
pass
class DatabaseTestCase(TestCase):
def teardown(self):
clean_all()
super(DatabaseTestCase, self).teardown() | """\
OpenSpending test module
========================
Run the OpenSpending test suite by running
nosetests
in the root of the repository, while in an active virtualenv. See
doc/install.rst for more information.
"""
import os
import sys
from pylons import config
from openspending import mongo
from .helpers import clean_all
__all__ = ['TestCase', 'DatabaseTestCase']
mongo.configure(config)
class TestCase(object):
def setup(self):
pass
def teardown(self):
pass
class DatabaseTestCase(TestCase):
def teardown(self):
clean_all()
super(DatabaseTestCase, self).teardown() | Use config given on command line | Use config given on command line
| Python | agpl-3.0 | pudo/spendb,openspending/spendb,openspending/spendb,nathanhilbert/FPA_Core,pudo/spendb,johnjohndoe/spendb,CivicVision/datahub,USStateDept/FPA_Core,johnjohndoe/spendb,USStateDept/FPA_Core,CivicVision/datahub,nathanhilbert/FPA_Core,johnjohndoe/spendb,openspending/spendb,USStateDept/FPA_Core,spendb/spendb,nathanhilbert/FPA_Core,spendb/spendb,pudo/spendb,spendb/spendb,CivicVision/datahub |
37a0cb41a88114ab9edb514e29447756b0c3e92a | tests/test_cli.py | tests/test_cli.py | # -*- coding: utf-8 -*-
from click.testing import CliRunner
import pytest
from cibopath.cli import main
from cibopath import __version__
runner = CliRunner()
@pytest.fixture(params=['-V', '--version'])
def version_cli_flag(request):
return request.param
def test_cli_group_version_option(version_cli_flag):
result = runner.invoke(main, [version_cli_flag])
assert result.exit_code == 0
assert result.output == 'cibopath, version {}\n'.format(__version__)
| # -*- coding: utf-8 -*-
import pytest
from cibopath import __version__
@pytest.fixture(params=['-V', '--version'])
def version_cli_flag(request):
return request.param
def test_cli_group_version_option(cli_runner, version_cli_flag):
result = cli_runner([version_cli_flag])
assert result.exit_code == 0
assert result.output == 'cibopath, version {}\n'.format(__version__)
| Use cli_runner fixture in test | Use cli_runner fixture in test
| Python | bsd-3-clause | hackebrot/cibopath |
f814e945d3e62c87c5f86ef5ac37c5feb733b83d | tests/test_ext.py | tests/test_ext.py | from __future__ import absolute_import, unicode_literals
import unittest
from mopidy import config, ext
class ExtensionTest(unittest.TestCase):
def setUp(self): # noqa: N802
self.ext = ext.Extension()
def test_dist_name_is_none(self):
self.assertIsNone(self.ext.dist_name)
def test_ext_name_is_none(self):
self.assertIsNone(self.ext.ext_name)
def test_version_is_none(self):
self.assertIsNone(self.ext.version)
def test_get_default_config_raises_not_implemented(self):
with self.assertRaises(NotImplementedError):
self.ext.get_default_config()
def test_get_config_schema_returns_extension_schema(self):
schema = self.ext.get_config_schema()
self.assertIsInstance(schema['enabled'], config.Boolean)
def test_validate_environment_does_nothing_by_default(self):
self.assertIsNone(self.ext.validate_environment())
def test_setup_raises_not_implemented(self):
with self.assertRaises(NotImplementedError):
self.ext.setup(None)
| from __future__ import absolute_import, unicode_literals
import pytest
from mopidy import config, ext
@pytest.fixture
def extension():
return ext.Extension()
def test_dist_name_is_none(extension):
assert extension.dist_name is None
def test_ext_name_is_none(extension):
assert extension.ext_name is None
def test_version_is_none(extension):
assert extension.version is None
def test_get_default_config_raises_not_implemented(extension):
with pytest.raises(NotImplementedError):
extension.get_default_config()
def test_get_config_schema_returns_extension_schema(extension):
schema = extension.get_config_schema()
assert isinstance(schema['enabled'], config.Boolean)
def test_validate_environment_does_nothing_by_default(extension):
assert extension.validate_environment() is None
def test_setup_raises_not_implemented(extension):
with pytest.raises(NotImplementedError):
extension.setup(None)
| Convert ext test to pytests | tests: Convert ext test to pytests
| Python | apache-2.0 | mokieyue/mopidy,bencevans/mopidy,ZenithDK/mopidy,jodal/mopidy,quartz55/mopidy,pacificIT/mopidy,pacificIT/mopidy,quartz55/mopidy,ali/mopidy,swak/mopidy,tkem/mopidy,bencevans/mopidy,mopidy/mopidy,SuperStarPL/mopidy,dbrgn/mopidy,hkariti/mopidy,glogiotatidis/mopidy,mokieyue/mopidy,ali/mopidy,bacontext/mopidy,glogiotatidis/mopidy,diandiankan/mopidy,dbrgn/mopidy,mopidy/mopidy,jmarsik/mopidy,glogiotatidis/mopidy,bacontext/mopidy,vrs01/mopidy,kingosticks/mopidy,SuperStarPL/mopidy,diandiankan/mopidy,vrs01/mopidy,dbrgn/mopidy,jcass77/mopidy,glogiotatidis/mopidy,swak/mopidy,bencevans/mopidy,mokieyue/mopidy,adamcik/mopidy,tkem/mopidy,rawdlite/mopidy,bacontext/mopidy,pacificIT/mopidy,ali/mopidy,jcass77/mopidy,rawdlite/mopidy,mopidy/mopidy,vrs01/mopidy,tkem/mopidy,dbrgn/mopidy,SuperStarPL/mopidy,diandiankan/mopidy,tkem/mopidy,jodal/mopidy,diandiankan/mopidy,jmarsik/mopidy,quartz55/mopidy,ZenithDK/mopidy,jodal/mopidy,ZenithDK/mopidy,jmarsik/mopidy,swak/mopidy,ZenithDK/mopidy,bacontext/mopidy,kingosticks/mopidy,quartz55/mopidy,pacificIT/mopidy,SuperStarPL/mopidy,hkariti/mopidy,ali/mopidy,hkariti/mopidy,adamcik/mopidy,vrs01/mopidy,rawdlite/mopidy,hkariti/mopidy,rawdlite/mopidy,mokieyue/mopidy,adamcik/mopidy,swak/mopidy,kingosticks/mopidy,bencevans/mopidy,jmarsik/mopidy,jcass77/mopidy |
7127520c3539bd65c6241d6c4a36e3cb6bfe6195 | scripts/launch_app.py | scripts/launch_app.py | #! /usr/bin/env python3
"""Launch the flask-forecaster application."""
import os
from flask_forecaster import app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=int(os.getenv('PORT')))
| #! /usr/bin/env python3
"""Launch the flask-forecaster application."""
import os
import sys
from flask_forecaster import app
if __name__ == '__main__':
app.run(
debug='debug' in sys.argv,
host='0.0.0.0',
port=int(os.getenv('PORT'))
)
| Allow running the app in debug mode from the command line | Allow running the app in debug mode from the command line
| Python | isc | textbook/flask-forecaster,textbook/flask-forecaster |
27ffcae96c5dce976517035b25a5c72f10e2ec99 | tool_spatialdb.py | tool_spatialdb.py | # SpatialDB scons tool
#
# It builds the library for the SpatialDB C++ class library,
# and provides CPP and linker specifications for the header
# and libraries.
#
# SpatialDB depends on SqliteDB, which provides the interface to
# sqlite3. It also depends on SpatiaLite. Since SpatiaLite is
# is also needed by SQLiteDB, we let the sqlitedb tool provide
# the required SpatiaLite plumbing.
import os
import sys
import eol_scons
tools = ['sqlitedb','doxygen','prefixoptions']
env = Environment(tools = ['default'] + tools)
platform = env['PLATFORM']
thisdir = env.Dir('.').srcnode().abspath
# define the tool
def spatialdb(env):
env.AppendUnique(CPPPATH =[thisdir,])
env.AppendLibrary('spatialdb')
env.AppendLibrary('geos')
env.AppendLibrary('geos_c')
env.AppendLibrary('proj')
if (platform != 'posix'):
env.AppendLibrary('iconv')
env.Replace(CCFLAGS=['-g','-O2'])
env.Require(tools)
Export('spatialdb')
# build the SpatialDB library
libsources = Split("""
SpatiaLiteDB.cpp
""")
headers = Split("""
SpatiaLiteDB.h
""")
libspatialdb = env.Library('spatialdb', libsources)
env.Default(libspatialdb)
html = env.Apidocs(libsources + headers, DOXYFILE_DICT={'PROJECT_NAME':'SpatialDB', 'PROJECT_NUMBER':'1.0'})
| # SpatialDB scons tool
#
# It builds the library for the SpatialDB C++ class library,
# and provides CPP and linker specifications for the header
# and libraries.
#
# SpatialDB depends on SqliteDB, which provides the interface to
# sqlite3. It also depends on SpatiaLite. Since SpatiaLite is
# is also needed by SQLiteDB, we let the sqlitedb tool provide
# the required SpatiaLite plumbing.
import os
import sys
import eol_scons
tools = ['sqlitedb','doxygen','prefixoptions']
env = Environment(tools = ['default'] + tools)
platform = env['PLATFORM']
thisdir = env.Dir('.').srcnode().abspath
# define the tool
def spatialdb(env):
env.AppendUnique(CPPPATH =[thisdir,])
env.AppendLibrary('spatialdb')
env.AppendLibrary('geos')
env.AppendLibrary('geos_c')
env.AppendLibrary('proj')
if (platform != 'posix'):
env.AppendLibrary('iconv')
env.Require(tools)
Export('spatialdb')
# build the SpatialDB library
libsources = Split("""
SpatiaLiteDB.cpp
""")
headers = Split("""
SpatiaLiteDB.h
""")
libspatialdb = env.Library('spatialdb', libsources)
env.Default(libspatialdb)
html = env.Apidocs(libsources + headers, DOXYFILE_DICT={'PROJECT_NAME':'SpatialDB', 'PROJECT_NUMBER':'1.0'})
| Use GLOBAL_TOOLs rather than Export/Import for project wide configuration. | Use GLOBAL_TOOLs rather than Export/Import for project wide configuration.
| Python | bsd-3-clause | ncareol/spatialdb,ncareol/spatialdb |
dd021344c081d47f51212165584ad646868f5720 | test_standalone.py | test_standalone.py | # Shamelessly borrowed from
# http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app/3851333#3851333
import os
import sys
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
settings.configure(
DEBUG=True,
DATABASES={
'default': {
'ENGINE':
'django.db.backends.sqlite3',
},
},
USE_TZ=True,
ROOT_URLCONF='oahapi.oahapi.urls',
INSTALLED_APPS=('ratechecker',
'countylimits')
)
from django.test.simple import DjangoTestSuiteRunner
test_runner = DjangoTestSuiteRunner(verbosity=1)
failures = test_runner.run_tests(['ratechecker', 'countylimits', 'mortgageinsurance'], verbosity=1)
if failures:
sys.exit(failures)
| # Shamelessly borrowed from
# http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app/3851333#3851333
import os
import sys
from django.conf import settings
DIRNAME = os.path.dirname(__file__)
settings.configure(
DEBUG=True,
DATABASES={
'default': {
'ENGINE':
'django.db.backends.sqlite3',
},
},
USE_TZ=True,
ROOT_URLCONF='oahapi.oahapi.urls',
INSTALLED_APPS=('ratechecker',
'countylimits',
'mortgageinsurance',
)
)
from django.test.simple import DjangoTestSuiteRunner
test_runner = DjangoTestSuiteRunner(verbosity=1)
failures = test_runner.run_tests(['ratechecker', 'countylimits', 'mortgageinsurance'], verbosity=1)
if failures:
sys.exit(failures)
| Add mortgage insurance in apps list | Add mortgage insurance in apps list
| Python | cc0-1.0 | fna/owning-a-home-api,amymok/owning-a-home-api,cfpb/owning-a-home-api |
da59d7481668a7133eebcd12b4d5ecfb655296a6 | test/test_blob_filter.py | test/test_blob_filter.py | """Test the blob filter."""
from pathlib import Path
from typing import Sequence, Tuple
from unittest.mock import MagicMock
import pytest
from git.index.typ import BlobFilter, StageType
from git.objects import Blob
from git.types import PathLike
# fmt: off
@pytest.mark.parametrize('paths, stage_type, path, expected_result', [
((Path("foo"),), 0, Path("foo"), True),
((Path("foo"),), 0, Path("foo/bar"), True),
((Path("foo/bar"),), 0, Path("foo"), False),
((Path("foo"), Path("bar")), 0, Path("foo"), True),
])
# fmt: on
def test_blob_filter(paths: Sequence[PathLike], stage_type: StageType, path: PathLike, expected_result: bool) -> None:
"""Test the blob filter."""
blob_filter = BlobFilter(paths)
binsha = MagicMock(__len__=lambda self: 20)
blob: Blob = Blob(repo=MagicMock(), binsha=binsha, path=path)
stage_blob: Tuple[StageType, Blob] = (stage_type, blob)
result = blob_filter(stage_blob)
assert result == expected_result
| """Test the blob filter."""
from pathlib import Path
from typing import Sequence, Tuple
from unittest.mock import MagicMock
import pytest
from git.index.typ import BlobFilter, StageType
from git.objects import Blob
from git.types import PathLike
# fmt: off
@pytest.mark.parametrize('paths, path, expected_result', [
((Path("foo"),), Path("foo"), True),
((Path("foo"),), Path("foo/bar"), True),
((Path("foo/bar"),), Path("foo"), False),
((Path("foo"), Path("bar")), Path("foo"), True),
])
# fmt: on
def test_blob_filter(paths: Sequence[PathLike], path: PathLike, expected_result: bool) -> None:
"""Test the blob filter."""
blob_filter = BlobFilter(paths)
binsha = MagicMock(__len__=lambda self: 20)
stage_type: StageType = 0
blob: Blob = Blob(repo=MagicMock(), binsha=binsha, path=path)
stage_blob: Tuple[StageType, Blob] = (stage_type, blob)
result = blob_filter(stage_blob)
assert result == expected_result
| Remove stage type as parameter from blob filter test | Remove stage type as parameter from blob filter test
| Python | bsd-3-clause | gitpython-developers/GitPython,gitpython-developers/gitpython,gitpython-developers/GitPython,gitpython-developers/gitpython |
431ca4f2d44656ef9f97be50718712c6f3a0fa9b | qtawesome/tests/test_qtawesome.py | qtawesome/tests/test_qtawesome.py | r"""
Tests for QtAwesome.
"""
# Standard library imports
import subprocess
# Test Library imports
import pytest
# Local imports
import qtawesome as qta
from qtawesome.iconic_font import IconicFont
def test_segfault_import():
output_number = subprocess.call('python -c "import qtawesome '
'; qtawesome.icon()"', shell=True)
assert output_number == 0
def test_unique_font_family_name(qtbot):
"""
Test that each font used by qtawesome has a unique name. If this test
fails, this probably means that you need to rename the family name of
some fonts. Please see PR #98 for more details on why it is necessary and
on how to do this.
Regression test for Issue #107
"""
resource = qta._instance()
assert isinstance(resource, IconicFont)
prefixes = list(resource.fontname.keys())
assert prefixes
fontnames = set(resource.fontname.values())
assert fontnames
assert len(prefixes) == len(fontnames)
if __name__ == "__main__":
pytest.main()
| r"""
Tests for QtAwesome.
"""
# Standard library imports
import subprocess
import collections
# Test Library imports
import pytest
# Local imports
import qtawesome as qta
from qtawesome.iconic_font import IconicFont
def test_segfault_import():
output_number = subprocess.call('python -c "import qtawesome '
'; qtawesome.icon()"', shell=True)
assert output_number == 0
def test_unique_font_family_name(qtbot):
"""
Test that each font used by qtawesome has a unique name. If this test
fails, this probably means that you need to rename the family name of
some fonts. Please see PR #98 for more details on why it is necessary and
on how to do this.
Regression test for Issue #107
"""
resource = qta._instance()
assert isinstance(resource, IconicFont)
# Check that the fonts were loaded successfully.
fontnames = resource.fontname.values()
assert fontnames
# Check that qtawesome does not load fonts with duplicate family names.
duplicates = [fontname for fontname, count in
collections.Counter(fontnames).items() if count > 1]
assert not duplicates
if __name__ == "__main__":
pytest.main()
| Make the test more comprehensive. | Make the test more comprehensive.
| Python | mit | spyder-ide/qtawesome |
3d8ec94e61735b84c3b24b44d79fcd57611a93ee | mndeps.py | mndeps.py | #!/usr/bin/env python
# XXX: newer mininet version also has MinimalTopo
from mininet.topo import ( SingleSwitchTopo, LinearTopo,
SingleSwitchReversedTopo )
from mininet.topolib import TreeTopo
from mininet.util import buildTopo
import psycopg2
TOPOS = { 'linear': LinearTopo,
'reversed': SingleSwitchReversedTopo,
'single': SingleSwitchTopo,
'tree': TreeTopo,
'torus': TorusTopo }
def build(opts):
return buildTopo(TOPOS, opts)
| #!/usr/bin/env python
# XXX: newer mininet version also has MinimalTopo
from mininet.topo import ( SingleSwitchTopo, LinearTopo,
SingleSwitchReversedTopo )
from mininet.topolib import TreeTopo
from mininet.util import buildTopo
import psycopg2
TOPOS = { 'linear': LinearTopo,
'reversed': SingleSwitchReversedTopo,
'single': SingleSwitchTopo,
'tree': TreeTopo
}
def build(opts):
return buildTopo(TOPOS, opts)
| Fix bug after removing torus | Fix bug after removing torus
| Python | apache-2.0 | ravel-net/ravel,ravel-net/ravel |
8ac492be603f958a29bbc6bb5215d79ec469d269 | tests/test_init.py | tests/test_init.py | """Test the checkers"""
from nose.tools import ok_, eq_
from preflyt import check
CHECKERS = [
{"checker": "env", "name": "USER"}
]
BAD_CHECKERS = [
{"checker": "env", "name": "USER1231342dhkfgjhk2394dv09324jk12039csdfg01231"}
]
def test_everything():
"""Test the check method."""
good, results = check(CHECKERS)
ok_(good, results)
eq_(len(results), 1)
for field_name in ('check', 'success', 'message'):
ok_(field_name in results[0])
def test_everything_failure():
"""Test the check method."""
good, results = check(BAD_CHECKERS)
ok_(not good, results)
eq_(len(results), 1)
for field_name in ('check', 'success', 'message'):
ok_(field_name in results[0])
| """Test the checkers"""
from nose.tools import ok_, eq_
from preflyt import check
CHECKERS = [
{"checker": "env", "name": "PATH"}
]
BAD_CHECKERS = [
{"checker": "env", "name": "PATH1231342dhkfgjhk2394dv09324jk12039csdfg01231"}
]
def test_everything():
"""Test the check method."""
good, results = check(CHECKERS)
ok_(good, results)
eq_(len(results), 1)
for field_name in ('check', 'success', 'message'):
ok_(field_name in results[0])
def test_everything_failure():
"""Test the check method."""
good, results = check(BAD_CHECKERS)
ok_(not good, results)
eq_(len(results), 1)
for field_name in ('check', 'success', 'message'):
ok_(field_name in results[0])
| Update environment test to have cross platform support | Update environment test to have cross platform support
| Python | mit | humangeo/preflyt |
131fb74b0f399ad3abff5dcc2b09621cac1226e7 | config/nox_routing.py | config/nox_routing.py | from experiment_config_lib import ControllerConfig
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use NOX as our controller
command_line = "./nox_core -i ptcp:6633 routing"
controllers = [ControllerConfig(command_line, cwd="nox_classic/build/src", address="127.0.0.1", port=6633)]
dataplane_trace = "dataplane_traces/ping_pong_fat_tree.trace"
simulation_config = SimulationConfig(controller_configs=controllers,
dataplane_trace=dataplane_trace)
# Use a Fuzzer (already the default)
control_flow = Fuzzer(simulation_config, input_logger=InputLogger(),
check_interval=80,
invariant_check=InvariantChecker.check_connectivity)
| from experiment_config_lib import ControllerConfig
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
from sts.topology import MeshTopology
# Use NOX as our controller
command_line = "./nox_core -v -i ptcp:6633 sample_routing"
controllers = [ControllerConfig(command_line, cwd="nox_classic/build/src", address="127.0.0.1", port=6633)]
topology_class = MeshTopology
topology_params = "num_switches=4"
dataplane_trace = "dataplane_traces/ping_pong_same_subnet_4_switches.trace"
# dataplane_trace = "dataplane_traces/ping_pong_fat_tree.trace"
simulation_config = SimulationConfig(controller_configs=controllers,
topology_class=topology_class,
topology_params=topology_params,
dataplane_trace=dataplane_trace)
#simulation_config = SimulationConfig(controller_configs=controllers,
# dataplane_trace=dataplane_trace)
# Use a Fuzzer (already the default)
control_flow = Fuzzer(simulation_config, input_logger=InputLogger(),
check_interval=80,
invariant_check=InvariantChecker.check_connectivity)
| Update NOX config to use sample_routing | Update NOX config to use sample_routing
| Python | apache-2.0 | ucb-sts/sts,jmiserez/sts,jmiserez/sts,ucb-sts/sts |
96e86fb389d67d55bf6b4e0f3f0f318e75b532dd | kirppu/management/commands/accounting_data.py | kirppu/management/commands/accounting_data.py | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.utils.translation import activate
from kirppu.accounting import accounting_receipt
class Command(BaseCommand):
help = 'Dump accounting CSV to standard output'
def add_arguments(self, parser):
parser.add_argument('--lang', type=str, help="Change language, for example: en")
def handle(self, *args, **options):
if "lang" in options:
activate(options["lang"])
accounting_receipt(self.stdout)
| # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from django.utils.translation import activate
from kirppu.accounting import accounting_receipt
class Command(BaseCommand):
help = 'Dump accounting CSV to standard output'
def add_arguments(self, parser):
parser.add_argument('--lang', type=str, help="Change language, for example: en")
parser.add_argument('event', type=str, help="Event slug to dump data for")
def handle(self, *args, **options):
if "lang" in options:
activate(options["lang"])
from kirppu.models import Event
event = Event.objects.get(slug=options["event"])
accounting_receipt(self.stdout, event)
| Fix accounting data dump command. | Fix accounting data dump command.
| Python | mit | jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu |
019b4ed21eddaa176c9445f40f91dc0becad7b4a | towel/mt/forms.py | towel/mt/forms.py | """
Forms
=====
These three form subclasses will automatically add limitation by tenant
to all form fields with a ``queryset`` attribute.
.. warning::
If you customized the dropdown using ``choices`` you have to limit the
choices by the current tenant yourself.
"""
from django import forms
from towel import forms as towel_forms
from towel.utils import safe_queryset_and
def _process_fields(form, request):
for field in form.fields.values():
if getattr(field, 'queryset', None):
model = field.queryset.model
field.queryset = safe_queryset_and(
field.queryset,
model.objects.for_access(request.access),
)
class Form(forms.Form):
def __init__(self, *args, **kwargs):
self.request = kwargs.pop('request')
super(Form, self).__init__(*args, **kwargs)
_process_fields(self, self.request)
class ModelForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
self.request = kwargs.pop('request')
super(ModelForm, self).__init__(*args, **kwargs)
_process_fields(self, self.request)
class SearchForm(towel_forms.SearchForm):
def post_init(self, request):
self.request = request
_process_fields(self, self.request)
| """
Forms
=====
These three form subclasses will automatically add limitation by tenant
to all form fields with a ``queryset`` attribute.
.. warning::
If you customized the dropdown using ``choices`` you have to limit the
choices by the current tenant yourself.
"""
from django import forms
from towel import forms as towel_forms
from towel.utils import safe_queryset_and
def _process_fields(form, request):
for field in form.fields.values():
if hasattr(field, 'queryset'):
model = field.queryset.model
field.queryset = safe_queryset_and(
field.queryset,
model.objects.for_access(request.access),
)
class Form(forms.Form):
def __init__(self, *args, **kwargs):
self.request = kwargs.pop('request')
super(Form, self).__init__(*args, **kwargs)
_process_fields(self, self.request)
class ModelForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
self.request = kwargs.pop('request')
super(ModelForm, self).__init__(*args, **kwargs)
_process_fields(self, self.request)
class SearchForm(towel_forms.SearchForm):
def post_init(self, request):
self.request = request
_process_fields(self, self.request)
| Stop evaluating querysets when processing form fields | towel.mt: Stop evaluating querysets when processing form fields
| Python | bsd-3-clause | matthiask/towel,matthiask/towel,matthiask/towel,matthiask/towel |
fc076d4b390c8e28fceb9613b04423ad374930e5 | config/fuzz_pox_mesh.py | config/fuzz_pox_mesh.py | from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer, Interactive
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controller
command_line = ('''./pox.py --verbose openflow.debug ''' #sts.syncproto.pox_syncer '''
'''forwarding.l2_multi '''
#'''sts.util.socket_mux.pox_monkeypatcher '''
'''openflow.of_01 --address=__address__ --port=__port__''')
controllers = [ControllerConfig(command_line, cwd="betta")]
topology_class = MeshTopology
topology_params = "num_switches=2"
dataplane_trace = "dataplane_traces/ping_pong_same_subnet.trace"
simulation_config = SimulationConfig(controller_configs=controllers,
topology_class=topology_class,
topology_params=topology_params,
dataplane_trace=dataplane_trace,
multiplex_sockets=False)
control_flow = Fuzzer(simulation_config, check_interval=80,
halt_on_violation=False,
input_logger=InputLogger(),
invariant_check=InvariantChecker.check_connectivity)
#control_flow = Interactive(simulation_config, input_logger=InputLogger())
| from experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer, Interactive
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
# Use POX as our controller
command_line = ('''./pox.py --verbose sts.syncproto.pox_syncer '''
'''openflow.discovery forwarding.l2_multi '''
'''sts.util.socket_mux.pox_monkeypatcher '''
'''openflow.of_01 --address=__address__ --port=__port__''')
controllers = [ControllerConfig(command_line, cwd="pox", sync="tcp:localhost:18899")]
topology_class = MeshTopology
topology_params = "num_switches=2"
dataplane_trace = "dataplane_traces/ping_pong_same_subnet.trace"
simulation_config = SimulationConfig(controller_configs=controllers,
topology_class=topology_class,
topology_params=topology_params,
dataplane_trace=dataplane_trace,
multiplex_sockets=True)
control_flow = Fuzzer(simulation_config, check_interval=80,
halt_on_violation=False,
input_logger=InputLogger(),
invariant_check=InvariantChecker.check_loops)
#control_flow = Interactive(simulation_config, input_logger=InputLogger())
| Switch to normal pox instead of betta | Switch to normal pox instead of betta
| Python | apache-2.0 | jmiserez/sts,jmiserez/sts,ucb-sts/sts,ucb-sts/sts |
2f0920d932067a8935eb6e88cc855145ff3c08e2 | mne/realtime/tests/test_stim_client_server.py | mne/realtime/tests/test_stim_client_server.py | import threading
import time
import Queue
from mne.realtime import StimServer, StimClient
from nose.tools import assert_equal
def test_connection():
"""Test TCP/IP connection for StimServer <-> StimClient.
"""
# have to start a thread to simulate the effect of two
# different computers since stim_server.start() is designed to
# be a blocking method
trig_queue = Queue.Queue()
thread = threading.Thread(target=connect_client, args=(trig_queue,))
thread.daemon = True
thread.start()
with StimServer('localhost', port=4218) as stim_server:
stim_server.start()
# Check if data is ok
stim_server.add_trigger(20)
# the assert_equal must be in the test_connection() method
# Hence communication between threads is necessary
assert_equal(trig_queue.get(), 20)
def connect_client(trig_queue):
"""Helper method that instantiates the StimClient.
"""
# just wait till the main thread reaches stim_server.start()
time.sleep(0.1)
# instantiate StimClient
stim_client = StimClient('localhost', port=4218)
# wait a bit more for script to reach stim_server.add_trigger()
time.sleep(0.1)
trig_queue.put(stim_client.get_trigger())
| import threading
import time
import Queue
from mne.realtime import StimServer, StimClient
from nose.tools import assert_equal
def test_connection():
"""Test TCP/IP connection for StimServer <-> StimClient.
"""
# have to start a thread to simulate the effect of two
# different computers since stim_server.start() is designed to
# be a blocking method
trig_queue = Queue.Queue()
thread = threading.Thread(target=connect_client, args=(trig_queue,))
thread.daemon = True
thread.start()
with StimServer('localhost', port=4218) as stim_server:
stim_server.start()
# Check if data is ok
stim_server.add_trigger(20)
# the assert_equal must be in the test_connection() method
# Hence communication between threads is necessary
assert_equal(trig_queue.get(), 20)
def connect_client(trig_queue):
"""Helper method that instantiates the StimClient.
"""
# just wait till the main thread reaches stim_server.start()
time.sleep(1.)
# instantiate StimClient
stim_client = StimClient('localhost', port=4218)
# wait a bit more for script to reach stim_server.add_trigger()
time.sleep(1.)
trig_queue.put(stim_client.get_trigger())
| FIX : increase test timer for buildbot in realtime | FIX : increase test timer for buildbot in realtime
| Python | bsd-3-clause | teonlamont/mne-python,drammock/mne-python,rkmaddox/mne-python,ARudiuk/mne-python,wmvanvliet/mne-python,agramfort/mne-python,adykstra/mne-python,Eric89GXL/mne-python,agramfort/mne-python,alexandrebarachant/mne-python,ARudiuk/mne-python,Eric89GXL/mne-python,aestrivex/mne-python,jniediek/mne-python,rkmaddox/mne-python,bloyl/mne-python,larsoner/mne-python,cjayb/mne-python,adykstra/mne-python,kingjr/mne-python,olafhauk/mne-python,antiface/mne-python,dgwakeman/mne-python,mne-tools/mne-python,wmvanvliet/mne-python,pravsripad/mne-python,kingjr/mne-python,matthew-tucker/mne-python,pravsripad/mne-python,Teekuningas/mne-python,dgwakeman/mne-python,mne-tools/mne-python,drammock/mne-python,dimkal/mne-python,Teekuningas/mne-python,lorenzo-desantis/mne-python,trachelr/mne-python,nicproulx/mne-python,nicproulx/mne-python,Odingod/mne-python,larsoner/mne-python,cmoutard/mne-python,mne-tools/mne-python,effigies/mne-python,yousrabk/mne-python,jaeilepp/mne-python,jniediek/mne-python,kambysese/mne-python,kambysese/mne-python,kingjr/mne-python,matthew-tucker/mne-python,lorenzo-desantis/mne-python,olafhauk/mne-python,wmvanvliet/mne-python,antiface/mne-python,yousrabk/mne-python,leggitta/mne-python,wronk/mne-python,bloyl/mne-python,jmontoyam/mne-python,effigies/mne-python,drammock/mne-python,alexandrebarachant/mne-python,olafhauk/mne-python,jaeilepp/mne-python,Teekuningas/mne-python,dimkal/mne-python,andyh616/mne-python,leggitta/mne-python,cmoutard/mne-python,aestrivex/mne-python,jmontoyam/mne-python,andyh616/mne-python,pravsripad/mne-python,Odingod/mne-python,trachelr/mne-python,wronk/mne-python,cjayb/mne-python,larsoner/mne-python,teonlamont/mne-python |
ca75631f513c433c6024a2f00d045f304703a85d | webapp/tests/test_browser.py | webapp/tests/test_browser.py | import os
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.utils import override_settings
from . import DATA_DIR
class BrowserTest(TestCase):
def test_browser(self):
url = reverse('graphite.browser.views.browser')
response = self.client.get(url)
self.assertContains(response, 'Graphite Browser')
def test_header(self):
url = reverse('graphite.browser.views.header')
response = self.client.get(url)
self.assertContains(response, 'Graphite Browser Header')
@override_settings(INDEX_FILE=os.path.join(DATA_DIR, 'index'))
def test_search(self):
url = reverse('graphite.browser.views.search')
response = self.client.post(url)
self.assertEqual(response.content, '')
# simple query
response = self.client.post(url, {'query': 'collectd'})
self.assertEqual(response.content.split(',')[0],
'collectd.test.df-root.df_complex-free')
# No match
response = self.client.post(url, {'query': 'other'})
self.assertEqual(response.content, '')
# Multiple terms (OR)
response = self.client.post(url, {'query': 'midterm shortterm'})
self.assertEqual(response.content.split(','),
['collectd.test.load.load.midterm',
'collectd.test.load.load.shortterm'])
| import os
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.utils import override_settings
from . import DATA_DIR
class BrowserTest(TestCase):
def test_browser(self):
url = reverse('graphite.browser.views.browser')
response = self.client.get(url)
self.assertContains(response, 'Graphite Browser')
def test_header(self):
self.assertEqual(User.objects.count(), 0)
url = reverse('graphite.browser.views.header')
response = self.client.get(url)
self.assertContains(response, 'Graphite Browser Header')
# Graphite has created a default user
self.assertEqual(User.objects.get().username, 'default')
@override_settings(INDEX_FILE=os.path.join(DATA_DIR, 'index'))
def test_search(self):
url = reverse('graphite.browser.views.search')
response = self.client.post(url)
self.assertEqual(response.content, '')
# simple query
response = self.client.post(url, {'query': 'collectd'})
self.assertEqual(response.content.split(',')[0],
'collectd.test.df-root.df_complex-free')
# No match
response = self.client.post(url, {'query': 'other'})
self.assertEqual(response.content, '')
# Multiple terms (OR)
response = self.client.post(url, {'query': 'midterm shortterm'})
self.assertEqual(response.content.split(','),
['collectd.test.load.load.midterm',
'collectd.test.load.load.shortterm'])
| Add tests for making sure a user is dynamically created | Add tests for making sure a user is dynamically created
| Python | apache-2.0 | EinsamHauer/graphite-web-iow,bpaquet/graphite-web,Skyscanner/graphite-web,disqus/graphite-web,synedge/graphite-web,gwaldo/graphite-web,blacked/graphite-web,cosm0s/graphite-web,brutasse/graphite-web,blacked/graphite-web,bbc/graphite-web,gwaldo/graphite-web,Invoca/graphite-web,atnak/graphite-web,deniszh/graphite-web,dhtech/graphite-web,DanCech/graphite-web,Skyscanner/graphite-web,nkhuyu/graphite-web,jssjr/graphite-web,esnet/graphite-web,cgvarela/graphite-web,JeanFred/graphite-web,nkhuyu/graphite-web,graphite-project/graphite-web,bruce-lyft/graphite-web,bmhatfield/graphite-web,phreakocious/graphite-web,redice/graphite-web,EinsamHauer/graphite-web-iow,zBMNForks/graphite-web,kkdk5535/graphite-web,pu239ppy/graphite-web,krux/graphite-web,Invoca/graphite-web,jssjr/graphite-web,krux/graphite-web,edwardmlyte/graphite-web,Squarespace/graphite-web,EinsamHauer/graphite-web-iow,DanCech/graphite-web,bpaquet/graphite-web,phreakocious/graphite-web,bpaquet/graphite-web,cosm0s/graphite-web,axibase/graphite-web,lyft/graphite-web,atnak/graphite-web,graphite-server/graphite-web,axibase/graphite-web,Skyscanner/graphite-web,Invoca/graphite-web,kkdk5535/graphite-web,axibase/graphite-web,piotr1212/graphite-web,synedge/graphite-web,DanCech/graphite-web,SEJeff/graphite-web,SEJeff/graphite-web,graphite-server/graphite-web,pu239ppy/graphite-web,lfckop/graphite-web,cgvarela/graphite-web,DanCech/graphite-web,johnseekins/graphite-web,brutasse/graphite-web,Aloomaio/graphite-web,markolson/graphite-web,redice/graphite-web,penpen/graphite-web,axibase/graphite-web,cbowman0/graphite-web,bbc/graphite-web,mcoolive/graphite-web,lyft/graphite-web,nkhuyu/graphite-web,section-io/graphite-web,dhtech/graphite-web,ZelunZhang/graphite-web,bmhatfield/graphite-web,bpaquet/graphite-web,atnak/graphite-web,cgvarela/graphite-web,mcoolive/graphite-web,bmhatfield/graphite-web,edwardmlyte/graphite-web,nkhuyu/graphite-web,cosm0s/graphite-web,lyft/graphite-web,phreakocious/graphite-web,Squarespace/graphite-web,bbc/graphite-web,esnet/graphite-web,AICIDNN/graphite-web,dbn/graphite-web,JeanFred/graphite-web,JeanFred/graphite-web,SEJeff/graphite-web,markolson/graphite-web,Invoca/graphite-web,gwaldo/graphite-web,johnseekins/graphite-web,redice/graphite-web,goir/graphite-web,piotr1212/graphite-web,obfuscurity/graphite-web,cgvarela/graphite-web,bruce-lyft/graphite-web,jssjr/graphite-web,drax68/graphite-web,cosm0s/graphite-web,Invoca/graphite-web,mcoolive/graphite-web,g76r/graphite-web,kkdk5535/graphite-web,cybem/graphite-web-iow,cybem/graphite-web-iow,gwaldo/graphite-web,ZelunZhang/graphite-web,dhtech/graphite-web,Squarespace/graphite-web,phreakocious/graphite-web,criteo-forks/graphite-web,bmhatfield/graphite-web,Aloomaio/graphite-web,lfckop/graphite-web,johnseekins/graphite-web,atnak/graphite-web,SEJeff/graphite-web,section-io/graphite-web,edwardmlyte/graphite-web,bruce-lyft/graphite-web,drax68/graphite-web,phreakocious/graphite-web,redice/graphite-web,nkhuyu/graphite-web,deniszh/graphite-web,bbc/graphite-web,redice/graphite-web,Skyscanner/graphite-web,EinsamHauer/graphite-web-iow,JeanFred/graphite-web,johnseekins/graphite-web,goir/graphite-web,blacked/graphite-web,graphite-project/graphite-web,brutasse/graphite-web,graphite-project/graphite-web,zBMNForks/graphite-web,bpaquet/graphite-web,obfuscurity/graphite-web,piotr1212/graphite-web,synedge/graphite-web,criteo-forks/graphite-web,DanCech/graphite-web,deniszh/graphite-web,bpaquet/graphite-web,disqus/graphite-web,markolson/graphite-web,g76r/graphite-web,axibase/graphite-web,edwardmlyte/graphite-web,jssjr/graphite-web,graphite-server/graphite-web,criteo-forks/graphite-web,zBMNForks/graphite-web,dhtech/graphite-web,phreakocious/graphite-web,cybem/graphite-web-iow,AICIDNN/graphite-web,esnet/graphite-web,g76r/graphite-web,synedge/graphite-web,dbn/graphite-web,criteo-forks/graphite-web,Skyscanner/graphite-web,section-io/graphite-web,johnseekins/graphite-web,obfuscurity/graphite-web,JeanFred/graphite-web,DanCech/graphite-web,pu239ppy/graphite-web,lyft/graphite-web,section-io/graphite-web,krux/graphite-web,cosm0s/graphite-web,cbowman0/graphite-web,drax68/graphite-web,lfckop/graphite-web,lyft/graphite-web,goir/graphite-web,Squarespace/graphite-web,Aloomaio/graphite-web,blacked/graphite-web,lfckop/graphite-web,graphite-project/graphite-web,goir/graphite-web,synedge/graphite-web,Invoca/graphite-web,atnak/graphite-web,dbn/graphite-web,zBMNForks/graphite-web,bbc/graphite-web,goir/graphite-web,bmhatfield/graphite-web,g76r/graphite-web,disqus/graphite-web,krux/graphite-web,deniszh/graphite-web,dhtech/graphite-web,atnak/graphite-web,cybem/graphite-web-iow,dbn/graphite-web,disqus/graphite-web,johnseekins/graphite-web,mcoolive/graphite-web,AICIDNN/graphite-web,cgvarela/graphite-web,piotr1212/graphite-web,penpen/graphite-web,synedge/graphite-web,mcoolive/graphite-web,criteo-forks/graphite-web,zBMNForks/graphite-web,bruce-lyft/graphite-web,markolson/graphite-web,ZelunZhang/graphite-web,cbowman0/graphite-web,g76r/graphite-web,goir/graphite-web,penpen/graphite-web,lyft/graphite-web,JeanFred/graphite-web,cybem/graphite-web-iow,lfckop/graphite-web,ZelunZhang/graphite-web,cbowman0/graphite-web,gwaldo/graphite-web,cybem/graphite-web-iow,Squarespace/graphite-web,AICIDNN/graphite-web,SEJeff/graphite-web,kkdk5535/graphite-web,graphite-project/graphite-web,brutasse/graphite-web,piotr1212/graphite-web,cbowman0/graphite-web,krux/graphite-web,AICIDNN/graphite-web,esnet/graphite-web,Squarespace/graphite-web,deniszh/graphite-web,graphite-server/graphite-web,ZelunZhang/graphite-web,Skyscanner/graphite-web,blacked/graphite-web,dbn/graphite-web,kkdk5535/graphite-web,mcoolive/graphite-web,graphite-project/graphite-web,criteo-forks/graphite-web,EinsamHauer/graphite-web-iow,edwardmlyte/graphite-web,disqus/graphite-web,bruce-lyft/graphite-web,g76r/graphite-web,Aloomaio/graphite-web,drax68/graphite-web,pu239ppy/graphite-web,edwardmlyte/graphite-web,dbn/graphite-web,deniszh/graphite-web,drax68/graphite-web,lfckop/graphite-web,penpen/graphite-web,nkhuyu/graphite-web,section-io/graphite-web,pu239ppy/graphite-web,ZelunZhang/graphite-web,piotr1212/graphite-web,penpen/graphite-web,zBMNForks/graphite-web,obfuscurity/graphite-web,bruce-lyft/graphite-web,graphite-server/graphite-web,section-io/graphite-web,bmhatfield/graphite-web,jssjr/graphite-web,kkdk5535/graphite-web,graphite-server/graphite-web,esnet/graphite-web,cosm0s/graphite-web,obfuscurity/graphite-web,axibase/graphite-web,penpen/graphite-web,markolson/graphite-web,jssjr/graphite-web,Aloomaio/graphite-web,Aloomaio/graphite-web,cbowman0/graphite-web,pu239ppy/graphite-web,krux/graphite-web,disqus/graphite-web,brutasse/graphite-web,obfuscurity/graphite-web,redice/graphite-web,EinsamHauer/graphite-web-iow,AICIDNN/graphite-web,blacked/graphite-web,gwaldo/graphite-web,brutasse/graphite-web,cgvarela/graphite-web,drax68/graphite-web |
20bd5c16d5850f988e92c39db3ff041c37c83b73 | contract_sale_generation/models/abstract_contract.py | contract_sale_generation/models/abstract_contract.py | # Copyright 2017 Pesol (<http://pesol.es>)
# Copyright 2017 Angel Moya <angel.moya@pesol.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ContractAbstractContract(models.AbstractModel):
_inherit = "contract.abstract.contract"
sale_autoconfirm = fields.Boolean(string="Sale Autoconfirm")
@api.model
def _get_generation_type_selection(self):
res = super()._get_generation_type_selection()
res.append(("sale", "Sale"))
return res
| # Copyright 2017 Pesol (<http://pesol.es>)
# Copyright 2017 Angel Moya <angel.moya@pesol.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ContractAbstractContract(models.AbstractModel):
_inherit = "contract.abstract.contract"
sale_autoconfirm = fields.Boolean(string="Sale Autoconfirm")
@api.model
def _selection_generation_type(self):
res = super()._selection_generation_type()
res.append(("sale", "Sale"))
return res
| Align method on Odoo conventions | [14.0][IMP] contract_sale_generation: Align method on Odoo conventions
| Python | agpl-3.0 | OCA/contract,OCA/contract,OCA/contract |
6422f6057d43dfb5259028291991f39c5b81b446 | spreadflow_core/flow.py | spreadflow_core/flow.py | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from collections import defaultdict
class Flowmap(dict):
def __init__(self):
super(Flowmap, self).__init__()
self.decorators = []
self.annotations = {}
def graph(self):
result = defaultdict(set)
backlog = set()
processed = set()
for port_out, port_in in self.iteritems():
result[port_out].add(port_in)
backlog.add(port_in)
while len(backlog):
node = backlog.pop()
if node in processed:
continue
else:
processed.add(node)
try:
arcs = tuple(node.dependencies)
except AttributeError:
continue
for port_out, port_in in arcs:
result[port_out].add(port_in)
backlog.add(port_out)
backlog.add(port_in)
return result
| from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from collections import defaultdict, MutableMapping
class Flowmap(MutableMapping):
def __init__(self):
super(Flowmap, self).__init__()
self.annotations = {}
self.connections = {}
self.decorators = []
def __getitem__(self, key):
return self.connections[key]
def __setitem__(self, key, value):
self.connections[key] = value
def __delitem__(self, key):
del self.connections[key]
def __iter__(self):
return iter(self.connections)
def __len__(self):
return len(self.connections)
def graph(self):
result = defaultdict(set)
backlog = set()
processed = set()
for port_out, port_in in self.iteritems():
result[port_out].add(port_in)
backlog.add(port_in)
while len(backlog):
node = backlog.pop()
if node in processed:
continue
else:
processed.add(node)
try:
arcs = tuple(node.dependencies)
except AttributeError:
continue
for port_out, port_in in arcs:
result[port_out].add(port_in)
backlog.add(port_out)
backlog.add(port_in)
return result
| Refactor Flowmap into a MutableMapping | Refactor Flowmap into a MutableMapping
| Python | mit | spreadflow/spreadflow-core,znerol/spreadflow-core |
45810cb89a26a305df0724b0f27f6136744b207f | bookshop/bookshop/urls.py | bookshop/bookshop/urls.py | """bookshop URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
| """bookshop URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from books import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^admin/', admin.site.urls),
]
| Add a URL to urlpatterns for home page | Add a URL to urlpatterns for home page
| Python | mit | djangogirlstaipei/eshop,djangogirlstaipei/eshop,djangogirlstaipei/eshop,djangogirlstaipei/eshop |
64e515f87fa47f44ed8c18e9c9edc76fee49ce84 | 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=[
'PIL>=1.1.6',
'colormath>=1.0.8',
'numpy>=1.6.1',
],
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/larsyencken/Pillow/tarball/master#egg=Pillow-1.7.8',
],
license='ISC',
entry_points={
'console_scripts': [
'colorific = colorific:main',
],
},
)
| Use patched Pillow as a packaging dependency. | Use patched Pillow as a packaging dependency.
| Python | isc | 99designs/colorific |
4789e7d32bdec3afc6b76f20bf193a51410bbab1 | setup.py | setup.py | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='llvmcpy',
version='0.1.1',
description='Python bindings for LLVM auto-generated from the LLVM-C API',
long_description=long_description,
url='https://rev.ng/llvmcpy',
author='Alessandro Di Federico',
author_email='ale+llvmcpy@clearmind.me',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
keywords='llvm',
packages=['llvmcpy'],
install_requires=[
'cffi>=1.0.0',
'pycparser',
'appdirs',
'shutilwhich'
],
test_suite="llvmcpy.test.TestSuite",
)
| from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='llvmcpy',
version='0.1.2',
description='Python bindings for LLVM auto-generated from the LLVM-C API',
long_description=long_description,
url='https://rev.ng/llvmcpy',
author='Alessandro Di Federico',
author_email='ale+llvmcpy@clearmind.me',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
keywords='llvm',
packages=['llvmcpy'],
install_requires=[
'cffi>=1.0.0',
'pycparser',
'appdirs',
'shutilwhich'
],
test_suite="llvmcpy.test.TestSuite",
)
| Update version number to 0.1.2 | Update version number to 0.1.2
| Python | mit | revng/llvmcpy |
01bb927847de1a59adc97d9aa4bf745f4fa49ff5 | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.24',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
license='BSD',
description='todoist-python - The official Todoist Python API library',
long_description = read('README.md'),
install_requires=[
'requests',
],
# see here for complete list of classifiers
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=(
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
),
)
| # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.25',
packages=['todoist', 'todoist.managers'],
author='Doist Team',
author_email='info@todoist.com',
license='BSD',
description='todoist-python - The official Todoist Python API library',
long_description = read('README.md'),
install_requires=[
'requests',
],
# see here for complete list of classifiers
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=(
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
),
)
| Update the PyPI version to 0.2.25. | Update the PyPI version to 0.2.25.
| Python | mit | Doist/todoist-python |
12689fdabfb89453b7289ec70a5a2bd170ce8a8f | setup.py | setup.py | #!/usr/bin/env python
# encoding: utf-8
from setuptools import setup, find_packages
setup(
name='reddit2Kindle',
entry_points={
'console_scripts': [
'r2k = r2klib.cli:from_cli'
]
},
packages=find_packages(),
install_requires=[
'markdown2',
'praw',
'docopt',
'jinja2'
],
version='0.6.0',
author='Antriksh Yadav',
author_email='antrikshy@gmail.com',
url='http://www.antrikshy.com/projects/reddit2Kindle.htm',
description=(
'Compiles top posts from a specified subreddit for a specified time'
'period into a well-formatted Kindle book.'
),
long_description=(
'See http://www.github.com/Antrikshy/reddit2Kindle for instructions.'
'Requires KindleGen from Amazon to convert HTML result to .mobi for'
'Kindle.'
),
classifiers=[
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities',
'Development Status :: 4 - Beta',
'Intended Audience :: End Users/Desktop',
'Natural Language :: English',
'License :: OSI Approved :: MIT License'
],
)
| #!/usr/bin/env python
# encoding: utf-8
from setuptools import setup, find_packages
setup(
name='reddit2kindle',
entry_points={
'console_scripts': [
'r2k = r2klib.cli:from_cli'
]
},
packages=find_packages(),
install_requires=[
'markdown2',
'praw',
'docopt',
'jinja2'
],
version='0.6.0',
author='Antriksh Yadav',
author_email='antrikshy@gmail.com',
url='http://www.antrikshy.com/projects/reddit2kindle.htm',
description=(
'Compiles top posts from a specified subreddit for a specified time'
'period into a well-formatted Kindle book.'
),
long_description=(
'See http://www.github.com/Antrikshy/reddit2kindle for instructions.'
'Requires KindleGen from Amazon to convert HTML result to .mobi for'
'Kindle.'
),
classifiers=[
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities',
'Development Status :: 4 - Beta',
'Intended Audience :: End Users/Desktop',
'Natural Language :: English',
'License :: OSI Approved :: MIT License'
],
)
| Fix odd casing of reddit2kindle | Fix odd casing of reddit2kindle
| Python | mit | Antrikshy/reddit2Kindle |
995b771579b985bae2e27faaa1a7f861012edb25 | setup.py | setup.py | from setuptools import setup, find_packages
from foliant import __version__ as foliant_version
SHORT_DESCRIPTION = 'Modular, Markdown-based documentation generator that makes \
pdf, docx, html, and more.'
try:
with open('README.md', encoding='utf8') as readme:
LONG_DESCRIPTION = readme.read()
except FileNotFoundError:
LONG_DESCRIPTION = SHORT_DESCRIPTION
setup(
name='foliant',
version=foliant_version,
url='https://github.com/foliant-docs/foliant',
download_url='https://pypi.org/project/foliant',
license='MIT',
author='Konstantin Molchanov',
author_email='moigagoo@live.com',
description=SHORT_DESCRIPTION,
long_description=LONG_DESCRIPTION,
packages=find_packages(),
platforms='any',
install_requires=[
'PyYAML',
'cliar>=1.1.9',
'halo>=0.0.10',
'prompt_toolkit'
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Documentation',
'Topic :: Utilities',
'Programming Language :: Python :: 3.6'
],
entry_points={
'console_scripts': [
'foliant=foliant.cli:entry_point'
]
}
)
| from setuptools import setup, find_packages
from foliant import __version__ as foliant_version
SHORT_DESCRIPTION = 'Modular, Markdown-based documentation generator that makes \
pdf, docx, html, and more.'
try:
with open('README.md', encoding='utf8') as readme:
LONG_DESCRIPTION = readme.read()
except FileNotFoundError:
LONG_DESCRIPTION = SHORT_DESCRIPTION
setup(
name='foliant',
version=foliant_version,
url='https://github.com/foliant-docs/foliant',
download_url='https://pypi.org/project/foliant',
license='MIT',
author='Konstantin Molchanov',
author_email='moigagoo@live.com',
description=SHORT_DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
packages=find_packages(),
platforms='any',
install_requires=[
'PyYAML',
'cliar>=1.1.9',
'halo>=0.0.10',
'prompt_toolkit'
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Documentation',
'Topic :: Utilities',
'Programming Language :: Python :: 3.6'
],
entry_points={
'console_scripts': [
'foliant=foliant.cli:entry_point'
]
}
)
| Define content type Markdown for description. | Setup: Define content type Markdown for description.
| Python | mit | foliant-docs/foliant |
06646f5c73f886a93ed8507419a07fe69014f418 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name="django-twitter-bootstrap",
version="3.0.0",
packages=find_packages(),
package_data={
'twitter_bootstrap': [
'static/fonts/glyphicons-halflings-regular.*',
'static/js/*.js',
'static/less/*.less',
],
},
# metadata for upload to PyPI
author="Steven Cummings",
author_email="cummingscs@gmail.com",
description="Provides a Django app whose static folder contains Twitter Bootstrap assets",
license="MIT",
keywords="django app staticfiles twitter bootstrap",
url="https://github.com/estebistec/django-twitter-bootstrap",
download_url="http://pypi.python.org/pypi/django-twitter-bootstrap",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries',
]
)
| # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name="django-twitter-bootstrap",
version="3.0.0",
packages=find_packages(),
package_data={
'twitter_bootstrap': [
'static/fonts/glyphicons-halflings-regular.*',
'static/js/*.js',
'static/less/*.less',
],
},
# metadata for upload to PyPI
author="Steven Cummings",
author_email="cummingscs@gmail.com",
description="Provides a Django app whose static folder contains Twitter Bootstrap assets",
license="MIT",
keywords="django app staticfiles twitter bootstrap",
url="https://github.com/estebistec/django-twitter-bootstrap",
download_url="http://pypi.python.org/pypi/django-twitter-bootstrap",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Topic :: Software Development :: Libraries',
]
)
| Mark the package as Python 3 compatible. | Mark the package as Python 3 compatible.
| Python | mit | estebistec/django-twitter-bootstrap |
f09decf4d57e83c8bf13fab697bd9cfb3b983c22 | setup.py | setup.py | from setuptools import setup
with open('README.md') as file:
long_description = file.read()
setup(
name="chalupas-files",
version="0.1.0",
author="Antonin Messinger",
author_email="antonin.messinger@gmail.com",
description=" Convert any document",
long_description=long_description,
license="MIT License",
url="https://github.com/Antojitos/chalupas",
download_url="https://github.com/Antojitos/chalupas/archive/0.1.0.tar.gz",
keywords=["chalupas", "convert", "document"],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Flask',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
],
packages=['chalupas'],
install_requires=[
'Flask==0.10.1',
'pypandoc==1.1.3'
],
tests_require=[
'python-magic==0.4.11',
],
test_suite='tests.main'
)
| from setuptools import setup
with open('README.md') as file:
long_description = file.read()
setup(
name="chalupas-files",
version="0.1.0",
author="Antonin Messinger",
author_email="antonin.messinger@gmail.com",
description=" Convert any document",
long_description=long_description,
license="MIT License",
url="https://github.com/Antojitos/chalupas",
download_url="https://github.com/Antojitos/chalupas/archive/0.1.0.tar.gz",
keywords=["chalupas", "convert", "document"],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Flask',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
],
packages=['chalupas'],
install_requires=[
'Flask==0.12.3',
'pypandoc==1.1.3'
],
tests_require=[
'python-magic==0.4.11',
],
test_suite='tests.main'
)
| Upgrade to Flask 0.12.3 to fix CVE-2018-1000656 | Upgrade to Flask 0.12.3 to fix CVE-2018-1000656
| Python | mit | Antojitos/chalupas |
533eb2c759eb58cdc483b73dd40d8a4460f44e73 | setup.py | setup.py | #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-conference',
version='0.1',
description='A complete conference management system based on Python/Django.',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http://bitbucket.org/MasonM/django-conference/',
packages=find_packages(exclude=['example_project', 'example_project.*']),
include_package_data=True,
tests_require=[
'django>=1.6,<1.8',
'freezegun',
'unittest2',
],
test_suite='runtests.runtests',
install_requires=[
'django>=1.6,<1.8',
'setuptools',
],
zip_safe=False,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django',
'Programming Language :: Python',
'Programming Language :: JavaScript',
'Topic :: Internet :: WWW/HTTP :: Site Management'],
)
| #!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(name='django-conference',
version='0.1',
description='A complete conference management system based on Python/Django.',
license='BSD',
author='Mason Malone',
author_email='mason.malone@gmail.com',
url='http://bitbucket.org/MasonM/django-conference/',
packages=find_packages(exclude=['example_project', 'example_project.*']),
include_package_data=True,
tests_require=[
'django>=1.8,<1.9',
'freezegun',
'unittest2',
],
test_suite='runtests.runtests',
install_requires=[
'django>=1.8,<1.9',
'setuptools',
],
zip_safe=False,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django',
'Programming Language :: Python',
'Programming Language :: JavaScript',
'Topic :: Internet :: WWW/HTTP :: Site Management'],
)
| Update Django requirements for 1.8 | Update Django requirements for 1.8
| Python | bsd-3-clause | MasonM/hssonline-conference,MasonM/hssonline-conference,MasonM/hssonline-conference |
12e374c3797cee21d1cd47bba5e7bcd11439e50c | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name = 'dreamBeam',
version = '0.4',
description = 'Measurement equation framework for interferometry in Radio Astronomy.',
author = 'Tobia D. Carozzi',
author_email = 'tobia.carozzi@chalmers.se',
packages = find_packages(),
package_data = {'dreambeam.telescopes.LOFAR':
['share/*.cc','share/simmos/*.cfg','share/alignment/*.txt','data/*teldat.p']},
license = 'ISC',
classifiers = [
'Development Status :: 1 - Planning',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: ISC License',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Visualization'
],
install_requires=[
'numpy>=1.10',
'python-casacore',
'matplotlib',
'antpat'
],
scripts = ['scripts/pointing_jones.py']
)
| #!/usr/bin/env python
from setuptools import setup, find_packages
from dreambeam import __version__
setup(name='dreamBeam',
version=__version__,
description='Measurement equation framework for radio interferometry.',
author='Tobia D. Carozzi',
author_email='tobia.carozzi@chalmers.se',
packages=find_packages(),
package_data={'dreambeam.telescopes.LOFAR':
['share/*.cc', 'share/simmos/*.cfg',
'share/alignment/*.txt', 'data/*teldat.p']},
license='ISC',
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: ISC License',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Visualization'
],
install_requires=[
'numpy>=1.10',
'python-casacore',
'matplotlib',
'antpat'
],
entry_points={
'console_scripts': ['pointing_jones = scripts.pointing_jones:cli_main']
}
)
| Change to import version from package. | Change to import version from package.
| Python | isc | 2baOrNot2ba/dreamBeam,2baOrNot2ba/dreamBeam |
6adf64a1f39e9455851ba93fa6fcae8e02b0b3ea | setup.py | setup.py | from setuptools import setup, find_packages
import inbox
requirements = [
"click",
]
setup(
name="inbox",
version=inbox.__version__,
url='TODO',
description=inbox.__doc__,
author=inbox.__author__,
license=inbox.__license__,
long_description="TODO",
packages=find_packages(),
install_requires=requirements,
entry_points={
'console_scripts': [
'inbox = inbox.__main__:inbox'
]
},
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Customer Service",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Intended Audience :: Other Audience",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Internet",
"Topic :: Office/Business",
"Topic :: Utilities",
],
keywords='inbox github notifications',
)
| from setuptools import setup, find_packages
import inbox
requirements = [
"click",
"github3.py",
]
setup(
name="inbox",
version=inbox.__version__,
url='TODO',
description=inbox.__doc__,
author=inbox.__author__,
license=inbox.__license__,
long_description="TODO",
packages=find_packages(),
install_requires=requirements,
entry_points={
'console_scripts': [
'inbox = inbox.__main__:inbox'
]
},
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Customer Service",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Intended Audience :: Other Audience",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Internet",
"Topic :: Office/Business",
"Topic :: Utilities",
],
keywords='inbox github notifications',
)
| Add github3.py to the requirements | Add github3.py to the requirements
| Python | mit | k4nar/inbox |
edf32f4ac0527fbe97cd4ccf2a87f22e503e3111 | setup.py | setup.py | ###############################################################################
# Copyright 2015-2020 University of Florida. All rights reserved.
# This file is part of UF CTS-IT's NACCulator project.
# Use of this source code is governed by the license found in the LICENSE file.
###############################################################################
from setuptools import setup, find_packages
VERSION = "1.2.0"
setup(
name="nacculator",
version=VERSION,
author="Taeber Rapczak",
author_email="taeber@ufl.edu",
maintainer="UF CTS-IT",
maintainer_email="ctsit@ctsi.ufl.edu",
url="https://github.com/ctsit/nacculator",
license="BSD 2-Clause",
description="CSV to NACC's UDS3 format converter",
keywords=["REDCap", "NACC", "UDS", "Clinical data"],
download_url="https://github.com/ctsit/nacculator/releases/tag/" + VERSION,
package_dir={'nacc': 'nacc'},
packages=find_packages(),
entry_points={
"console_scripts": [
"redcap2nacc = nacc.redcap2nacc:main",
"nacculator_filters = nacc.run_filters:main"
]
},
install_requires=[
"cappy @ git+https://github.com/ctsit/cappy.git@2.0.0"
],
python_requires=">=3.6.0",
)
| ###############################################################################
# Copyright 2015-2020 University of Florida. All rights reserved.
# This file is part of UF CTS-IT's NACCulator project.
# Use of this source code is governed by the license found in the LICENSE file.
###############################################################################
from setuptools import setup, find_packages
VERSION = "1.2.0"
setup(
name="nacculator",
version=VERSION,
author="Taeber Rapczak",
author_email="taeber@ufl.edu",
maintainer="UF CTS-IT",
maintainer_email="ctsit@ctsi.ufl.edu",
url="https://github.com/ctsit/nacculator",
license="BSD 2-Clause",
description="CSV to NACC's UDS3 format converter",
keywords=["REDCap", "NACC", "UDS", "Clinical data"],
download_url="https://github.com/ctsit/nacculator/releases/tag/" + VERSION,
package_dir={'nacc': 'nacc'},
packages=find_packages(),
entry_points={
"console_scripts": [
"redcap2nacc = nacc.redcap2nacc:main",
"nacculator_filters = nacc.run_filters:main"
]
},
dependency_links=[
"git+https://github.com/ctsit/cappy.git@2.0.0#egg=cappy-2.0.0"
],
install_requires=[
"cappy==2.0.0"
],
python_requires=">=3.6.0",
)
| Modify cappy dependency to work with Python 3.8 | Modify cappy dependency to work with Python 3.8
| Python | bsd-2-clause | ctsit/nacculator,ctsit/nacculator,ctsit/nacculator |
5beb443d4c9cf834be03ff33a2fb01605f8feb80 | pyof/v0x01/symmetric/hello.py | pyof/v0x01/symmetric/hello.py | """Defines Hello message."""
# System imports
# Third-party imports
from pyof.foundation.base import GenericMessage
from pyof.v0x01.common.header import Header, Type
__all__ = ('Hello',)
# Classes
class Hello(GenericMessage):
"""OpenFlow Hello Message.
This message does not contain a body beyond the OpenFlow Header.
"""
header = Header(message_type=Type.OFPT_HELLO, length=8)
| """Defines Hello message."""
# System imports
# Third-party imports
from pyof.foundation.base import GenericMessage
from pyof.foundation.basic_types import BinaryData
from pyof.v0x01.common.header import Header, Type
__all__ = ('Hello',)
# Classes
class Hello(GenericMessage):
"""OpenFlow Hello Message.
This message does not contain a body beyond the OpenFlow Header.
"""
header = Header(message_type=Type.OFPT_HELLO, length=8)
elements = BinaryData()
| Add optional elements in v0x01 Hello | Add optional elements in v0x01 Hello
For spec compliance. Ignore the elements as they're not used.
Fix #379
| Python | mit | kytos/python-openflow |
69386a024e461a7b4a46f7c68d4512e0c7d4f277 | setup.py | setup.py | from setuptools import setup
setup(
name='xwing',
version='0.0.1.dev0',
url='https://github.com/victorpoluceno/xwing',
license='ISC',
description='Xwing is a Python library writen using that help '
'to distribute connect to a single port to other process',
author='Victor Poluceno',
author_email='victorpoluceno@gmail.com',
packages=['xwing'],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Distributed Computing',
'Topic :: System :: Networking',
],
scripts=['bin/xwing']
)
| from setuptools import setup
setup(
name='xwing',
version='0.0.1.dev0',
url='https://github.com/victorpoluceno/xwing',
license='ISC',
description='Xwing is a Python library writen using that help '
'to distribute connect to a single port to other process',
author='Victor Poluceno',
author_email='victorpoluceno@gmail.com',
packages=['xwing'],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
install_requires=['attrs==16.2.0'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Distributed Computing',
'Topic :: System :: Networking',
],
scripts=['bin/xwing']
)
| Add attrs as project requirement | chore: Add attrs as project requirement
| Python | isc | victorpoluceno/xwing |
a185f70b64986b2e98457e18b0a420cf2b97688b | setup.py | setup.py | from setuptools import find_packages
from distutils.core import setup
setup(
name='skipper',
version='0.0.1',
url='http://github.com/Stratoscale/skipper',
author='Adir Gabai',
author_mail='adir@stratoscale.com',
packages=find_packages(include=['skipper*']),
data_files=[
('/etc/bash_completion.d', ['data/skipper-complete.sh']),
],
entry_points={
'console_scripts': [
'skipper = skipper.main:main',
],
},
install_requires=[
'PyYAML>=3.11',
'click>=6.6',
'requests>=2.10.0',
'tabulate>=0.7.5',
]
)
| import os
from setuptools import find_packages
from distutils.core import setup
data_files = []
# Add bash completion script in case we are running as root
if os.getuid() == 0:
data_files=[
('/etc/bash_completion.d', ['data/skipper-complete.sh'])
]
setup(
name='skipper',
version='0.0.1',
url='http://github.com/Stratoscale/skipper',
author='Adir Gabai',
author_mail='adir@stratoscale.com',
packages=find_packages(include=['skipper*']),
data_files=data_files,
entry_points={
'console_scripts': [
'skipper = skipper.main:main',
],
},
install_requires=[
'PyYAML>=3.11',
'click>=6.6',
'requests>=2.10.0',
'tabulate>=0.7.5',
]
)
| Install bash completion script only when running the installation script as root. This is also a workaround for a bug that prevents tox from install the above script while creating the virtual environment. | Install bash completion script only when running the installation script
as root. This is also a workaround for a bug that prevents tox from install the
above script while creating the virtual environment.
| Python | apache-2.0 | Stratoscale/skipper,Stratoscale/skipper |
6ea8a4b07139460e89c6208cf08e195e9b8483ba | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt==0.6.2',
'APScheduler==3.0.2',
'pyliblzma==0.5.3',
'azure==0.11.0',
'python-dateutil==2.1'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
| try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from azurectl.version import __VERSION__
config = {
'description': 'Manage Azure PubCloud Service',
'author': 'PubCloud Development team',
'url': 'https://github.com/SUSE/azurectl',
'download_url': 'https://github.com/SUSE/azurectl',
'author_email': 'public-cloud-dev@susecloud.net',
'version': __VERSION__,
'install_requires': [
'docopt==0.6.2',
'APScheduler==3.0.2',
'pyliblzma==0.5.3',
'azure==0.11.1',
'python-dateutil==2.1'
],
'packages': ['azurectl'],
'entry_points': {
'console_scripts': ['azurectl=azurectl.azurectl:main'],
},
'name': 'azurectl'
}
setup(**config)
| Increment azure-sdk dependency to match version in OBS. | Increment azure-sdk dependency to match version in OBS.
| Python | apache-2.0 | SUSE/azurectl,SUSE/azurectl,SUSE/azurectl |
7b5794132f3f1e93c9dda3bb332a6594fb369018 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = "django-waitinglist",
version = "1.0b8",
author = "Brian Rosner",
author_email = "brosner@gmail.com",
description = "a Django waiting list app for running a private beta with cohorts support",
long_description = open("README.rst").read(),
license = "MIT",
url = "http://github.com/pinax/django-waitinglist",
packages = find_packages(),
install_requires = [
"django-appconf==0.5",
],
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
) | from setuptools import setup, find_packages
setup(
name = "django-waitinglist",
version = "1.0b9",
author = "Brian Rosner",
author_email = "brosner@gmail.com",
description = "a Django waiting list app for running a private beta with cohorts support",
long_description = open("README.rst").read(),
license = "MIT",
url = "http://github.com/pinax/django-waitinglist",
packages = find_packages(),
package_data = {"waitinglist": ["waitinglist/templates/*"]},
install_requires = [
"django-appconf==0.5",
],
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Framework :: Django",
]
) | Fix packaging (again) - 1.0b9 | Fix packaging (again) - 1.0b9
| Python | mit | pinax/django-waitinglist,pinax/django-waitinglist |
1423085230a010b5a96ce9eaf63abeb9e5af58a4 | setup.py | setup.py | import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Utility function to read the README file, used for the long desc.
def read(fn):
return open(os.path.join(os.path.dirname(__file__), fn)).read()
setup(
name='planet_alignment',
version='1.0.0',
packages=[
'planet_alignment',
'planet_alignment.app',
'planet_alignment.cmd',
'planet_alignment.config',
'planet_alignment.data',
'planet_alignment.mgr',
'planet_alignment.plugins',
'planet_alignment.test',
'planet_alignment.utils'
],
url='https://github.com/paulfanelli/planet_alignment.git',
license='MIT',
author='Paul Fanelli',
author_email='paul.fanelli@gmail.com',
description='Planet Alignment program',
long_description=read('README'),
install_requires=['bunch', 'zope.interface', 'PyYAML'],
tests_require=['pytest'],
entry_points={
'console_scripts': [
'planet_alignment = planet_alignment.__main__:main'
]
},
include_package_data=True
)
| import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Utility function to read the README file, used for the long desc.
def read(fn):
return open(os.path.join(os.path.dirname(__file__), fn)).read()
setup(
name='planet_alignment',
version='1.0.0',
packages=[
'planet_alignment',
'planet_alignment.app',
'planet_alignment.cmd',
'planet_alignment.config',
'planet_alignment.data',
'planet_alignment.mgr',
'planet_alignment.plugins',
'planet_alignment.test',
'planet_alignment.utils'
],
url='https://github.com/paulfanelli/planet_alignment.git',
license='MIT',
author='Paul Fanelli',
author_email='paul.fanelli@gmail.com',
description='Planet Alignment program',
long_description=read('README'),
install_requires=['bunch', 'zope.interface', 'PyYAML'],
tests_require=['pytest'],
entry_points={
'console_scripts': [
'planet_alignment = planet_alignment.__main__:main'
]
},
include_package_data=True,
data_files=[
('/etc/planet_alignment', ['align1.py', 'align2.py', 'system.yaml'])
]
)
| Add a data_files option to install the config and plugin files in /etc/planet_alignment. | Add a data_files option to install the config and plugin files in /etc/planet_alignment.
| Python | mit | paulfanelli/planet_alignment |
3339b9e865adf7a2fcfc27d3c9390724ca82086d | setup.py | setup.py | # -*- coding: utf-8 -*-
from distutils.core import setup
from setuptools import find_packages
with open('README.rst', 'rb') as readme:
readme_text = readme.read().decode('utf-8')
setup(
name='django-bootstrap-pagination',
version='1.5.2',
keywords="django bootstrap pagination templatetag",
author=u'Jason McClellan',
author_email='jason@jasonmccllelan.net',
packages=find_packages(),
url='https://github.com/jmcclell/django-bootstrap-pagination',
license='MIT licence, see LICENCE',
description='Render Django Page objects as Bootstrap 3.x Pagination compatible HTML',
long_description=readme_text,
zip_safe=False,
include_package_data=True,
classifiers=[
"Development Status :: 3 - Alpha",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
]
)
| # -*- coding: utf-8 -*-
from distutils.core import setup
from setuptools import find_packages
with open('README.rst', 'rb') as readme:
readme_text = readme.read().decode('utf-8')
setup(
name='django-bootstrap-pagination',
version='1.6.0',
keywords="django bootstrap pagination templatetag",
author=u'Jason McClellan',
author_email='jason@jasonmccllelan.net',
packages=find_packages(),
url='https://github.com/jmcclell/django-bootstrap-pagination',
license='MIT licence, see LICENCE',
description='Render Django Page objects as Bootstrap 3.x Pagination compatible HTML',
long_description=readme_text,
zip_safe=False,
include_package_data=True,
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Framework :: Django",
"Framework :: Django :: 1.4",
"Framework :: Django :: 1.5",
"Framework :: Django :: 1.6",
"Framework :: Django :: 1.7",
"Framework :: Django :: 1.8",
"Framework :: Django :: 1.9",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
]
)
| Prepare for 1.6.0 on pypi | Prepare for 1.6.0 on pypi
| Python | mit | jmcclell/django-bootstrap-pagination,jmcclell/django-bootstrap-pagination |
3b590e0a9719a9cbec6b75a591fa92f5178cdc4e | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import sys
version = '0.1.2b2'
requires = [
'eduid-common[webapp]>=0.2.1b7',
'Flask==0.10.1',
]
test_requires = [
'WebTest==2.0.18',
'mock==1.0.1',
]
testing_extras = test_requires + [
'nose==1.2.1',
'coverage==3.6',
'nosexcover==1.0.8',
]
setup(
name='eduid-webapp',
version=version,
license='bsd',
url='https://www.github.com/eduID/',
author='NORDUnet A/S',
author_email='',
description='authentication service for eduID',
classifiers=[
'Framework :: Flask',
],
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['eduid_webapp'],
zip_safe=False,
include_package_data=True,
install_requires=requires,
tests_require=test_requires,
extras_require={
'testing': testing_extras,
},
)
| #!/usr/bin/env python
from setuptools import setup, find_packages
import sys
version = '0.1.2b3'
requires = [
'eduid-common[webapp]>=0.2.1b9',
'Flask==0.10.1',
]
test_requires = [
'WebTest==2.0.18',
'mock==1.0.1',
]
testing_extras = test_requires + [
'nose==1.2.1',
'coverage==3.6',
'nosexcover==1.0.8',
]
setup(
name='eduid-webapp',
version=version,
license='bsd',
url='https://www.github.com/eduID/',
author='NORDUnet A/S',
author_email='',
description='authentication service for eduID',
classifiers=[
'Framework :: Flask',
],
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['eduid_webapp'],
zip_safe=False,
include_package_data=True,
install_requires=requires,
tests_require=test_requires,
extras_require={
'testing': testing_extras,
},
)
| Bump version and eduid_common requirement | Bump version and eduid_common requirement
| Python | bsd-3-clause | SUNET/eduid-webapp,SUNET/eduid-webapp,SUNET/eduid-webapp |
e00ebeaa185ed2fc50c68eddd282194d8633a89c | setup.py | setup.py | __doc__ = """
Manipulate audio with an simple and easy high level interface.
See the README file for details, usage info, and a list of gotchas.
"""
from setuptools import setup
setup(
name='pydub',
version='0.16.3',
author='James Robert',
author_email='jiaaro@gmail.com',
description='Manipulate audio with an simple and easy high level interface',
license='MIT',
keywords='audio sound high-level',
url='http://pydub.com',
packages=['pydub'],
long_description=__doc__,
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Sound/Audio :: Analysis",
"Topic :: Multimedia :: Sound/Audio :: Conversion",
"Topic :: Multimedia :: Sound/Audio :: Editors",
"Topic :: Multimedia :: Sound/Audio :: Mixers",
"Topic :: Software Development :: Libraries",
'Topic :: Utilities',
]
)
| __doc__ = """
Manipulate audio with an simple and easy high level interface.
See the README file for details, usage info, and a list of gotchas.
"""
from setuptools import setup
setup(
name='pydub',
version='0.16.4',
author='James Robert',
author_email='jiaaro@gmail.com',
description='Manipulate audio with an simple and easy high level interface',
license='MIT',
keywords='audio sound high-level',
url='http://pydub.com',
packages=['pydub'],
long_description=__doc__,
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Sound/Audio :: Analysis",
"Topic :: Multimedia :: Sound/Audio :: Conversion",
"Topic :: Multimedia :: Sound/Audio :: Editors",
"Topic :: Multimedia :: Sound/Audio :: Mixers",
"Topic :: Software Development :: Libraries",
'Topic :: Utilities',
]
)
| Increment version for 24-bit wav bug fix | Increment version for 24-bit wav bug fix | Python | mit | jiaaro/pydub |
41570584ec50017d86e319be132420b81feed671 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name="htmlgen",
version="2.0.0",
description="HTML 5 Generator",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Sebastian Rittau",
author_email="srittau@rittau.biz",
url="https://github.com/srittau/python-htmlgen",
packages=["htmlgen", "test_htmlgen"],
package_data={"htmlgen": ["*.pyi", "py.typed"]},
python_requires=">=3.5",
tests_require=["asserts >= 0.8.0, < 0.11"],
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Internet :: WWW/HTTP :: WSGI",
"Topic :: Text Processing :: Markup :: HTML",
],
)
| #!/usr/bin/env python
from setuptools import setup
setup(
name="htmlgen",
version="2.0.0",
description="HTML 5 Generator",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Sebastian Rittau",
author_email="srittau@rittau.biz",
url="https://github.com/srittau/python-htmlgen",
packages=["htmlgen", "test_htmlgen"],
package_data={"htmlgen": ["*.pyi", "py.typed"]},
python_requires=">=3.5",
tests_require=["asserts >= 0.8.0, < 0.11"],
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Internet :: WWW/HTTP :: WSGI",
"Topic :: Text Processing :: Markup :: HTML",
],
)
| Add Python 3.8 to trove classifiers | Add Python 3.8 to trove classifiers
| Python | mit | srittau/python-htmlgen |
5d9c602a07e329f135c8e1f4c0acc0cba0efd148 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.md') as readme_file:
readme = readme_file.read()
with open('HISTORY.md') as history_file:
history = history_file.read().replace('.. :changelog:', '')
requirements = [
# TODO: put package requirements here
]
test_requirements = [
# TODO: put package test requirements here
]
setup(
name='xyvio',
version='0.1.4',
description="Basic Url Shortener",
long_description=readme + '\n\n' + history,
author="Marcos Hernández",
author_email='marcoslhc@gmail.com',
url='https://github.com/marcoslhc/xyvio',
packages=[
'xyvio',
],
package_dir={'xyvio':
'xyvio'},
include_package_data=True,
install_requires=requirements,
license="ISCL",
zip_safe=False,
keywords='xyvio',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
test_suite='tests',
tests_require=test_requirements
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.md') as readme_file:
readme = readme_file.read()
with open('HISTORY.md') as history_file:
history = history_file.read().replace('.. :changelog:', '')
requirements = [
# TODO: put package requirements here
]
test_requirements = [
# TODO: put package test requirements here
]
setup(
name='xyvio',
version='0.1.4',
description="Basic Url Shortener",
long_description=readme + '\n\n' + history,
author="Marcos Hernández",
author_email='marcoslhc@gmail.com',
url='https://github.com/marcoslhc/xyvio',
packages=[
'xyvio',
],
package_dir={'xyvio':
'xyvio'},
include_package_data=True,
install_requires=requirements,
license="ISCL",
zip_safe=False,
keywords='xyvio',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
test_suite='tests',
tests_require=test_requirements
)
| REmove python 3 (not ready yet) | REmove python 3 (not ready yet)
| Python | isc | marcoslhc/xyvio,marcoslhc/xyvio,marcoslhc/xyvio |
c9f8b832761525c2f04a71515b743be87f2e4a58 | setup.py | setup.py | from distutils.core import setup
setup(name='q', version='2.3', py_modules=['q'],
description='Quick-and-dirty debugging output for tired programmers',
author='Ka-Ping Yee', author_email='ping@zesty.ca',
license='Apache License 2.0',
url='http://github.com/zestyping/q', classifiers=[
'Programming Language :: Python',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License'
])
| from distutils.core import setup
setup(name='q', version='2.4', py_modules=['q'],
description='Quick-and-dirty debugging output for tired programmers',
author='Ka-Ping Yee', author_email='ping@zesty.ca',
license='Apache License 2.0',
url='http://github.com/zestyping/q', classifiers=[
'Programming Language :: Python',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License'
])
| Advance PyPI version to 2.4. | Advance PyPI version to 2.4.
| Python | apache-2.0 | zestyping/q |
699cd767551744adf3fcff4862ed754496782526 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='clize',
version='3.0a2',
description='Command-line argument parsing for Python, without the effort',
license='MIT',
url='https://github.com/epsy/clize',
author='Yann Kaiser',
author_email='kaiser.yann@gmail.com',
install_requires=['six', 'sigtools >= 0.1b1'],
extras_require={
':python_version in "2.6"': ['ordereddict'],
},
packages=('clize', 'clize.extra'),
test_suite='clize.tests',
keywords=[
'CLI', 'options', 'arguments', 'getopts', 'getopt', 'argparse',
'introspection', 'flags', 'decorator', 'subcommands',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
],
)
| #!/usr/bin/env python
from setuptools import setup
setup(
name='clize',
version='3.0a2',
description='Command-line argument parsing for Python, without the effort',
license='MIT',
url='https://github.com/epsy/clize',
author='Yann Kaiser',
author_email='kaiser.yann@gmail.com',
install_requires=['six', 'sigtools >= 0.1b1'],
extras_require={
':python_version in "2.6"': ['ordereddict'],
},
packages=('clize', 'clize.extra'),
test_suite='clize.tests',
keywords=[
'CLI', 'options', 'arguments', 'getopts', 'getopt', 'argparse',
'introspection', 'flags', 'decorator', 'subcommands',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
],
)
| Fix "Python :: 2" being listed twice in pypi classifiers | Fix "Python :: 2" being listed twice in pypi classifiers
| Python | mit | epsy/clize |
da32f549ef882680484a20084d5cfa5f7106f5e7 | setup.py | setup.py | from setuptools import setup
description = 'RDFLib SPARQLStore and SPARQLUpdateStore implementation for VIVO.'
setup(
name = 'vivo-rdflib-sparqlstore',
version = '0.0.1',
url = 'https://github.com/lawlesst/rdflib-vivo-sparqlstore',
author = 'Ted Lawless',
author_email = 'lawlesst@gmail.com',
py_modules = ['vstore',],
scripts = ['vstore.py'],
description = description,
install_requires=[
'rdflib>=4.2',
'click'
],
entry_points='''
[console_scripts]
vivoUpdate=vivoUpdate:process
'''
)
| from setuptools import setup
description = 'RDFLib SPARQLStore and SPARQLUpdateStore implementation for VIVO.'
with open('requirements.txt') as f:
required = f.read().splitlines()
setup(
name = 'vivo-rdflib-sparqlstore',
version = '0.0.1',
url = 'https://github.com/lawlesst/rdflib-vivo-sparqlstore',
author = 'Ted Lawless',
author_email = 'lawlesst@gmail.com',
py_modules = ['vstore', 'vivoUpdate'],
scripts = ['vstore.py'],
description = description,
install_requires=required,
entry_points='''
[console_scripts]
vivoUpdate=vivoUpdate:process
'''
)
| Read requirements. Add vivoUpdate to modules. | Read requirements. Add vivoUpdate to modules.
| Python | mit | lawlesst/vivo-rdflib-sparqlstore |
9a0adb5fc4d07aa4ec4d725e1ddc9b651e622fce | setup.py | setup.py | """Model-like encapsulation of big dict structure (like JSON data)."""
from setuptools import setup, find_packages
setup(
name='barrel',
version='0.1.3',
description='python interface to reaktor API',
long_description=__doc__,
license='BSD',
author='txtr web team',
author_email='web-dev@txtr.com',
url='https://github.com/txtr/barrel/',
packages=find_packages(),
platforms='any',
install_requires=['blinker', 'iso8601', 'holon', ],
dependency_links=[
'https://github.com/txtr/holon/zipball/0.0.5#egg=holon',
]
)
| """Model-like encapsulation of big dict structure (like JSON data)."""
from setuptools import setup, find_packages
setup(
name='barrel',
version='0.2.0',
description='Python stores for JSON data encapsulation',
long_description=__doc__,
license='BSD',
author='txtr web team',
author_email='web-dev@txtr.com',
url='https://github.com/txtr/barrel/',
packages=find_packages(),
platforms='any',
install_requires=['blinker', 'iso8601', 'holon', ],
dependency_links=[
'https://github.com/txtr/holon/zipball/0.0.5#egg=holon',
]
)
| Bump version to 0.2.0 and update description. | Bump version to 0.2.0 and update description.
| Python | bsd-2-clause | storecast/barrel |
b692e57988b279c8d2c4f88bf3995bc7b8bde355 | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
from setuptools import setup
extra = {}
if sys.version_info >= (3, 0):
extra["use_2to3"] = True
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='whack',
version='0.7.0',
description='Utility for installing binaries from source with a single command',
long_description=read("README"),
author='Michael Williamson',
url='http://github.com/mwilliamson/whack',
scripts=["scripts/whack"],
packages=['whack'],
install_requires=[
'mayo>=0.2.1,<0.3',
'requests>=1,<2',
"catchy>=0.2.0,<0.3",
"beautifulsoup4>=4.1.3,<5",
"spur.local>=0.3.6,<0.4",
"dodge>=0.1.4,<0.2",
"six>=1.4.1,<2.0"
],
**extra
)
| #!/usr/bin/env python
import os
import sys
from setuptools import setup
extra = {}
if sys.version_info >= (3, 0):
extra["use_2to3"] = True
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='whack',
version='0.7.0',
description='Utility for installing binaries from source with a single command',
long_description=read("README"),
author='Michael Williamson',
url='http://github.com/mwilliamson/whack',
scripts=["scripts/whack"],
packages=['whack'],
install_requires=[
'mayo>=0.2.1,<0.3',
'requests>=1,<2',
"catchy>=0.2.0,<0.3",
"beautifulsoup4>=4.1.3,<5",
"spur.local>=0.3.6,<0.4",
"dodge>=0.1.5,<0.2",
"six>=1.4.1,<2.0"
],
**extra
)
| Update dodge.py for better support for versions of Python other than 2.7 | Update dodge.py for better support for versions of Python other than 2.7
| Python | bsd-2-clause | mwilliamson/whack |
a1154d3c9788a6cbaeac4245d916f65dbd9adf12 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import restless
setup(
name='restless',
version=restless.VERSION,
description='A lightweight REST miniframework for Python.',
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
url='http://github.com/toastdriven/restless/',
long_description=open('README.rst', 'r').read(),
packages=[
'restless',
],
requires=[
'six(>=1.4.0)',
],
install_requires=[
'six>=1.4.0',
],
tests_require=[
'mock',
'tox',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Flask',
'Framework :: Pyramid',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Utilities'
],
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import restless
setup(
name='restless',
version=restless.VERSION,
description='A lightweight REST miniframework for Python.',
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
url='http://github.com/toastdriven/restless/',
long_description=open('README.rst', 'r').read(),
packages=[
'restless',
],
requires=[
'six(>=1.4.0)',
],
install_requires=[
'six>=1.4.0',
],
tests_require=[
'mock',
'tox',
],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Flask',
'Framework :: Pyramid',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Utilities'
],
)
| Add python_requires to help pip | Add python_requires to help pip
| Python | bsd-3-clause | toastdriven/restless |
57d6bcee40fe2df5ce6c21d93c26f34d7fdad672 | setup.py | setup.py | from setuptools import setup, find_packages
# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
import codecs
try:
codecs.lookup('mbcs')
except LookupError:
ascii = codecs.lookup('ascii')
func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs')
codecs.register(func)
setup(
name='Matador',
version='1.6.2',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = matador.management:execute_command',
],
},
options={
'build_scripts': {
'executable': '/usr/bin/env python3',
},
},
url='http://www.empiria.co.uk',
packages=find_packages(),
setup_requires=['pytest-runner'],
tests_require=['pytest'],
install_requires=['pyyaml', 'dulwich', 'openpyxl'],
license='The MIT License (MIT)',
description='Change management for Agresso systems',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Natural Language :: English'
]
)
| from setuptools import setup, find_packages
# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
import codecs
try:
codecs.lookup('mbcs')
except LookupError:
ascii = codecs.lookup('ascii')
func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs')
codecs.register(func)
setup(
name='Matador',
version='1.6.2',
author='Owen Campbell',
author_email='owen.campbell@empiria.co.uk',
entry_points={
'console_scripts': [
'matador = matador.management:execute_command',
],
},
options={
'build_scripts': {
'executable': '/usr/bin/env python3',
},
},
url='http://www.empiria.co.uk',
packages=find_packages(),
setup_requires=['pytest-runner'],
tests_require=['pytest'],
install_requires=['pyyaml', 'dulwich', 'openpyxl', 'cookiecutter'],
license='The MIT License (MIT)',
description='Change management for Agresso systems',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Natural Language :: English'
]
)
| Add cookiecutter to install reqs | Add cookiecutter to install reqs
| Python | mit | Empiria/matador |
33563cdda68bc12fc4038128f7833d837bd76af3 | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='tst',
version='0.9a18',
description='TST Student Testing',
url='http://github.com/daltonserey/tst',
author='Dalton Serey',
author_email='daltonserey@gmail.com',
license='MIT',
packages=find_packages(),
include_package_data=True,
scripts=[
'bin/runjava',
'bin/tst',
'commands/tst-test',
'commands/tst-completion',
'commands/tst-config',
'commands/tst-status',
'commands/tst-checkout',
'commands/tst-checkout2',
'commands/tst-commit',
'commands/tst-delete',
'commands/tst-login',
'commands/tst-new',
],
install_requires=[
'pyyaml',
'requests'
],
entry_points = {
'console_scripts': [
'tst=tst.commands:main',
]
},
zip_safe=False)
| from setuptools import setup, find_packages
setup(name='tst',
version='0.9a18',
description='TST Student Testing',
url='http://github.com/daltonserey/tst',
author='Dalton Serey',
author_email='daltonserey@gmail.com',
license='MIT',
packages=find_packages(),
include_package_data=True,
scripts=[
'bin/runjava',
'bin/tst',
'commands/tst-test',
'commands/tst-completion',
'commands/tst-config',
'commands/tst-status',
'commands/tst-checkout',
'commands/tst-checkout2',
'commands/tst-commit',
'commands/tst-delete',
'commands/tst-login',
'commands/tst-new',
],
install_requires=[
'pyyaml',
'requests',
'cachecontrol[filecache]'
],
entry_points = {
'console_scripts': [
'tst=tst.commands:main',
]
},
zip_safe=False)
| Add cache dependency to improve web requests | Add cache dependency to improve web requests
Also add filecache optional to control locks.
| Python | agpl-3.0 | daltonserey/tst,daltonserey/tst |
015d536e591d5af7e93f299e84504fe8a17f76b3 | tests.py | tests.py | import logging
import unittest
from StringIO import StringIO
class TestArgParsing(unittest.TestCase):
def setUp(self):
unittest.TestCase.setUp(self)
from script import parseargs
self.parseargs = parseargs
def test_parseargs(self):
opts, args = self.parseargs(["foo"])
self.assertEqual(opts.silent, False)
self.assertEqual(args, [])
class TestMain(unittest.TestCase):
def setUp(self):
unittest.TestCase.setUp(self)
root = logging.getLogger()
buffer = logging.handlers.BufferingHandler(100)
root.addHandler(buffer)
self.buffer = buffer.buffer
self.out = StringIO()
self.err = StringIO()
def main(self, *args, **kwargs):
from script import main
_kwargs = {
"out": self.out,
"err": self.err,
}
_kwargs.update(kwargs)
return main(*args, **_kwargs)
def test_main(self):
result = self.main(["foo"])
self.assertEqual(result, None)
self.assertEqual(self.buffer, [])
def test_main_verbose(self):
result = self.main(["foo", "-vv"])
self.assertEqual(result, None)
self.assertEqual(len(self.buffer), 1)
self.assertEqual(self.buffer[0].msg, "Ready to run")
| import logging
import unittest
from StringIO import StringIO
class TestArgParsing(unittest.TestCase):
def setUp(self):
unittest.TestCase.setUp(self)
from script import parseargs
self.parseargs = parseargs
def test_parseargs(self):
opts, args = self.parseargs(["foo"])
self.assertEqual(opts.silent, False)
self.assertEqual(args, [])
class TestMain(unittest.TestCase):
def setUp(self):
unittest.TestCase.setUp(self)
root = logging.getLogger()
buffer = logging.handlers.BufferingHandler(100)
root.addHandler(buffer)
self.buffer = buffer.buffer
self.out = StringIO()
self.err = StringIO()
def main(self, *args, **kwargs):
from script import main
_kwargs = {
"out": self.out,
"err": self.err,
}
_kwargs.update(kwargs)
return main(*args, **_kwargs)
def test_main(self):
result = self.main(["foo"])
self.assertEqual(result, None)
self.assertEqual(self.buffer, [])
def test_main_verbose(self):
result = self.main(["foo", "-vv"])
self.assertEqual(result, None)
self.assertEqual(len(self.buffer), 1)
self.assertEqual(self.buffer[0].msg, "Ready to run")
self.assertTrue("Ready to run" in self.err.getvalue())
| Test that log messages go to stderr. | Test that log messages go to stderr.
| Python | isc | whilp/python-script,whilp/python-script |
bc6001d6c25bdb5d83830e5a65fe5aea9fc1eb99 | ume/cmd.py | ume/cmd.py | # -*- coding: utf-8 -*-
import logging as l
import argparse
from ume.utils import (
save_mat,
dynamic_load,
)
def parse_args():
p = argparse.ArgumentParser(
description='CLI interface UME')
p.add_argument('--config', dest='inifile', default='config.ini')
subparsers = p.add_subparsers(
dest='subparser_name',
help='sub-commands for instant action')
f_parser = subparsers.add_parser('feature')
f_parser.add_argument('-n', '--name', type=str, required=True)
subparsers.add_parser('validation')
subparsers.add_parser('prediction')
return p.parse_args()
def run_feature(args):
klass = dynamic_load(args.name)
result = klass()
save_mat(args.name, result)
def main():
l.basicConfig(format='%(asctime)s %(message)s', level=l.INFO)
args = parse_args()
if args.subparser_name == 'validate':
pass
elif args.subparser_name == 'predict':
pass
elif args.subparser_name == 'feature':
run_feature(args)
else:
raise RuntimeError("No such sub-command.")
| # -*- coding: utf-8 -*-
import logging as l
import argparse
import os
from ume.utils import (
save_mat,
dynamic_load,
)
def parse_args():
p = argparse.ArgumentParser(
description='CLI interface UME')
p.add_argument('--config', dest='inifile', default='config.ini')
subparsers = p.add_subparsers(
dest='subparser_name',
help='sub-commands for instant action')
f_parser = subparsers.add_parser('feature')
f_parser.add_argument('-n', '--name', type=str, required=True)
i_parser = subparsers.add_parser('init')
subparsers.add_parser('validation')
subparsers.add_parser('prediction')
return p.parse_args()
def run_feature(args):
klass = dynamic_load(args.name)
result = klass()
save_mat(args.name, result)
def run_initialize(args):
pwd = os.getcwd()
os.makedirs(os.path.join(pwd, "data/input"))
os.makedirs(os.path.join(pwd, "data/output"))
os.makedirs(os.path.join(pwd, "data/working"))
os.makedirs(os.path.join(pwd, "note"))
os.makedirs(os.path.join(pwd, "trunk"))
def main():
l.basicConfig(format='%(asctime)s %(message)s', level=l.INFO)
args = parse_args()
if args.subparser_name == 'validate':
pass
elif args.subparser_name == 'predict':
pass
elif args.subparser_name == 'feature':
run_feature(args)
elif args.subparser_name == 'init':
run_initialize(args)
else:
raise RuntimeError("No such sub-command.")
| Add init function to create directories | Add init function to create directories
| Python | mit | smly/ume,smly/ume,smly/ume,smly/ume |
1b75fe13249eba8d951735ad422dc512b1e28caf | test/test_all_stores.py | test/test_all_stores.py | import store_fixture
import groundstation.store
class TestGitStore(store_fixture.StoreTestCase):
storeClass = groundstation.store.git_store.GitStore
| import os
import store_fixture
import groundstation.store
class TestGitStore(store_fixture.StoreTestCase):
storeClass = groundstation.store.git_store.GitStore
def test_creates_required_dirs(self):
for d in groundstation.store.git_store.GitStore.required_dirs:
path = os.path.join(self.path, d)
self.assertTrue(os.path.exists(path))
self.assertTrue(os.path.isdir(path))
| Add testcase for database initialization | Add testcase for database initialization
| Python | mit | richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation |
2f9a4029e909f71539f3b7326b867e27386c3378 | tests/interface_test.py | tests/interface_test.py | import unittest
import aiozmq
class ZmqTransportTests(unittest.TestCase):
def test_interface(self):
tr = aiozmq.ZmqTransport()
self.assertRaises(NotImplementedError, tr.write, [b'data'])
self.assertRaises(NotImplementedError, tr.abort)
self.assertRaises(NotImplementedError, tr.getsockopt, 1)
self.assertRaises(NotImplementedError, tr.setsockopt, 1, 2)
self.assertRaises(NotImplementedError, tr.set_write_buffer_limits)
self.assertRaises(NotImplementedError, tr.get_write_buffer_size)
self.assertRaises(NotImplementedError, tr.bind, 'endpoint')
self.assertRaises(NotImplementedError, tr.unbind, 'endpoint')
self.assertRaises(NotImplementedError, tr.bindings)
self.assertRaises(NotImplementedError, tr.connect, 'endpoint')
self.assertRaises(NotImplementedError, tr.disconnect, 'endpoint')
self.assertRaises(NotImplementedError, tr.connections)
self.assertRaises(NotImplementedError, tr.subscribe, b'filter')
self.assertRaises(NotImplementedError, tr.unsubscribe, b'filter')
self.assertRaises(NotImplementedError, tr.subscriptions)
class ZmqProtocolTests(unittest.TestCase):
def test_interface(self):
pr = aiozmq.ZmqProtocol()
self.assertIsNone(pr.msg_received((b'data',)))
| import unittest
import aiozmq
class ZmqTransportTests(unittest.TestCase):
def test_interface(self):
tr = aiozmq.ZmqTransport()
self.assertRaises(NotImplementedError, tr.write, [b'data'])
self.assertRaises(NotImplementedError, tr.abort)
self.assertRaises(NotImplementedError, tr.getsockopt, 1)
self.assertRaises(NotImplementedError, tr.setsockopt, 1, 2)
self.assertRaises(NotImplementedError, tr.set_write_buffer_limits)
self.assertRaises(NotImplementedError, tr.get_write_buffer_size)
self.assertRaises(NotImplementedError, tr.pause_reading)
self.assertRaises(NotImplementedError, tr.resume_reading)
self.assertRaises(NotImplementedError, tr.bind, 'endpoint')
self.assertRaises(NotImplementedError, tr.unbind, 'endpoint')
self.assertRaises(NotImplementedError, tr.bindings)
self.assertRaises(NotImplementedError, tr.connect, 'endpoint')
self.assertRaises(NotImplementedError, tr.disconnect, 'endpoint')
self.assertRaises(NotImplementedError, tr.connections)
self.assertRaises(NotImplementedError, tr.subscribe, b'filter')
self.assertRaises(NotImplementedError, tr.unsubscribe, b'filter')
self.assertRaises(NotImplementedError, tr.subscriptions)
class ZmqProtocolTests(unittest.TestCase):
def test_interface(self):
pr = aiozmq.ZmqProtocol()
self.assertIsNone(pr.msg_received((b'data',)))
| Add missing tests for interfaces | Add missing tests for interfaces
| Python | bsd-2-clause | MetaMemoryT/aiozmq,claws/aiozmq,asteven/aiozmq,aio-libs/aiozmq |
5b3d26b6c9256f869d3bc08dfa00bf9b8de58f85 | tests/test_cli_parse.py | tests/test_cli_parse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Dominik Gresch <greschd@gmx.ch>
import os
import pytest
import tempfile
from click.testing import CliRunner
import tbmodels
from tbmodels._cli import cli
from parameters import SAMPLES_DIR
@pytest.mark.parametrize('prefix', ['silicon', 'bi'])
def test_cli_parse(models_equal, prefix):
runner = CliRunner()
with tempfile.TemporaryDirectory() as d:
out_file = os.path.join(d, 'model_out.hdf5')
runner.invoke(cli, ['parse', '-o', out_file, '-f', SAMPLES_DIR, '-p', prefix])
model_res = tbmodels.Model.from_hdf5_file(out_file)
model_reference = tbmodels.Model.from_wannier_folder(folder=SAMPLES_DIR, prefix=prefix)
models_equal(model_res, model_reference)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Dominik Gresch <greschd@gmx.ch>
import os
import pytest
import tempfile
from click.testing import CliRunner
import tbmodels
from tbmodels._cli import cli
from parameters import SAMPLES_DIR
@pytest.mark.parametrize('prefix', ['silicon', 'bi'])
def test_cli_parse(models_equal, prefix):
runner = CliRunner()
with tempfile.NamedTemporaryFile() as out_file:
runner.invoke(cli, ['parse', '-o', out_file.name, '-f', SAMPLES_DIR, '-p', prefix])
model_res = tbmodels.Model.from_hdf5_file(out_file.name)
model_reference = tbmodels.Model.from_wannier_folder(folder=SAMPLES_DIR, prefix=prefix)
models_equal(model_res, model_reference)
| Change from TemporaryDirectory to NamedTemporaryFile | Change from TemporaryDirectory to NamedTemporaryFile
| Python | apache-2.0 | Z2PackDev/TBmodels,Z2PackDev/TBmodels |
b577abd12524979ab3cd76c39242713ff78ea011 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
this_dir = os.path.abspath(os.path.dirname(__file__))
VERSIONFILE = os.path.join(this_dir, "textx", "__init__.py")
VERSION = None
for line in open(VERSIONFILE, "r").readlines():
if line.startswith('__version__'):
VERSION = line.split('"')[1]
if not VERSION:
raise RuntimeError('No version defined in textx.__init__.py')
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
sys.exit()
if os.system("pip list | grep twine"):
print("twine not installed.\nUse `pip install twine`.\nExiting.")
sys.exit()
os.system("python setup.py sdist bdist_wheel")
if sys.argv[-1] == 'publishtest':
os.system("twine upload -r test dist/*")
else:
os.system("twine upload dist/*")
print("You probably want to also tag the version now:")
print(" git tag -a {0} -m 'version {0}'".format(VERSION))
print(" git push --tags")
sys.exit()
setup(version=VERSION)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
this_dir = os.path.abspath(os.path.dirname(__file__))
VERSIONFILE = os.path.join(this_dir, "textx", "__init__.py")
VERSION = None
for line in open(VERSIONFILE, "r").readlines():
if line.startswith('__version__'):
VERSION = line.split('"')[1]
if not VERSION:
raise RuntimeError('No version defined in textx.__init__.py')
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep twine"):
print("twine not installed.\nUse `pip install twine`.\nExiting.")
sys.exit()
os.system("python setup.py sdist bdist_wheel")
if sys.argv[-1] == 'publishtest':
os.system("twine upload -r test dist/*")
else:
os.system("twine upload dist/*")
print("You probably want to also tag the version now:")
print(" git tag -a {0} -m 'version {0}'".format(VERSION))
print(" git push --tags")
sys.exit()
setup(version=VERSION)
| Remove check if wheel package is installed | Remove check if wheel package is installed
| Python | mit | igordejanovic/textX,igordejanovic/textX,igordejanovic/textX |
6e1d9bcfaf74b7d41b22147b9ba5e861543f6c90 | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "cmsplugin-filer",
version = "0.9.4pbs3",
url = 'http://github.com/stefanfoulis/cmsplugin-filer',
license = 'BSD',
description = "django-cms plugins for django-filer",
long_description = read('README.rst'),
author = 'Stefan Foulis',
author_email = 'stefan.foulis@gmail.com',
packages = find_packages(),
#package_dir = {'':'src'},
classifiers = [
'Development Status :: 4 - Beta',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
],
install_requires=[
"Django >= 1.3",
"django-cms >= 2.2",
"django-sekizai >= 0.4.2",
"easy_thumbnails >= 1.0",
"django-filer >= 0.9"
],
include_package_data=True,
zip_safe = False,
setup_requires=['s3sourceuploader',],
)
| import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "cmsplugin-filer",
version = "0.9.4pbs4",
url = 'http://github.com/stefanfoulis/cmsplugin-filer',
license = 'BSD',
description = "django-cms plugins for django-filer",
long_description = read('README.rst'),
author = 'Stefan Foulis',
author_email = 'stefan.foulis@gmail.com',
packages = find_packages(),
#package_dir = {'':'src'},
classifiers = [
'Development Status :: 4 - Beta',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
],
install_requires=[
"Django >= 1.3",
"django-cms >= 2.2",
"django-sekizai >= 0.4.2",
"easy_thumbnails >= 1.0",
"django-filer >= 0.9"
],
include_package_data=True,
zip_safe = False,
setup_requires=['s3sourceuploader',],
)
| Bump version since there are commits since last tag. | Bump version since there are commits since last tag. | Python | bsd-3-clause | pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer,pbs/cmsplugin-filer |
bed1bb8dd9964230a621d065ed5d1a63f4634486 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
from setuptools import setup, find_packages
import sys
import warnings
dynamic_requires = []
version = 0.10
setup(
name='lakeside',
version="0.10",
author='Matthew Garrett',
author_email='mjg59@google.com',
url='http://github.com/google/python-lakeside',
packages=find_packages(),
scripts=[],
description='Python API for controlling Eufy LED bulbs',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
install_requires=[
"protobuf",
"pycrypto",
"requests",
]
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
from setuptools import setup, find_packages
import sys
import warnings
dynamic_requires = []
version = 0.10
setup(
name='lakeside',
version="0.10",
author='Matthew Garrett',
author_email='mjg59@google.com',
url='http://github.com/google/python-lakeside',
packages=find_packages(),
scripts=[],
description='Python API for controlling Eufy LED bulbs',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
install_requires=[
"protobuf",
"pycryptodome",
"requests",
]
)
| Switch to pycryptodome rather than pycrypto | Switch to pycryptodome rather than pycrypto
| Python | apache-2.0 | google/python-lakeside |
1c5dbc45213262051ff2472cc0454273d88b82d0 | setup.py | setup.py | #!/usr/bin/env python
import setuptools
import os
setuptools.setup(
name='endpoints-proto-datastore',
version='0.9.0',
description='Endpoints Proto Datastore API',
long_description=open(os.path.join(os.path.dirname(__file__), 'README.md')).read(),
url='https://github.com/GoogleCloudPlatform/endpoints-proto-datastore',
license='Apache',
author='Danny Hermes',
author_email='daniel.j.hermes@gmail.com',
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
packages=setuptools.find_packages(exclude=['examples*', 'docs*']),
) | #!/usr/bin/env python
import setuptools
import os
setuptools.setup(
name='endpoints-proto-datastore',
version='0.9.0',
description='Google Cloud Endpoints Proto Datastore Library',
long_description=open(os.path.join(os.path.dirname(__file__), 'README.md')).read(),
url='https://github.com/GoogleCloudPlatform/endpoints-proto-datastore',
license='Apache',
author='Danny Hermes',
author_email='daniel.j.hermes@gmail.com',
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
packages=setuptools.find_packages(exclude=['examples*', 'docs*']),
) | Change desc to clearly advertise that this is a library to work with Google Cloud Endpoints | Change desc to clearly advertise that this is a library to work with
Google Cloud Endpoints
| Python | apache-2.0 | jbergant/endpoints-proto-datastore,mnieper/endpoints-proto-datastore,maxandron/endpoints-proto-datastore,dhermes/endpoints-proto-datastore,GoogleCloudPlatform/endpoints-proto-datastore |
6fd86d15d896a5fcfc3d013cb9be47405be6491b | setup.py | setup.py | from setuptools import setup
setup(
name="teamscale-client",
version="3.1.1",
author="Thomas Kinnen - CQSE GmbH",
author_email="kinnen@cqse.eu",
description=("A simple service client to interact with Teamscale's REST API."),
license="Apache",
keywords="rest api teamscale",
url="https://github.com/cqse/teamscale-client-python",
packages=['teamscale_client'],
long_description="A simple service client to interact with Teamscale's REST API.",
classifiers=[
"Topic :: Utilities",
],
install_requires=[
'simplejson',
'requests>=2.0',
'jsonpickle'
],
tests_require=[
'pytest',
'responses'
],
setup_requires=["pytest-runner"]
)
| from setuptools import setup
setup(
name="teamscale-client",
version="3.2.0",
author="Thomas Kinnen - CQSE GmbH",
author_email="kinnen@cqse.eu",
description=("A simple service client to interact with Teamscale's REST API."),
license="Apache",
keywords="rest api teamscale",
url="https://github.com/cqse/teamscale-client-python",
packages=['teamscale_client'],
long_description="A simple service client to interact with Teamscale's REST API.",
classifiers=[
"Topic :: Utilities",
],
install_requires=[
'simplejson',
'requests>=2.0',
'jsonpickle'
],
tests_require=[
'pytest',
'responses'
],
setup_requires=["pytest-runner"]
)
| Update Client Version to 3.2 | Update Client Version to 3.2
| Python | apache-2.0 | cqse/teamscale-client-python |
2ebb6b2f4c2f0008355ae0eb268cf156a6eb686e | setup.py | setup.py | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='Willow',
version='1.1',
description='A Python image library that sits on top of Pillow, Wand and OpenCV',
author='Karl Hobley',
author_email='karl@kaed.uk',
url='',
packages=find_packages(exclude=['tests']),
include_package_data=True,
license='BSD',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Topic :: Multimedia :: Graphics',
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
install_requires=[],
zip_safe=False,
)
| #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='Willow',
version='1.1',
description='A Python image library that sits on top of Pillow, Wand and OpenCV',
author='Karl Hobley',
author_email='karl@kaed.uk',
url='',
packages=find_packages(exclude=['tests']),
include_package_data=True,
license='BSD',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Topic :: Multimedia :: Graphics',
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
install_requires=[],
zip_safe=False,
)
| Change "Development Status" classifier to "5 - Production/Stable" | Change "Development Status" classifier to "5 - Production/Stable" | Python | bsd-3-clause | gasman/Willow,torchbox/Willow,gasman/Willow,torchbox/Willow |
ec7aab6caccab6fa14024adcdbcbbe1bed6ba346 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name = 'cityhall',
packages = ['cityhall'], # this must be the same as the name above
version = '0.0.10',
description = 'A library for accessing City Hall Setting Server',
license = 'AGPL',
author = 'Alex Popa',
author_email = 'alex.popa@digitalborderlands.com',
url = 'https://github.com/f00f-nyc/cityhall-python',
download_url = 'https://codeload.github.com/f00f-nyc/cityhall-python/legacy.tar.gz/v0.0.6',
install_requires=['requests==2.7.0','six==1.9.0'],
keywords = ['cityhall', 'enterprise settings', 'settings', 'settings server', 'cityhall', 'City Hall'],
test_suite='test',
tests_require=['requests==2.7.0','six==1.9.0','mock==1.0.1'],
classifiers = [],
) | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name = 'cityhall',
packages = ['cityhall'], # this must be the same as the name above
version = '0.0.10',
description = 'A library for accessing City Hall Setting Server',
license = 'AGPL',
author = 'Alex Popa',
author_email = 'alex.popa@digitalborderlands.com',
url = 'https://github.com/f00f-nyc/cityhall-python',
download_url = 'https://codeload.github.com/f00f-nyc/cityhall-python/legacy.tar.gz/v0.0.10',
install_requires=['requests==2.7.0','six==1.9.0'],
keywords = ['cityhall', 'enterprise settings', 'settings', 'settings server', 'cityhall', 'City Hall'],
test_suite='test',
tests_require=['requests==2.7.0','six==1.9.0','mock==1.0.1'],
classifiers = [],
) | Update package to have the tag/release match | Update package to have the tag/release match
| Python | agpl-3.0 | f00f-nyc/cityhall-python |
9c84f8f759963b331204095fda9be881862440da | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='example_ppp_module',
version='0.1',
description='Example python module for the PPP.',
url='https://github.com/ProjetPP',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
'Topic :: Software Development :: Libraries',
],
install_requires=[
'ppp_datamodel',
'ppp_core',
],
packages=[
'example_ppp_module',
],
)
| #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='example_ppp_module',
version='0.1',
description='Example python module for the PPP.',
url='https://github.com/ProjetPP',
author='Valentin Lorentz',
author_email='valentin.lorentz+ppp@ens-lyon.org',
license='MIT',
classifiers=[
'Environment :: No Input/Output (Daemon)',
'Development Status :: 1 - Planning',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
'Topic :: Software Development :: Libraries',
],
install_requires=[
'ppp_datamodel>=0.2',
'ppp_core>=0.2',
],
packages=[
'example_ppp_module',
],
)
| Mark dependencies on recent core and datamodel versions. | Mark dependencies on recent core and datamodel versions.
| Python | mit | ProjetPP/ExamplePPPModule-Python,ProjetPP/ExamplePPPModule-Python |
20eebb23a0aafd03e62b91fdba154518bb3898e8 | setup.py | setup.py | from setuptools import setup, find_packages
package = 'bsdetector'
version = '0.1'
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
# class PostDevelopCommand(develop):
# """Post-installation for development mode."""
# def run(self):
# # PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
# develop.run(self)
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
# PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
import nltk
nltk.download('punkt')
install.run(self)
print(find_packages('bsdetector'))
setup(name=package,
version=version,
packages=['bsdetector', 'lexicons', 'additional_resources'],
install_requires=['decorator', 'requests', 'textstat', 'vaderSentiment',
'pattern', 'nltk', 'pytest'],
package_dir={'bsdetector': 'bsdetector'},
# data_files=[('bsdetector', ['bsdetector/lexicon.json'])],
package_data={'bsdetector': ['*.json']},
description="Detects biased statements in online media documents",
url='url',
cmdclass={
# 'develop': PostDevelopCommand,
'install': PostInstallCommand,
}
)
| from setuptools import setup, find_packages
package = 'bsdetector'
version = '0.1'
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
# class PostDevelopCommand(develop):
# """Post-installation for development mode."""
# def run(self):
# # PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
# develop.run(self)
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
# PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
import nltk
nltk.download('punkt')
install.run(self)
print(find_packages('bsdetector'))
setup(name=package,
version=version,
packages=['bsdetector', 'additional_resources'],
install_requires=['decorator', 'requests', 'textstat', 'vaderSentiment',
'pattern', 'nltk', 'pytest'],
package_dir={'bsdetector': 'bsdetector'},
# data_files=[('bsdetector', ['bsdetector/lexicon.json'])],
package_data={'bsdetector': ['*.json']},
description="Detects biased statements in online media documents",
url='url',
cmdclass={
# 'develop': PostDevelopCommand,
'install': PostInstallCommand,
}
)
| Update to remove requirement for unused 'lexicons' dir | Update to remove requirement for unused 'lexicons' dir
| Python | mit | cjhutto/bsd,cjhutto/bsd,cjhutto/bsd |
f958d337c171dea92237d2f7ef84618756db6f46 | setup.py | setup.py | from distutils.core import setup
setup(name='pyresttest',
version='1.0b',
description='Python RESTful API Testing & Microbenchmarking Tool',
long_description='Python RESTful API Testing & Microbenchmarking Tool',
maintainer='Sam Van Oort',
maintainer_email='acetonespam@gmail.com',
url='https://github.com/svanoort/pyresttest',
keywords=['rest', 'web', 'http', 'testing'],
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Utilities'
],
py_modules=['pyresttest.resttest','pyresttest.generators','pyresttest.binding',
'pyresttest.parsing', 'pyresttest.validators', 'pyresttest.contenthandling',
'pyresttest.benchmarks','pyresttest.tests'],
license='Apache License, Version 2.0',
requires=['yaml','pycurl'],
scripts=['pyresttest/resttest.py'], #Make this executable from command line when installed
provides=['pyresttest']
)
| from distutils.core import setup
setup(name='pyresttest',
version='1.0',
description='Python RESTful API Testing & Microbenchmarking Tool',
long_description='Python RESTful API Testing & Microbenchmarking Tool',
maintainer='Sam Van Oort',
maintainer_email='acetonespam@gmail.com',
url='https://github.com/svanoort/pyresttest',
keywords=['rest', 'web', 'http', 'testing'],
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Utilities'
],
py_modules=['pyresttest.resttest','pyresttest.generators','pyresttest.binding',
'pyresttest.parsing', 'pyresttest.validators', 'pyresttest.contenthandling',
'pyresttest.benchmarks','pyresttest.tests'],
license='Apache License, Version 2.0',
requires=['yaml','pycurl'],
scripts=['pyresttest/resttest.py'], #Make this executable from command line when installed
provides=['pyresttest']
)
| Revert "Set version to b for beta" | Revert "Set version to b for beta"
This reverts commit db3395cc44f6b18d59a06593ad48f14e4c99ad05.
| Python | apache-2.0 | svanoort/pyresttest,TimYi/pyresttest,netjunki/pyresttest,janusnic/pyresttest,MorrisJobke/pyresttest,sunyanhui/pyresttest,sunyanhui/pyresttest,alazaro/pyresttest,wirewit/pyresttest,alazaro/pyresttest,suvarnaraju/pyresttest,svanoort/pyresttest,MorrisJobke/pyresttest,holdenweb/pyresttest,TimYi/pyresttest,holdenweb/pyresttest,janusnic/pyresttest,suvarnaraju/pyresttest,wirewit/pyresttest,satish-suradkar/pyresttest,satish-suradkar/pyresttest,netjunki/pyresttest |
ad29d682af36f3f27144fefd1cf72d869106ac46 | setup.py | setup.py | from setuptools import setup
setup(
name='urlwait',
version='1.0',
description='A CLI utility for blocking until a service is listening',
long_description=open('README.rst').read(),
author='Paul McLanahan',
author_email='paul@mclanahan.net',
license='MIT',
py_modules=['urlwait'],
entry_points={
'console_scripts': ['urlwait = urlwait:main'],
},
url='https://github.com/pmac/urlwait',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: System :: Systems Administration'
],
keywords=['database_url', 'tcp', 'port', 'docker', 'service',
'deploy', 'deployment'],
)
| from setuptools import setup
setup(
name='urlwait',
version='1.0',
description='A CLI utility for blocking until a service is listening',
long_description=open('README.rst').read(),
author='Paul McLanahan',
author_email='paul@mclanahan.net',
license='MIT',
py_modules=['urlwait'],
entry_points={
'console_scripts': ['urlwait = urlwait:main'],
},
url='https://github.com/pmac/urlwait',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: System :: Systems Administration'
],
keywords=['database_url', 'tcp', 'port', 'docker', 'service',
'deploy', 'deployment'],
)
| Upgrade the Development Status classifier to stable | Upgrade the Development Status classifier to stable
[skip ci]
| Python | mit | pmclanahan/urlwait,pmclanahan/urlwait |
78edc5479212af75a412cf321d321283978a6d79 | setup.py | setup.py | from distutils.core import setup
setup(name='nikeplus',
version='0.1',
description='Export nikeplus data to CSV format',
author='Luke Lee',
author_email='durdenmisc@gmail.com',
url='http://www.lukelee.me',
packages=['nikeplus'],
entry_points={
"console_scripts": [
"nikeplus = nikeplus.export:main",
]
},
)
| from distutils.core import setup
setup(name='nikeplusapi',
version='0.1',
description='Export nikeplus data to CSV format',
author='Luke Lee',
author_email='durdenmisc@gmail.com',
url='http://www.lukelee.me',
packages=['nikeplus'],
entry_points={
"console_scripts": [
"nikeplus = nikeplus.export:main",
]
},
)
| Change package name for pypi, nikeplus was taken :( | Change package name for pypi, nikeplus was taken :(
| Python | mit | durden/nikeplus |
ff77e5e6323b05260c89ee735bfd6dc083211def | setup.py | setup.py | import sys
from setuptools import setup, find_packages
extra_setup = {}
if sys.version_info >= (3,):
extra_setup['use_2to3'] = True
setup(
name='noseprogressive',
version='0.1',
description='Nose plugin to show progress bar and tracebacks during tests',
long_description="""The philosophy of noseprogressive is to get useful information onto the screen as soon as possible and keep it there as long as possible while still indicating progress. Thus, it refrains from printing dots, since that tends to scroll informative tracebacks away. Instead, it draws a nice progress bar and the current test path, all on one line.""",
author='Erik Rose',
author_email='erikrose@grinchcentral.com',
license='GPL',
packages=find_packages(exclude=['ez_setup']),
install_requires=['Nose'],
url='',
include_package_data=True,
entry_points="""
[nose.plugins.0.10]
noseprogressive = noseprogressive:ProgressivePlugin
""",
classifiers = [
'Intended Audience :: Developers',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Software Development :: Testing'
],
**extra_setup
)
| import sys
from setuptools import setup, find_packages
extra_setup = {}
if sys.version_info >= (3,):
extra_setup['use_2to3'] = True
setup(
name='nose-progressive',
version='0.1',
description='Nose plugin to show progress bar and tracebacks during tests',
long_description="""The philosophy of noseprogressive is to get useful information onto the screen as soon as possible and keep it there as long as possible while still indicating progress. Thus, it refrains from printing dots, since that tends to scroll informative tracebacks away. Instead, it draws a nice progress bar and the current test path, all on one line.""",
author='Erik Rose',
author_email='erikrose@grinchcentral.com',
license='GPL',
packages=find_packages(exclude=['ez_setup']),
install_requires=['Nose'],
url='',
include_package_data=True,
entry_points="""
[nose.plugins.0.10]
noseprogressive = noseprogressive:ProgressivePlugin
""",
classifiers = [
'Intended Audience :: Developers',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Software Development :: Testing'
],
**extra_setup
)
| Tweak package name to conform to nose's built-in plugins' convention. | Tweak package name to conform to nose's built-in plugins' convention.
| Python | mit | veo-labs/nose-progressive,olivierverdier/nose-progressive,erikrose/nose-progressive,pmclanahan/pytest-progressive |
70ab0f7bb46318330b5e75be107bb380e96b7716 | setup.py | setup.py | from setuptools import setup
setup(
name='chainpoint', version='1.0',
description='Federated server for building blockchain notarized Merkle trees.',
author='Shawn Wilkinson', author_email='shawn+chainpoint@storj.io',
url='http://storj.io',
# Uncomment one or more lines below in the install_requires section
# for the specific client drivers/modules your application needs.
install_requires=['Flask == 0.10.1', 'Flask-SQLAlchemy == 2.0', 'btctxstore == 3.0.0'],
tests_require=['coverage', 'coveralls'],
test_suite="tests",
)
| from setuptools import setup
setup(
name='chainpoint', version='1.0',
description='Federated server for building blockchain notarized Merkle trees.',
author='Shawn Wilkinson', author_email='shawn+chainpoint@storj.io',
# Uncomment one or more lines below in the install_requires section
# for the specific client drivers/modules your application needs.
install_requires=['Flask == 0.10.1', 'Flask-SQLAlchemy == 2.0', 'btctxstore == 3.0.0'],
tests_require=['coverage', 'coveralls'],
test_suite="tests",
)
| Remove Storj and Trigger Travis | Remove Storj and Trigger Travis | Python | mit | isghe/chainpoint |
f66f4858816646f8f070910de63e11064a69d4e0 | setup.py | setup.py | from setuptools import setup, find_packages
import re
#pattern = re.compile(r'^VERSION=(.+)$')
#version = None
#for line in open('Makefile'):
# match = pattern.match(line)
# if match is None:
# continue
# version = match.group(1)
# break
#if version is None:
# raise EnvironmentError, '/^VERSION=/ not matched in Makefile.'
version = "3.0.1"
setup(name='blueprint',
version=version,
description='reverse engineer server configuration',
author='Richard Crowley',
author_email='richard@devstructure.com',
url='http://devstructure.com/',
packages=find_packages(),
license='BSD',
zip_safe=True)
| from setuptools import setup, find_packages
import re
#pattern = re.compile(r'^VERSION=(.+)$')
#version = None
#for line in open('Makefile'):
# match = pattern.match(line)
# if match is None:
# continue
# version = match.group(1)
# break
#if version is None:
# raise EnvironmentError, '/^VERSION=/ not matched in Makefile.'
version = "3.0.1"
setup(name='blueprint',
version=version,
description='reverse engineer server configuration',
author='Richard Crowley',
author_email='richard@devstructure.com',
url='http://devstructure.com/',
packages=find_packages(),
scripts=['bin/blueprint',
'bin/blueprint-apply',
'bin/blueprint-create',
'bin/blueprint-destroy',
'bin/blueprint-list',
'bin/blueprint-show'],
license='BSD',
zip_safe=True)
| Include scripts in the PyPI package. | Include scripts in the PyPI package.
| Python | bsd-2-clause | AndBicScadMedia/blueprint,nginxxx/blueprint,volcomism/blueprint,AndBicScadMedia/blueprint,nginxxx/blueprint,devstructure/blueprint,volcomism/blueprint,volcomism/blueprint,AndBicScadMedia/blueprint,devstructure/blueprint,nginxxx/blueprint |
3de90ff1f33d05d30e295279e7ad4cdd0e6bbc9b | setup.py | setup.py | import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info <= (2, 4):
error = 'Requires Python Version 2.5 or above... exiting.'
print >> sys.stderr, error
sys.exit(1)
requirements = [
'requests',
]
setup(name='googlemaps',
version='2.0-dev',
description='API Client library for Google Maps',
scripts=[],
url='https://github.com/googlemaps/google-maps-services-python',
packages=['googlemaps'],
license='Apache 2.0',
platforms='Posix; MacOS X; Windows',
setup_requires=requirements,
install_requires=requirements,
classifiers=['Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Topic :: Internet',
]
)
| import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info <= (2, 4):
error = 'Requires Python Version 2.5 or above... exiting.'
print >> sys.stderr, error
sys.exit(1)
requirements = [
'requests',
]
setup(name='googlemaps',
version='2.0-dev',
description='API Client library for Google Maps',
scripts=[],
url='https://github.com/googlemaps/google-maps-services-python',
packages=['googlemaps'],
license='Apache 2.0',
platforms='Posix; MacOS X; Windows',
setup_requires=requirements,
install_requires=requirements,
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Topic :: Internet',
]
)
| Change from planning to in beta | Change from planning to in beta
| Python | apache-2.0 | garydonovan/google-maps-services-python,edwardsamuel/google-maps-services-python,cmontezano/google-maps-services-python,ambrozic/google-maps-services-python,quevedin/google-maps-services-python,codeAshu/google-maps-services-python,Scronker/google-maps-services-python,googlemaps/google-maps-services-python,Prindle19/google-maps-services-python,DataReply/google-maps-services-python,mansigoel/google-maps-services-python,stephenmcd/google-maps-services-python,ahlusar1989/google-maps-services-python,aviciimaxwell/google-maps-services-python |
45ec0f85bf4b244738220b920dc2046183ba707e | setup.py | setup.py | """
Package configuration
"""
# pylint:disable=no-name-in-module, import-error
from distutils.core import setup
from setuptools import find_packages
setup(
name='IXWSAuth',
version='0.1.1',
author='Infoxchanhe Australia dev team',
author_email='devs@infoxchange.net.au',
packages=find_packages(),
url='http://pypi.python.org/pypi/IXWSAuth/',
license='MIT',
description='Authentication libraries for IX web services',
long_description=open('README').read(),
install_requires=(
'Django >= 1.4.0',
'django-tastypie',
'IXDjango >= 0.1.1',
),
tests_require=(
'aloe',
'mock',
'pep8',
'pylint',
'pylint-mccabe',
)
)
| """
Package configuration
"""
# pylint:disable=no-name-in-module, import-error
from distutils.core import setup
from setuptools import find_packages
setup(
name='IXWSAuth',
version='0.1.1',
author='Infoxchanhe Australia dev team',
author_email='devs@infoxchange.net.au',
packages=find_packages(),
url='http://pypi.python.org/pypi/IXWSAuth/',
license='MIT',
description='Authentication libraries for IX web services',
long_description=open('README').read(),
install_requires=(
'Django >= 1.4.0',
'IXDjango >= 0.1.1',
),
tests_require=(
'aloe',
'django-tastypie',
'mock',
'pep8',
'pylint',
'pylint-mccabe',
)
)
| Downgrade tastypie to test-only dependency | Downgrade tastypie to test-only dependency
| Python | mit | infoxchange/ixwsauth |
b57a0a89cd2596174300319ee0a83490ad987177 | setup.py | setup.py | from os import path
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(path.join(path.dirname(__file__), fname)).read()
setup(
name="pconf",
version="1.9.1",
author="Andras Maroy",
author_email="andras@maroy.hu",
description=("Hierarchical python configuration with files, environment variables, command-line arguments."),
license="MIT",
keywords="configuration hierarchical",
url="https://github.com/andrasmaroy/pconf",
packages=['pconf', 'pconf.store'],
long_description=read('README.rst'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10'
],
install_requires=['pyyaml', 'deepmerge'],
extras_require={
'test': ['pytest', 'mock'],
},
)
| from os import path
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(path.join(path.dirname(__file__), fname)).read()
setup(
name="pconf",
version="1.10.0",
author="Andras Maroy",
author_email="andras@maroy.hu",
description=("Hierarchical python configuration with files, environment variables, command-line arguments."),
license="MIT",
keywords="configuration hierarchical",
url="https://github.com/andrasmaroy/pconf",
packages=['pconf', 'pconf.store'],
long_description=read('README.rst'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11'
],
install_requires=['pyyaml', 'deepmerge'],
extras_require={
'test': ['pytest', 'mock'],
},
)
| Add Python 3.11 support as of version 1.10.0 | Add Python 3.11 support as of version 1.10.0
| Python | mit | andrasmaroy/pconf |
d8a39009565ca8aff4b6fbddae5d2ef7aada7213 | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="feedinlib",
version="0.1.0rc2",
description="Creating time series from pv or wind power plants.",
url="http://github.com/oemof/feedinlib",
author="oemof developer group",
author_email="windpowerlib@rl-institut.de",
license="MIT",
packages=["feedinlib"],
long_description=read("README.rst"),
long_description_content_type="text/x-rst",
zip_safe=False,
install_requires=[
"cdsapi >= 0.1.4",
"geopandas",
"numpy >= 1.7.0",
"oedialect >= 0.0.6.dev0",
"open_FRED-cli",
"pandas >= 0.13.1",
"pvlib >= 0.7.0",
"tables",
"windpowerlib >= 0.2.0",
"xarray >= 0.12.0",
],
extras_require={
"dev": [
"jupyter",
"nbformat",
"punch.py",
"pytest",
"sphinx_rtd_theme",
],
"examples": ["jupyter"],
},
)
| import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="feedinlib",
version="0.1.0rc2",
description="Creating time series from pv or wind power plants.",
url="http://github.com/oemof/feedinlib",
author="oemof developer group",
author_email="windpowerlib@rl-institut.de",
license="MIT",
packages=["feedinlib"],
long_description=read("README.rst"),
long_description_content_type="text/x-rst",
zip_safe=False,
install_requires=[
"cdsapi >= 0.1.4",
"geopandas",
"numpy >= 1.7.0",
"oedialect >= 0.0.6.dev0",
"open_FRED-cli",
"pandas >= 0.13.1",
"pvlib >= 0.7.0",
"tables",
"windpowerlib >= 0.2.0",
"xarray >= 0.12.0",
"tables"
],
extras_require={
"dev": [
"jupyter",
"nbformat",
"punch.py",
"pytest",
"sphinx_rtd_theme",
],
"examples": ["jupyter"],
},
)
| Add tables package to run pvlib modelchain with default parameters | Add tables package to run pvlib modelchain with default parameters
| Python | mit | oemof/feedinlib |
42d765c8dbcc099f7bd2ac77485a0b5351a1b0a7 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup,find_packages
METADATA = dict(
name='django-socialregistration',
version='0.4.3',
author='Alen Mujezinovic',
author_email='alen@caffeinehit.com',
description='Django application enabling registration through a variety of APIs',
long_description=open('README.rst').read(),
url='http://github.com/flashingpumpkin/django-socialregistration',
keywords='django facebook twitter oauth openid registration',
install_requires=['django', 'oauth2', 'python-openid'],
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'Environment :: Web Environment',
'Topic :: Internet',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=find_packages(),
package_data={'socialregistration': ['templates/socialregistration/*.html'], }
)
if __name__ == '__main__':
setup(**METADATA)
| #!/usr/bin/env python
from setuptools import setup,find_packages
METADATA = dict(
name='django-socialregistration',
version='0.4.3',
author='Alen Mujezinovic',
author_email='alen@caffeinehit.com',
description='Django application enabling registration through a variety of APIs',
long_description=open('README.rst').read(),
url='http://github.com/flashingpumpkin/django-socialregistration',
keywords='django facebook twitter oauth openid registration',
install_requires=['oauth2', 'python-openid'],
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'Environment :: Web Environment',
'Topic :: Internet',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
packages=find_packages(),
package_data={'socialregistration': ['templates/socialregistration/*.html'], }
)
if __name__ == '__main__':
setup(**METADATA)
| Remove django requirement to prevent version conflicts when using pip | Remove django requirement to prevent version conflicts when using pip
| Python | mit | aditweb/django-socialregistration,bopo/django-socialregistration,lgapontes/django-socialregistration,0101/django-socialregistration,mark-adams/django-socialregistration,brodie/django-socialregistration,mark-adams/django-socialregistration,minlex/django-socialregistration,flashingpumpkin/django-socialregistration,kapt/django-socialregistration,lgapontes/django-socialregistration,mark-adams/django-socialregistration,minlex/django-socialregistration,Soovox/django-socialregistration,minlex/django-socialregistration,lgapontes/django-socialregistration,bopo/django-socialregistration,aditweb/django-socialregistration,aditweb/django-socialregistration,flashingpumpkin/django-socialregistration,brodie/django-socialregistration,bopo/django-socialregistration,kapt/django-socialregistration |
90ba2679c712e87ac750affdc389bed1de0a422a | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==1.1.0',
'cvxopt==1.2.5',
'statsmodels==0.11.1',
]
)
| #!/usr/bin/env python
from setuptools import setup
setup(name='l1',
version='0.1',
description='L1',
author='Bugra Akyildiz',
author_email='vbugra@gmail.com',
url='bugra.github.io',
packages=['l1'],
install_requires=['pandas==1.1.1',
'cvxopt==1.2.5',
'statsmodels==0.11.1',
]
)
| Bump pandas from 1.1.0 to 1.1.1 | Bump pandas from 1.1.0 to 1.1.1
Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Changelog](https://github.com/pandas-dev/pandas/blob/master/RELEASE.md)
- [Commits](https://github.com/pandas-dev/pandas/compare/v1.1.0...v1.1.1)
Signed-off-by: dependabot-preview[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com> | Python | apache-2.0 | bugra/l1 |
131bc5e7e52ff2cda42647ac7209e40246e857eb | setup.py | setup.py | import os
import io
from setuptools import setup, find_packages
cwd = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(cwd, 'README.rst'), encoding='utf-8') as fd:
long_description = fd.read()
setup(
name='pytest-tornado',
version='0.5.0',
description=('A py.test plugin providing fixtures and markers '
'to simplify testing of asynchronous tornado applications.'),
long_description=long_description,
url='https://github.com/eugeniy/pytest-tornado',
author='Eugeniy Kalinin',
author_email='burump@gmail.com',
maintainer='Vidar Tonaas Fauske',
maintainer_email='vidartf@gmail.com',
license='Apache License, Version 2.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development',
'Topic :: Software Development :: Testing',
],
keywords=('pytest py.test tornado async asynchronous '
'testing unit tests plugin'),
packages=find_packages(exclude=["tests.*", "tests"]),
install_requires=['pytest', 'tornado>=4'],
entry_points={
'pytest11': ['tornado = pytest_tornado.plugin'],
},
)
| import os
import io
from setuptools import setup, find_packages
cwd = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(cwd, 'README.rst'), encoding='utf-8') as fd:
long_description = fd.read()
setup(
name='pytest-tornado',
version='0.5.0',
description=('A py.test plugin providing fixtures and markers '
'to simplify testing of asynchronous tornado applications.'),
long_description=long_description,
url='https://github.com/eugeniy/pytest-tornado',
author='Eugeniy Kalinin',
author_email='burump@gmail.com',
maintainer='Vidar Tonaas Fauske',
maintainer_email='vidartf@gmail.com',
license='Apache License, Version 2.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development',
'Topic :: Software Development :: Testing',
],
keywords=('pytest py.test tornado async asynchronous '
'testing unit tests plugin'),
packages=find_packages(exclude=["tests.*", "tests"]),
install_requires=['pytest>=3.6', 'tornado>=4'],
entry_points={
'pytest11': ['tornado = pytest_tornado.plugin'],
},
)
| Install requires pytest 3.6 or greater | Install requires pytest 3.6 or greater
| Python | apache-2.0 | eugeniy/pytest-tornado |
420644b26d0e355a5fa9d94d18555fbf7494deb6 | setup.py | setup.py | from setuptools import setup
setup(
name='tangled.website',
version='0.1.dev0',
description='tangledframework.org',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.website/tags',
author='Wyatt Baldwin',
author_email='self@wyattbaldwin.com',
packages=[
'tangled',
'tangled.website',
],
include_package_data=True,
install_requires=[
'tangled.auth>=0.1a3',
'tangled.session>=0.1a2',
'tangled.site>=0.1a2',
'SQLAlchemy>=1.1.6',
],
extras_require={
'dev': ['coverage'],
},
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',
],
)
| from setuptools import setup
setup(
name='tangled.website',
version='0.1.dev0',
description='tangledframework.org',
long_description=open('README.rst').read(),
url='http://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.website/tags',
author='Wyatt Baldwin',
author_email='self@wyattbaldwin.com',
packages=[
'tangled',
'tangled.website',
],
include_package_data=True,
install_requires=[
'pg8000>=1.10.6',
'tangled.auth>=0.1a3',
'tangled.session>=0.1a2',
'tangled.site>=0.1a2',
'SQLAlchemy>=1.1.6',
],
extras_require={
'dev': ['coverage'],
},
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',
],
)
| Use the pg8000 pure-Python Postgres DBAPI module | Use the pg8000 pure-Python Postgres DBAPI module
| Python | mit | TangledWeb/tangled.website |