commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
499651033a8f1aaf89533e7ce2156efeca32198d
questions/models.py
questions/models.py
from django.db import models from django.contrib.auth.models import User from quizzardous.utils import slugify class Question(models.Model): """Represents a question asked by a user.""" class Meta: ordering = ['-when'] question = models.TextField() # A slug is actually required, but if it's empty, then it'll automatically # be converted from question (see above) slug = models.SlugField(default='', blank=True) author = models.ForeignKey('auth.User', related_name='questions') when = models.DateTimeField(auto_now=True) hearters = models.ManyToManyField('auth.User', related_name='hearted_questions') correct_answers = models.TextField() # TODO: Tags - custom implementation or django-tagging? def clean(self): if not self.slug: self.slug = slugify(self.question) def save(self): self.full_clean() super(self.__class__, self).save(self) @models.permalink def get_absolute_url(self): return ('question', (self.pk, self.slug)) @property def hearts(self): try: return self.hearters.count() except ValueError: return 0 def __unicode__(self): return unicode(self.question) class Answer(models.Model): """Represents an answer to a question (submitted by a user)""" question = models.ForeignKey('Question', related_name='answers') answer = models.TextField() author = models.ForeignKey('auth.User', related_name='answers')
from django.db import models from django.contrib.auth.models import User from quizzardous.utils import slugify class Question(models.Model): """Represents a question asked by a user.""" class Meta: ordering = ['-when'] question = models.TextField() # A slug is actually required, but if it's empty, then it'll automatically # be converted from question (see above) slug = models.SlugField(default='', blank=True) author = models.ForeignKey('auth.User', related_name='questions') when = models.DateTimeField(auto_now=True, db_index=True) hearters = models.ManyToManyField('auth.User', related_name='hearted_questions') correct_answers = models.TextField() # TODO: Tags - custom implementation or django-tagging? def clean(self): if not self.slug: self.slug = slugify(self.question) def save(self): self.full_clean() super(self.__class__, self).save(self) @models.permalink def get_absolute_url(self): return ('question', (self.pk, self.slug)) @property def hearts(self): try: return self.hearters.count() except ValueError: return 0 def __unicode__(self): return unicode(self.question) class Answer(models.Model): """Represents an answer to a question (submitted by a user)""" question = models.ForeignKey('Question', related_name='answers') answer = models.TextField() author = models.ForeignKey('auth.User', related_name='answers')
Create index on Question.when for faster ordered queries.
Create index on Question.when for faster ordered queries.
Python
bsd-3-clause
aviraldg/quizzardous,aviraldg/quizzardous,aviraldg/quizzardous
--- +++ @@ -13,7 +13,7 @@ # be converted from question (see above) slug = models.SlugField(default='', blank=True) author = models.ForeignKey('auth.User', related_name='questions') - when = models.DateTimeField(auto_now=True) + when = models.DateTimeField(auto_now=True, db_index=True) hearters = models.ManyToManyField('auth.User', related_name='hearted_questions') correct_answers = models.TextField()
f8277d426aa88e45bf492d3d4f6dfd2703702dff
numba/exttypes/utils.py
numba/exttypes/utils.py
"Simple utilities related to extension types" #------------------------------------------------------------------------ # Read state from extension types #------------------------------------------------------------------------ def get_attributes_type(py_class): "Return the attribute struct type of the numba extension type" return py_class.__numba_struct_type def get_vtab_type(py_class): "Return the type of the virtual method table of the numba extension type" return py_class.__numba_vtab_type def get_method_pointers(py_class): "Return [(method_name, method_pointer)] given a numba extension type" return getattr(py_class, '__numba_method_pointers', None) #------------------------------------------------------------------------ # Type checking #------------------------------------------------------------------------ def is_numba_class(py_class): return hasattr(py_class, '__numba_struct_type') def get_numba_bases(py_class): for base in py_class.__mro__: if is_numba_class(base): yield base
"Simple utilities related to extension types" #------------------------------------------------------------------------ # Read state from extension types #------------------------------------------------------------------------ def get_attributes_type(py_class): "Return the attribute struct type of the numba extension type" return py_class.__numba_struct_type def get_vtab_type(py_class): "Return the type of the virtual method table of the numba extension type" return py_class.__numba_vtab_type def get_method_pointers(py_class): "Return [(method_name, method_pointer)] given a numba extension type" return getattr(py_class, '__numba_method_pointers', None) #------------------------------------------------------------------------ # Type checking #------------------------------------------------------------------------ def is_numba_class(py_class): return hasattr(py_class, '__numba_struct_type') def get_all_numba_bases(py_class): seen = set() bases = [] for base in py_class.__mro__[::-1]: if is_numba_class(base) and base.exttype not in seen: seen.add(base.exttype) bases.append(base) return bases[::-1] def get_numba_bases(py_class): for base in py_class.__bases__: if is_numba_class(base): yield base
Add utility to retrieve all extension type bases
Add utility to retrieve all extension type bases
Python
bsd-2-clause
gdementen/numba,stuartarchibald/numba,stonebig/numba,stefanseefeld/numba,GaZ3ll3/numba,ssarangi/numba,stuartarchibald/numba,sklam/numba,cpcloud/numba,ssarangi/numba,sklam/numba,ssarangi/numba,gmarkall/numba,sklam/numba,stefanseefeld/numba,pitrou/numba,stonebig/numba,gdementen/numba,pitrou/numba,cpcloud/numba,pombredanne/numba,pombredanne/numba,jriehl/numba,stonebig/numba,cpcloud/numba,jriehl/numba,jriehl/numba,stuartarchibald/numba,pitrou/numba,cpcloud/numba,gmarkall/numba,ssarangi/numba,gmarkall/numba,pitrou/numba,stonebig/numba,gdementen/numba,shiquanwang/numba,numba/numba,seibert/numba,gmarkall/numba,cpcloud/numba,seibert/numba,GaZ3ll3/numba,stefanseefeld/numba,jriehl/numba,numba/numba,numba/numba,gmarkall/numba,pombredanne/numba,IntelLabs/numba,numba/numba,GaZ3ll3/numba,ssarangi/numba,stefanseefeld/numba,shiquanwang/numba,numba/numba,seibert/numba,seibert/numba,stuartarchibald/numba,GaZ3ll3/numba,GaZ3ll3/numba,sklam/numba,IntelLabs/numba,gdementen/numba,pitrou/numba,gdementen/numba,stonebig/numba,jriehl/numba,pombredanne/numba,sklam/numba,shiquanwang/numba,pombredanne/numba,seibert/numba,IntelLabs/numba,IntelLabs/numba,IntelLabs/numba,stuartarchibald/numba,stefanseefeld/numba
--- +++ @@ -23,7 +23,18 @@ def is_numba_class(py_class): return hasattr(py_class, '__numba_struct_type') +def get_all_numba_bases(py_class): + seen = set() + + bases = [] + for base in py_class.__mro__[::-1]: + if is_numba_class(base) and base.exttype not in seen: + seen.add(base.exttype) + bases.append(base) + + return bases[::-1] + def get_numba_bases(py_class): - for base in py_class.__mro__: + for base in py_class.__bases__: if is_numba_class(base): yield base
d30094e5b9881c89e3871aa30c6af639e20209b5
pandoc-html-pdf-img.py
pandoc-html-pdf-img.py
#! /usr/bin/env python3 """Pandoc filter to force the <img> tag for pdf images in html. Useful for integrating pandoc with Marked. """ from pandocfilters import toJSONFilter, RawInline, Str import re def pdf_img(key, val, fmt, meta): if key == 'Image' and fmt == 'html': caption, target = val precap = "<figure><img src=" + target[0] + " /><figcaption>" postcap = "</figcaption></figure>" return [RawInline(fmt, precap)] + caption + [RawInline(fmt, postcap)] if __name__ == '__main__': toJSONFilter(pdf_img)
#! /usr/bin/env python3 """Pandoc filter to force the <img> tag for pdf images in html. Useful for integrating pandoc with Marked. """ from pandocfilters import toJSONFilter, RawInline, Str import re def pdf_img(key, val, fmt, meta): if key == 'Image' and fmt == 'html': caption, target = val precap = "<figure><img src=\"" + target[0] + "\" /><figcaption>" postcap = "</figcaption></figure>" return [RawInline(fmt, precap)] + caption + [RawInline(fmt, postcap)] if __name__ == '__main__': toJSONFilter(pdf_img)
Fix quotes in src tag
Fix quotes in src tag
Python
mit
scotthartley/pandoc-html-pdf-img
--- +++ @@ -12,7 +12,7 @@ if key == 'Image' and fmt == 'html': caption, target = val - precap = "<figure><img src=" + target[0] + " /><figcaption>" + precap = "<figure><img src=\"" + target[0] + "\" /><figcaption>" postcap = "</figcaption></figure>" return [RawInline(fmt, precap)] + caption + [RawInline(fmt, postcap)]
74983cc059bc3480331b0815240c579b0b4517fc
bluebottle/assignments/filters.py
bluebottle/assignments/filters.py
from django.db.models import Q from rest_framework_json_api.django_filters import DjangoFilterBackend from bluebottle.assignments.transitions import ApplicantTransitions class ApplicantListFilter(DjangoFilterBackend): """ Filter that shows all applicant if user is owner, otherwise only show accepted applicants. """ def filter_queryset(self, request, queryset, view): if request.user.is_authenticated(): queryset = queryset.filter( Q(user=request.user) | Q(activity__owner=request.user) | Q(status__in=[ ApplicantTransitions.values.new, ApplicantTransitions.values.succeeded ]) ) else: queryset = queryset.filter(status__in=[ ApplicantTransitions.values.new, ApplicantTransitions.values.succeeded ]) return super(ApplicantListFilter, self).filter_queryset(request, queryset, view)
from django.db.models import Q from rest_framework_json_api.django_filters import DjangoFilterBackend from bluebottle.assignments.transitions import ApplicantTransitions class ApplicantListFilter(DjangoFilterBackend): """ Filter that shows all applicant if user is owner, otherwise only show accepted applicants. """ def filter_queryset(self, request, queryset, view): if request.user.is_authenticated(): queryset = queryset.filter( Q(user=request.user) | Q(activity__owner=request.user) | Q(activity__initiative__activity_manager=request.user) | Q(status__in=[ ApplicantTransitions.values.active, ApplicantTransitions.values.accepted, ApplicantTransitions.values.succeeded ]) ) else: queryset = queryset.filter(status__in=[ ApplicantTransitions.values.new, ApplicantTransitions.values.succeeded ]) return super(ApplicantListFilter, self).filter_queryset(request, queryset, view)
Tweak filtering of applicants on assignment
Tweak filtering of applicants on assignment
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
--- +++ @@ -14,8 +14,10 @@ queryset = queryset.filter( Q(user=request.user) | Q(activity__owner=request.user) | + Q(activity__initiative__activity_manager=request.user) | Q(status__in=[ - ApplicantTransitions.values.new, + ApplicantTransitions.values.active, + ApplicantTransitions.values.accepted, ApplicantTransitions.values.succeeded ]) )
e18f4bd7db18743bb290fed276ff21a9e63e6922
petulant/meme/tests.py
petulant/meme/tests.py
from django.test import TestCase # Create your tests here.
import json from django.test import TestCase, Client class MemeTests(TestCase): def test_can_post_to_db(self): response = json.loads(self.client.post('/', {'url':'https://foo.bar/baz.gif', 'keywords':'omg, this, is, great'}).content) self.assertTrue(response['success'])
Add test for posting content to the server
Add test for posting content to the server
Python
apache-2.0
AutomatedTester/petulant-meme,AutomatedTester/petulant-meme,AutomatedTester/petulant-meme
--- +++ @@ -1,3 +1,12 @@ -from django.test import TestCase +import json -# Create your tests here. +from django.test import TestCase, Client + + +class MemeTests(TestCase): + + def test_can_post_to_db(self): + response = json.loads(self.client.post('/', {'url':'https://foo.bar/baz.gif', 'keywords':'omg, this, is, great'}).content) + self.assertTrue(response['success']) + +
9b3443186c103c5f08465773f2e34591aa724179
paypal/gateway.py
paypal/gateway.py
import requests import time import urlparse from paypal import exceptions def post(url, params): """ Make a POST request to the URL using the key-value pairs. Return a set of key-value pairs. :url: URL to post to :params: Dict of parameters to include in post payload """ for k in params.keys(): if type(params[k]) == unicode: params[k] = params[k].encode('utf-8') # PayPal is not expecting urlencoding (e.g. %, +), therefore don't use # urllib.urlencode(). payload = '&'.join(['%s=%s' % (key, val) for (key, val) in params.items()]) start_time = time.time() response = requests.post( url, payload, headers={'content-type': 'text/namevalue; charset=utf-8'}) if response.status_code != requests.codes.ok: raise exceptions.PayPalError("Unable to communicate with PayPal") # Convert response into a simple key-value format pairs = {} for key, values in urlparse.parse_qs(response.content).items(): pairs[key] = values[0] # Add audit information pairs['_raw_request'] = payload pairs['_raw_response'] = response.content pairs['_response_time'] = (time.time() - start_time) * 1000.0 return pairs
import requests import time import urlparse import urllib from paypal import exceptions def post(url, params): """ Make a POST request to the URL using the key-value pairs. Return a set of key-value pairs. :url: URL to post to :params: Dict of parameters to include in post payload """ # Ensure all values are bytestrings before passing to urllib for k in params.keys(): if type(params[k]) == unicode: params[k] = params[k].encode('utf-8') payload = urllib.urlencode(params.items()) start_time = time.time() response = requests.post( url, payload, headers={'content-type': 'text/namevalue; charset=utf-8'}) if response.status_code != requests.codes.ok: raise exceptions.PayPalError("Unable to communicate with PayPal") # Convert response into a simple key-value format pairs = {} for key, values in urlparse.parse_qs(response.content).items(): pairs[key.decode('utf-8')] = values[0].decode('utf-8') # Add audit information pairs['_raw_request'] = payload pairs['_raw_response'] = response.content pairs['_response_time'] = (time.time() - start_time) * 1000.0 return pairs
Revert back to using urllib to encode params
Revert back to using urllib to encode params But take a snippet from #69 which decodes the response back to unicode. Fixes #67
Python
bsd-3-clause
bharling/django-oscar-worldpay,bharling/django-oscar-worldpay,FedeDR/django-oscar-paypal,st8st8/django-oscar-paypal,vintasoftware/django-oscar-paypal,nfletton/django-oscar-paypal,ZachGoldberg/django-oscar-paypal,lpakula/django-oscar-paypal,st8st8/django-oscar-paypal,embedded1/django-oscar-paypal,lpakula/django-oscar-paypal,lpakula/django-oscar-paypal,st8st8/django-oscar-paypal,nfletton/django-oscar-paypal,embedded1/django-oscar-paypal,bharling/django-oscar-worldpay,vintasoftware/django-oscar-paypal,FedeDR/django-oscar-paypal,evonove/django-oscar-paypal,embedded1/django-oscar-paypal,FedeDR/django-oscar-paypal,nfletton/django-oscar-paypal,vintasoftware/django-oscar-paypal,phedoreanu/django-oscar-paypal,evonove/django-oscar-paypal,django-oscar/django-oscar-paypal,bharling/django-oscar-worldpay,enodyt/django-oscar-paypal,enodyt/django-oscar-paypal,evonove/django-oscar-paypal,britco/django-oscar-paypal,phedoreanu/django-oscar-paypal,phedoreanu/django-oscar-paypal,enodyt/django-oscar-paypal,ZachGoldberg/django-oscar-paypal,django-oscar/django-oscar-paypal,britco/django-oscar-paypal,ZachGoldberg/django-oscar-paypal,django-oscar/django-oscar-paypal,britco/django-oscar-paypal
--- +++ @@ -1,6 +1,7 @@ import requests import time import urlparse +import urllib from paypal import exceptions @@ -13,13 +14,12 @@ :url: URL to post to :params: Dict of parameters to include in post payload """ + + # Ensure all values are bytestrings before passing to urllib for k in params.keys(): if type(params[k]) == unicode: params[k] = params[k].encode('utf-8') - - # PayPal is not expecting urlencoding (e.g. %, +), therefore don't use - # urllib.urlencode(). - payload = '&'.join(['%s=%s' % (key, val) for (key, val) in params.items()]) + payload = urllib.urlencode(params.items()) start_time = time.time() response = requests.post( @@ -31,7 +31,7 @@ # Convert response into a simple key-value format pairs = {} for key, values in urlparse.parse_qs(response.content).items(): - pairs[key] = values[0] + pairs[key.decode('utf-8')] = values[0].decode('utf-8') # Add audit information pairs['_raw_request'] = payload
bf36831f062c8262e9d7f8a5f63b5b4a0f413c5f
molecule/default/tests/test_default.py
molecule/default/tests/test_default.py
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB package is installed def test_mongodb_is_installed(host): package = host.package('mongodb-org') assert package.is_installed # check if MongoDB is enabled and running def test_mongod_is_running(host): mongo = host.service('mongod') assert mongo.is_running assert mongo.is_enabled # check if configuration file contains the required line def test_mongod_config_file(File): config_file = File('/etc/mongod.conf') assert config_file.contains('port: 27017') assert config_file.contains('bindIp: 127.0.0.1') assert config_file.is_file # check if mongod process is listening on localhost def test_mongod_is_listening(host): port = host.socket('tcp://127.0.0.1:27017') assert port.is_listening
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB package is installed def test_mongodb_is_installed(host): package = host.package('mongodb-org') assert package.is_installed assert package.version.startswith('3.4.7') # check if MongoDB is enabled and running def test_mongod_is_running(host): mongo = host.service('mongod') assert mongo.is_running assert mongo.is_enabled # check if configuration file contains the required line def test_mongod_config_file(File): config_file = File('/etc/mongod.conf') assert config_file.contains('port: 27017') assert config_file.contains('bindIp: 127.0.0.1') assert config_file.is_file # check if mongod process is listening on localhost def test_mongod_is_listening(host): port = host.socket('tcp://127.0.0.1:27017') assert port.is_listening
Add test of mongodb package version
Add test of mongodb package version
Python
bsd-2-clause
jugatsu-infra/ansible-role-mongodb
--- +++ @@ -10,6 +10,7 @@ def test_mongodb_is_installed(host): package = host.package('mongodb-org') assert package.is_installed + assert package.version.startswith('3.4.7') # check if MongoDB is enabled and running
3a03557d56b9d5591a4049d752a4c0d5089b29cf
performanceplatform/collector/ga/__init__.py
performanceplatform/collector/ga/__init__.py
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from performanceplatform.collector.ga.core \ import create_client, query_documents_for, send_data from performanceplatform.client import DataSet def main(credentials, data_set_config, query, options, start_at, end_at): client = create_client(credentials) documents = query_documents_for( client, query, options, data_set_config['data-type'], start_at, end_at) data_set = DataSet.from_config(data_set_config) chunk_size = options.get('chunk-size', 0) send_data(data_set, documents, chunk_size)
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from performanceplatform.collector.ga.core \ import create_client, query_documents_for, send_data from performanceplatform.client import DataSet def main(credentials, data_set_config, query, options, start_at, end_at): client = create_client(credentials) documents = query_documents_for( client, query, options, data_set_config['data-type'], start_at, end_at) data_set = DataSet.from_config(data_set_config) chunk_size = options.get('chunk-size', 100) send_data(data_set, documents, chunk_size)
Set default chunk size for GA collector to 100
Set default chunk size for GA collector to 100 We would like requests chunked up when talking to backdrop as not doing so has been shown to bring it down. This sets the default to 100 records so that we don't have to remember to set it explicitly in every config.
Python
mit
alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector
--- +++ @@ -16,6 +16,6 @@ start_at, end_at) data_set = DataSet.from_config(data_set_config) - chunk_size = options.get('chunk-size', 0) + chunk_size = options.get('chunk-size', 100) send_data(data_set, documents, chunk_size)
5504dde1cc940fc8f55ff1bcba7ae225ad9759c1
account_invoice_subcontractor/models/hr.py
account_invoice_subcontractor/models/hr.py
# © 2015 Akretion # @author Sébastien BEAU <sebastien.beau@akretion.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models class HrEmployee(models.Model): _inherit = "hr.employee" @api.model def _get_subcontractor_type(self): return [ ("trainee", "Trainee"), ("internal", "Internal"), ("external", "External"), ] subcontractor_company_id = fields.Many2one( "res.company", string="Subcontractor Company" ) subcontractor_type = fields.Selection( string="Subcontractor Type", selection="_get_subcontractor_type", required=True ) commission_rate = fields.Float( help="Rate in % for the commission on subcontractor work", default=10.00 )
# © 2015 Akretion # @author Sébastien BEAU <sebastien.beau@akretion.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models class HrEmployee(models.Model): _inherit = "hr.employee" @api.model def _get_subcontractor_type(self): return [ ("trainee", "Trainee"), ("internal", "Internal"), ("external", "External"), ] subcontractor_company_id = fields.Many2one( "res.company", string="Subcontractor Company" ) subcontractor_type = fields.Selection( string="Subcontractor Type", selection="_get_subcontractor_type", required=True, default="internal", ) commission_rate = fields.Float( help="Rate in % for the commission on subcontractor work", default=10.00 )
FIX set default subcontractor type on employee
FIX set default subcontractor type on employee
Python
agpl-3.0
akretion/subcontractor
--- +++ @@ -20,7 +20,10 @@ "res.company", string="Subcontractor Company" ) subcontractor_type = fields.Selection( - string="Subcontractor Type", selection="_get_subcontractor_type", required=True + string="Subcontractor Type", + selection="_get_subcontractor_type", + required=True, + default="internal", ) commission_rate = fields.Float( help="Rate in % for the commission on subcontractor work", default=10.00
b84105415cf074e76cb2c227e81287e853acb451
tdt/__init__.py
tdt/__init__.py
import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) from dsp_project import DSPProject from dsp_process import DSPProcess from dsp_circuit import DSPCircuit from dsp_buffer import DSPBuffer from dsp_error import DSPError
import logging # Although Python 2.7+ has a logging.NullHandler class available, we should at # least maintain backwards-compatibility with Python 2.6 so that ReadTheDocs.org # can generate our autodocumentation. class NullHandler(logging.Handler): def emit(self, record): pass logger = logging.getLogger(__name__) logger.addHandler(NullHandler()) from dsp_project import DSPProject from dsp_process import DSPProcess from dsp_circuit import DSPCircuit from dsp_buffer import DSPBuffer from dsp_error import DSPError
Switch to built-in NullHandler class for Python 2.6 compatibility
Switch to built-in NullHandler class for Python 2.6 compatibility
Python
bsd-3-clause
LABSN/tdtpy
--- +++ @@ -1,6 +1,13 @@ import logging + +# Although Python 2.7+ has a logging.NullHandler class available, we should at +# least maintain backwards-compatibility with Python 2.6 so that ReadTheDocs.org +# can generate our autodocumentation. +class NullHandler(logging.Handler): + def emit(self, record): + pass logger = logging.getLogger(__name__) -logger.addHandler(logging.NullHandler()) +logger.addHandler(NullHandler()) from dsp_project import DSPProject from dsp_process import DSPProcess
e9cf6bbc5d790dd77fea35ec4875c045cb6f19c3
thefederation/views.py
thefederation/views.py
import time from django.shortcuts import redirect from thefederation.tasks import poll_node from thefederation.utils import is_valid_hostname def register_view(request, host): # TODO rate limit this view per caller ip? if not is_valid_hostname: return redirect("/") if poll_node(host): # Success! return redirect(f"/nodes/{host}") # TODO show an error or something return redirect("/")
from django.shortcuts import redirect from thefederation.tasks import poll_node from thefederation.utils import is_valid_hostname def register_view(request, host): # TODO rate limit this view per caller ip? if not is_valid_hostname: return redirect("/") if poll_node(host): # Success! return redirect(f"/node/{host}") # TODO show an error or something return redirect("/")
Fix redirect to node page after registration
Fix redirect to node page after registration
Python
agpl-3.0
jaywink/the-federation.info,jaywink/the-federation.info,jaywink/diaspora-hub,jaywink/diaspora-hub,jaywink/diaspora-hub,jaywink/the-federation.info
--- +++ @@ -1,5 +1,3 @@ -import time - from django.shortcuts import redirect from thefederation.tasks import poll_node @@ -12,7 +10,7 @@ return redirect("/") if poll_node(host): # Success! - return redirect(f"/nodes/{host}") + return redirect(f"/node/{host}") # TODO show an error or something return redirect("/")
6cc48b08fd0b3a0dda2a8dfdc55b8d8d3b9022b1
pyramda/math/mean_test.py
pyramda/math/mean_test.py
from .mean import mean from pyramda.private.asserts import assert_equal def mean_test(): assert_equal(mean([3, 5, 7]), 5)
from .mean import mean from pyramda.private.asserts import assert_equal def mean_test(): assert_equal(mean([3, 5, 7]), 5) assert_equal(mean([5, 7, 3]), 5)
Add test establishing no change in behavior for unsorted input arrays
Add test establishing no change in behavior for unsorted input arrays
Python
mit
jackfirth/pyramda
--- +++ @@ -4,3 +4,4 @@ def mean_test(): assert_equal(mean([3, 5, 7]), 5) + assert_equal(mean([5, 7, 3]), 5)
e7c6aba7e67a1fde47471bc6fa80894869a6dfc8
src/dogapi/http/service_check.py
src/dogapi/http/service_check.py
__all__ = [ 'ServiceCheckApi', ] import logging import time from dogapi.constants import CheckStatus from dogapi.exceptions import ApiError logger = logging.getLogger('dd.dogapi') class ServiceCheckApi(object): def service_check(self, check, host, status, timestamp=None, message=None, tags=None): if status not in CheckStatus.ALL: raise ApiError('Invalid status, expected one of: %s' \ % ', '.join(CheckStatus.ALL)) body = { 'check': check, 'host': host, 'timestamp': timestamp or time.time(), 'status': status } if message: body['message'] = message if tags: body['tags'] = tags return self.http_request('POST', '/check_run', body)
__all__ = [ 'ServiceCheckApi', ] import logging import time from dogapi.constants import CheckStatus from dogapi.exceptions import ApiError logger = logging.getLogger('dd.dogapi') class ServiceCheckApi(object): def service_check(self, check, host, status, timestamp=None, message=None, tags=None): if status not in CheckStatus.ALL: raise ApiError('Invalid status, expected one of: %s' \ % ', '.join(CheckStatus.ALL)) body = { 'check': check, 'host_name': host, 'timestamp': timestamp or time.time(), 'status': status } if message: body['message'] = message if tags: body['tags'] = tags return self.http_request('POST', '/check_run', body)
Fix host parameter name for the service check API
Fix host parameter name for the service check API
Python
bsd-3-clause
DataDog/dogapi,DataDog/dogapi
--- +++ @@ -18,7 +18,7 @@ body = { 'check': check, - 'host': host, + 'host_name': host, 'timestamp': timestamp or time.time(), 'status': status }
0e7d1df97590152781e364b3acea34e0bb42bc2a
tests/constants_test.py
tests/constants_test.py
import unittest from mtglib.constants import base_url, card_flags class DescribeConstants(unittest.TestCase): def should_have_base_url(self): url = ('http://gatherer.wizards.com/Pages/Search/Default.aspx' '?output=standard&') assert base_url == url def should_have_card_flags(self): assert card_flags == ['text', 'color', 'subtype', 'type', 'set', 'cmc', 'power', 'tough', 'rarity', 'name', 'block']
import unittest from mtglib.constants import base_url, card_flags class DescribeConstants(unittest.TestCase): def should_have_base_url(self): url = ('http://gatherer.wizards.com/Pages/Search/Default.aspx' '?output=standard&action=advanced&') assert base_url == url def should_have_card_flags(self): assert card_flags == ['text', 'color', 'subtype', 'type', 'set', 'cmc', 'power', 'tough', 'rarity', 'name', 'block']
Update base url in tests.
Update base url in tests.
Python
mit
chigby/mtg,chigby/mtg
--- +++ @@ -6,7 +6,7 @@ def should_have_base_url(self): url = ('http://gatherer.wizards.com/Pages/Search/Default.aspx' - '?output=standard&') + '?output=standard&action=advanced&') assert base_url == url def should_have_card_flags(self):
95dd556423b0f8d8ec2df9cd7e1f494206bc2104
tests/frontend_tests.py
tests/frontend_tests.py
# -*- coding: utf-8 -*- from . import FogspoonAppTestCase, settings from fogspoon.frontend import create_app class FogspoonFrontendTestCase(FogspoonAppTestCase): def test_front(self): r = self.get('/') self.assertOkHtml(r) self.assertEquals(1677, len(r.data)) def _create_app(self): return create_app(settings) def setUp(self): super(FogspoonFrontendTestCase, self).setUp()
# -*- coding: utf-8 -*- from . import FogspoonAppTestCase, settings from fogspoon.frontend import create_app class FogspoonFrontendTestCase(FogspoonAppTestCase): def test_front(self): r = self.get('/') self.assertOkHtml(r) self.assertEquals(1648, len(r.data)) def _create_app(self): return create_app(settings) def setUp(self): super(FogspoonFrontendTestCase, self).setUp()
Fix unittest issue with last commit
Fix unittest issue with last commit
Python
mit
tkalus/fogspoon,tkalus/fogspoon,tkalus/fogspoon,tkalus/fogspoon
--- +++ @@ -9,7 +9,7 @@ def test_front(self): r = self.get('/') self.assertOkHtml(r) - self.assertEquals(1677, len(r.data)) + self.assertEquals(1648, len(r.data)) def _create_app(self): return create_app(settings)
d6643fa72f6783fc0f92cb9d8f44daf52fc1bf5f
registry/admin.py
registry/admin.py
from models import Resource, ResourceCollection, Contact from django.contrib import admin class ResourceAdmin(admin.ModelAdmin): list_display = ('title', 'couchDB_link', 'edit_metadata_link', 'published') filter_horizontal = ['editors', 'collections'] list_filter = ('published', 'collections') search_fields = ['title', 'metadata_id'] class ResourceCollectionAdmin(admin.ModelAdmin): filter_horizontal = [ 'editors', 'parents' ] list_display = ('title', 'collection_id', 'couchDB_link') search_fields = ['title', 'collection_id'] admin.site.register(Resource, ResourceAdmin) admin.site.register(ResourceCollection, ResourceCollectionAdmin) admin.site.register(Contact)
from models import Resource, ResourceCollection, Contact from django.contrib import admin def make_published(modeladmin, request, queryset): queryset.update(published=True) make_published.short_description = "Mark selected resources as published" class ResourceAdmin(admin.ModelAdmin): list_display = ('title', 'couchDB_link', 'edit_metadata_link', 'published') filter_horizontal = ['editors', 'collections'] list_filter = ('published', 'collections') search_fields = ['title', 'metadata_id'] actions = [make_published] class ResourceCollectionAdmin(admin.ModelAdmin): filter_horizontal = [ 'editors', 'parents' ] list_display = ('title', 'collection_id', 'couchDB_link') search_fields = ['title', 'collection_id'] admin.site.register(Resource, ResourceAdmin) admin.site.register(ResourceCollection, ResourceCollectionAdmin) admin.site.register(Contact)
Add bulk updating of a model's published status
Add bulk updating of a model's published status
Python
bsd-3-clause
usgin/metadata-repository,usgin/metadata-repository,usgin/nrrc-repository,usgin/nrrc-repository
--- +++ @@ -1,11 +1,16 @@ from models import Resource, ResourceCollection, Contact from django.contrib import admin + +def make_published(modeladmin, request, queryset): + queryset.update(published=True) +make_published.short_description = "Mark selected resources as published" class ResourceAdmin(admin.ModelAdmin): list_display = ('title', 'couchDB_link', 'edit_metadata_link', 'published') filter_horizontal = ['editors', 'collections'] list_filter = ('published', 'collections') search_fields = ['title', 'metadata_id'] + actions = [make_published] class ResourceCollectionAdmin(admin.ModelAdmin): filter_horizontal = [ 'editors', 'parents' ]
9f323dae623e38261a1a63016b8447c96fe021b4
python-pscheduler/pscheduler/pscheduler/api.py
python-pscheduler/pscheduler/pscheduler/api.py
""" Functions related to the pScheduler REST API """ def api_root(): return '/pscheduler' def api_url(host = None, # Don't default this. It breaks 'None' behavior. path = None, port = None, protocol = 'http' ): if path is not None and path.startswith('/'): path = path[1:] return protocol + '://' \ + ('127.0.0.1' if host is None else str(host)) \ + ('' if port is None else (':' + str(port))) \ + api_root() + '/'\ + ('' if path is None else str(path)) if __name__ == "__main__": print api_url() print api_url(protocol='https') print api_url(host='host.example.com') print api_url(host='host.example.com', path='/both-slash') print api_url(host='host.example.com', path='both-noslash') print api_url(path='nohost')
""" Functions related to the pScheduler REST API """ import socket def api_root(): "Return the standard root location of the pScheduler hierarchy" return '/pscheduler' def api_url(host = None, path = None, port = None, protocol = 'http' ): """Format a URL for use with the pScheduler API.""" if path is not None and path.startswith('/'): path = path[1:] return protocol + '://' \ + (socket.getfqdn() if host is None else str(host)) \ + ('' if port is None else (':' + str(port))) \ + api_root() + '/'\ + ('' if path is None else str(path)) if __name__ == "__main__": print api_url() print api_url(protocol='https') print api_url(host='host.example.com') print api_url(host='host.example.com', path='/both-slash') print api_url(host='host.example.com', path='both-noslash') print api_url(path='nohost') print print api_full_host()
Return fully-qualified URLS. Doc changes.
Return fully-qualified URLS. Doc changes.
Python
apache-2.0
perfsonar/pscheduler,perfsonar/pscheduler,perfsonar/pscheduler,perfsonar/pscheduler,mfeit-internet2/pscheduler-dev,mfeit-internet2/pscheduler-dev
--- +++ @@ -2,19 +2,23 @@ Functions related to the pScheduler REST API """ +import socket + def api_root(): + "Return the standard root location of the pScheduler hierarchy" return '/pscheduler' -def api_url(host = None, # Don't default this. It breaks 'None' behavior. +def api_url(host = None, path = None, port = None, protocol = 'http' ): + """Format a URL for use with the pScheduler API.""" if path is not None and path.startswith('/'): path = path[1:] return protocol + '://' \ - + ('127.0.0.1' if host is None else str(host)) \ + + (socket.getfqdn() if host is None else str(host)) \ + ('' if port is None else (':' + str(port))) \ + api_root() + '/'\ + ('' if path is None else str(path)) @@ -26,3 +30,5 @@ print api_url(host='host.example.com', path='/both-slash') print api_url(host='host.example.com', path='both-noslash') print api_url(path='nohost') + print + print api_full_host()
002f57fe0b44251357ebc3dcd991af0b7cafd56c
src/gateway/__init__.py
src/gateway/__init__.py
# Copyright (C) 2016 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """ Module containing the functionality provided by the gateway. """ __version__ = '2.24.0'
# Copyright (C) 2016 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """ Module containing the functionality provided by the gateway. """ __version__ = '2.23.0'
Change version back te 2.23.0
Change version back te 2.23.0
Python
agpl-3.0
openmotics/gateway,openmotics/gateway
--- +++ @@ -14,4 +14,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. """ Module containing the functionality provided by the gateway. """ -__version__ = '2.24.0' +__version__ = '2.23.0'
51d50f65859d7b57fa1f653caf43707237f05cd1
u2flib_server/__init__.py
u2flib_server/__init__.py
# Copyright (c) 2013 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. __version__ = "3.2.1-dev"
# Copyright (c) 2013 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. __version__ = "3.3.0-dev"
Increment version since the change from M2Crypto to cryptography is fairly significant
Increment version since the change from M2Crypto to cryptography is fairly significant
Python
bsd-2-clause
Yubico/python-u2flib-server,moreati/python-u2flib-server
--- +++ @@ -25,4 +25,4 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -__version__ = "3.2.1-dev" +__version__ = "3.3.0-dev"
0463adb64976c05bf22edc4d819a4ddeabc013f6
src/txkube/testing/strategies.py
src/txkube/testing/strategies.py
# Copyright Least Authority Enterprises. # See LICENSE for details. """ Hypothesis strategies useful for testing ``pykube``. """ from string import ascii_lowercase, digits from pyrsistent import pmap from hypothesis.strategies import builds, fixed_dictionaries, text, lists, sampled_from from .. import NamespacedObjectMetadata, Namespace, ConfigMap def object_name(): # https://kubernetes.io/docs/user-guide/identifiers/#names # [a-z0-9]([-a-z0-9]*[a-z0-9])? alphabet = ascii_lowercase + digits + b"-" return builds( lambda parts: b"".join(parts).decode("ascii"), lists(sampled_from(alphabet), average_size=10), ) def object_metadatas(): return builds( NamespacedObjectMetadata, items=fixed_dictionaries({ u"name": object_name(), }).map(pmap), ) def namespaced_object_metadatas(): return builds( lambda metadata, namespace: metadata.transform( ["items"], lambda items: items.set(u"namespace", namespace), ), metadata=object_metadatas(), namespace=object_name(), ) def namespaces(): return builds( Namespace, metadata=object_metadatas(), ) def configmaps(): """ Strategy for creating ``ConfigMap`` Kubernetes objects. """ return builds( ConfigMap, metadata=namespaced_object_metadatas(), )
# Copyright Least Authority Enterprises. # See LICENSE for details. """ Hypothesis strategies useful for testing ``pykube``. """ from string import ascii_lowercase, digits from pyrsistent import pmap from hypothesis.strategies import builds, fixed_dictionaries, text, lists, sampled_from from .. import NamespacedObjectMetadata, Namespace, ConfigMap def object_name(): # https://kubernetes.io/docs/user-guide/identifiers/#names # [a-z0-9]([-a-z0-9]*[a-z0-9])? alphabet = ascii_lowercase + digits + b"-" return builds( lambda parts: b"".join(parts).decode("ascii"), lists(sampled_from(alphabet), min_size=1, average_size=10), ).filter( lambda value: not (value.startswith(b"-") or value.endswith(b"-")) ) def object_metadatas(): return builds( NamespacedObjectMetadata, items=fixed_dictionaries({ u"name": object_name(), }).map(pmap), ) def namespaced_object_metadatas(): return builds( lambda metadata, namespace: metadata.transform( ["items"], lambda items: items.set(u"namespace", namespace), ), metadata=object_metadatas(), namespace=object_name(), ) def namespaces(): return builds( Namespace, metadata=object_metadatas(), ) def configmaps(): """ Strategy for creating ``ConfigMap`` Kubernetes objects. """ return builds( ConfigMap, metadata=namespaced_object_metadatas(), )
Apply a couple refinements to object name strategy.
Apply a couple refinements to object name strategy. Zero length names are invalid. So are names beginning or ending with -.
Python
mit
LeastAuthority/txkube
--- +++ @@ -20,9 +20,10 @@ alphabet = ascii_lowercase + digits + b"-" return builds( lambda parts: b"".join(parts).decode("ascii"), - lists(sampled_from(alphabet), average_size=10), + lists(sampled_from(alphabet), min_size=1, average_size=10), + ).filter( + lambda value: not (value.startswith(b"-") or value.endswith(b"-")) ) - def object_metadatas(): return builds(
d843b9c51888fb0391fb303f1aa3d74e00fcd0c1
codepot/views/prices/__init__.py
codepot/views/prices/__init__.py
import time from django.utils import timezone from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.status import HTTP_200_OK from codepot.models import Product @api_view(['GET', ]) def get_prices(request, **kwargs): products = Product.objects.all() now = timezone.now() return Response( data={ 'prices': [ { 'id': p.id, 'name': p.name, 'dateTo': int(time.mktime(p.price_tier.date_to.timetuple()) * 1000), 'priceNet': p.price_net, 'priceVat': p.price_vat, 'active': p.price_tier.date_from < now < p.price_tier.date_to, } for p in products ], }, status=HTTP_200_OK )
import time from django.utils import timezone from rest_framework.decorators import ( api_view, permission_classes, ) from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.status import HTTP_200_OK from codepot.models import Product @api_view(['GET', ]) @permission_classes((AllowAny,)) def get_prices(request, **kwargs): products = Product.objects.all() now = timezone.now() return Response( data={ 'prices': [ { 'id': p.id, 'name': p.name, 'dateTo': int(time.mktime(p.price_tier.date_to.timetuple()) * 1000), 'priceNet': p.price_net, 'priceVat': p.price_vat, 'active': p.price_tier.date_from < now < p.price_tier.date_to, } for p in products ], }, status=HTTP_200_OK )
Allow to access prices without auth.
Allow to access prices without auth.
Python
mit
codepotpl/codepot-backend,codepotpl/codepot-backend,codepotpl/codepot-backend
--- +++ @@ -1,14 +1,18 @@ import time from django.utils import timezone -from rest_framework.decorators import api_view +from rest_framework.decorators import ( + api_view, + permission_classes, +) +from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.status import HTTP_200_OK from codepot.models import Product - @api_view(['GET', ]) +@permission_classes((AllowAny,)) def get_prices(request, **kwargs): products = Product.objects.all() now = timezone.now()
2120b8ef1780c492a8f53b54baf4f2210d3515f5
components/includes/utilities.py
components/includes/utilities.py
import random import json import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if result['return'] == rand: return True else: return False except Exception as e: print "Exception while pinging: ", e return False def multiping(port, auths=[]): result = True for a_ip in auths: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #s.settimeout(120.0) sock.connect((a_ip, int(port))) if not ping(sock): result = False sock.shutdown(socket.SHUT_RDWR) sock.close() return result def alive(port, machines=[]): attempted = 0 success = False while (attempted < conf.tries): try: if utilities.multiping(port, machines): success = True break except Exception as e: attemped += 1 return success
import random import json import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if result['return'] == rand: return True else: return False except Exception as e: print "Exception while pinging: ", e return False def multiping(port, auths=[]): result = True for a_ip in auths: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #s.settimeout(120.0) sock.connect((a_ip, int(port))) if not ping(sock): result = False sock.shutdown(socket.SHUT_RDWR) sock.close() return result def alive(port, machines=[]): attempted = 0 success = False while (attempted < conf.tries): try: if utilities.multiping(port, machines): success = True break except Exception as e: attempted += 1 return success
Clean up, comments, liveness checking, robust data transfer
Clean up, comments, liveness checking, robust data transfer
Python
bsd-2-clause
mavroudisv/Crux
--- +++ @@ -44,6 +44,6 @@ success = True break except Exception as e: - attemped += 1 + attempted += 1 return success
e28541c00be7f02b3ca6de25e4f95ce4dd099524
nodeconductor/iaas/perms.py
nodeconductor/iaas/perms.py
from nodeconductor.core.permissions import FilteredCollaboratorsPermissionLogic, StaffPermissionLogic from nodeconductor.structure.models import ProjectRole PERMISSION_LOGICS = ( ('iaas.Instance', FilteredCollaboratorsPermissionLogic( collaborators_query='project__roles__permission_group__user', collaborators_filter={ 'project__roles__role_type': ProjectRole.ADMINISTRATOR, }, any_permission=True, )), ('iaas.Template', StaffPermissionLogic(any_permission=True)), ('iaas.TemplateMapping', StaffPermissionLogic(any_permission=True)), ('iaas.Image', StaffPermissionLogic(any_permission=True)), ('iaas.TemplateLicense', StaffPermissionLogic(any_permission=True)), )
from nodeconductor.core.permissions import FilteredCollaboratorsPermissionLogic, StaffPermissionLogic from nodeconductor.structure.models import ProjectRole PERMISSION_LOGICS = ( ('iaas.Instance', FilteredCollaboratorsPermissionLogic( collaborators_query='project__roles__permission_group__user', collaborators_filter={ 'project__roles__role_type': ProjectRole.ADMINISTRATOR, }, any_permission=True, )), ('iaas.Template', StaffPermissionLogic(any_permission=True)), ('iaas.TemplateMapping', StaffPermissionLogic(any_permission=True)), ('iaas.Image', StaffPermissionLogic(any_permission=True)), ('iaas.TemplateLicense', StaffPermissionLogic(any_permission=True)), ('iaas.InstanceSlaHistory', StaffPermissionLogic(any_permission=True)), )
Allow InstanceSlaHistory to be managed by staff
Allow InstanceSlaHistory to be managed by staff
Python
mit
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
--- +++ @@ -15,5 +15,5 @@ ('iaas.TemplateMapping', StaffPermissionLogic(any_permission=True)), ('iaas.Image', StaffPermissionLogic(any_permission=True)), ('iaas.TemplateLicense', StaffPermissionLogic(any_permission=True)), - + ('iaas.InstanceSlaHistory', StaffPermissionLogic(any_permission=True)), )
72b55eb8aeabf73159f6b14c157a155e64427739
orchard/cli/apps_command.py
orchard/cli/apps_command.py
from .command import Command from ..api.errors import BadRequest import logging import sys log = logging.getLogger(__name__) class AppsCommand(Command): """ Manage Orchard apps. Usage: apps COMMAND [ARGS...] Commands: ls List apps (default) create Add a new app rm Remove an app """ def parse(self, argv, global_options): if len(argv) == 0: argv = ['ls'] return super(AppsCommand, self).parse(argv, global_options) def ls(self, options): """ List apps. Usage: ls """ apps = self.api.apps if apps: for app in apps: print app.name else: log.error("You don't have any apps yet. Run \"orchard apps create\" to create one.") def create(self, options): """ Create a new app. Usage: create NAME """ # TODO: handle invalid or clashing app name try: app = self.api.apps.create({"name": options['NAME']}) except BadRequest as e: log.error(e.json) sys.exit(1) log.info("Created %s", app.name) def rm(self, options): """ Remove an app. Usage: rm NAME [NAME...] """ # TODO: handle unrecognised app name for name in options['NAME']: self.api.apps[name].delete() log.info("Deleted %s", name)
from .command import Command from ..api.errors import BadRequest import logging import sys log = logging.getLogger(__name__) class AppsCommand(Command): """ Manage Orchard apps. Usage: apps COMMAND [ARGS...] Commands: ls List apps (default) create Add a new app rm Remove an app """ def parse(self, argv, global_options): if len(argv) == 0: argv = ['ls'] return super(AppsCommand, self).parse(argv, global_options) def ls(self, options): """ List apps. Usage: ls """ apps = self.api.apps if apps: for app in apps: print app.name else: log.error("You don't have any apps yet. Run \"orchard apps create\" to create one.") def create(self, options): """ Create a new app. Usage: create NAME """ try: app = self.api.apps.create({"name": options['NAME']}) except BadRequest as e: name_errors = e.json.get('name', None) if name_errors: log.error("\n".join(name_errors)) else: log.error(e.json) sys.exit(1) log.info("Created %s", app.name) def rm(self, options): """ Remove an app. Usage: rm NAME [NAME...] """ # TODO: handle unrecognised app name for name in options['NAME']: self.api.apps[name].delete() log.info("Deleted %s", name)
Handle app-name validation failures better.
Handle app-name validation failures better.
Python
apache-2.0
orchardup/python-orchard,orchardup/python-orchard
--- +++ @@ -41,11 +41,16 @@ Create a new app. Usage: create NAME """ - # TODO: handle invalid or clashing app name try: app = self.api.apps.create({"name": options['NAME']}) except BadRequest as e: - log.error(e.json) + name_errors = e.json.get('name', None) + + if name_errors: + log.error("\n".join(name_errors)) + else: + log.error(e.json) + sys.exit(1) log.info("Created %s", app.name)
eabefc9c3d8502e16db0bfd07889b107ca3626ff
web/impact/impact/v1/views/base_history_view.py
web/impact/impact/v1/views/base_history_view.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ImpactMetadata class BaseHistoryView(APIView): metadata_class = ImpactMetadata permission_classes = ( V1APIPermissions, ) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get(self, request, pk): self.instance = self.model.objects.get(pk=pk) events = [] for event_class in self.event_classes: events = events + event_class.events(self.instance) result = { "history": sorted([event.serialize() for event in events], key=lambda e: e["datetime"]) } return Response(result)
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework.response import Response from rest_framework.views import APIView from impact.permissions import ( V1APIPermissions, ) from impact.v1.metadata import ImpactMetadata class BaseHistoryView(APIView): metadata_class = ImpactMetadata permission_classes = ( V1APIPermissions, ) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def get(self, request, pk): self.instance = self.model.objects.get(pk=pk) events = [] for event_class in self.event_classes: events = events + event_class.events(self.instance) result = { "results": sorted([event.serialize() for event in events], key=lambda e: e["datetime"]) } return Response(result)
Switch from "history" to "results" in the history API calls
[AC-4764] Switch from "history" to "results" in the history API calls
Python
mit
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
--- +++ @@ -26,7 +26,7 @@ for event_class in self.event_classes: events = events + event_class.events(self.instance) result = { - "history": sorted([event.serialize() for event in events], + "results": sorted([event.serialize() for event in events], key=lambda e: e["datetime"]) } return Response(result)
0fde64441778eb03b194b1355df9872bccbcd481
zephyr/management/commands/sync_api_key.py
zephyr/management/commands/sync_api_key.py
from __future__ import absolute_import from django.core.management.base import BaseCommand from zephyr.models import get_user_profile_by_email import os from ConfigParser import SafeConfigParser class Command(BaseCommand): help = """Reset all colors for a person to the default grey""" def handle(self, *args, **options): config_file = os.path.join(os.environ["HOME"], ".humbugrc") if not os.path.exists(config_file): raise RuntimeError("Not ~/.humbughrc") config = SafeConfigParser() with file(config_file, 'r') as f: config.readfp(f, config_file) api_key = config.get("api", "key") email = config.get("api", "email") user_profile = get_user_profile_by_email(email) user_profile.api_key = api_key user_profile.save()
from __future__ import absolute_import from django.core.management.base import BaseCommand from zephyr.models import get_user_profile_by_email import os from ConfigParser import SafeConfigParser class Command(BaseCommand): help = """Reset all colors for a person to the default grey""" def handle(self, *args, **options): config_file = os.path.join(os.environ["HOME"], ".humbugrc") if not os.path.exists(config_file): raise RuntimeError("No ~/.humbugrc found") config = SafeConfigParser() with file(config_file, 'r') as f: config.readfp(f, config_file) api_key = config.get("api", "key") email = config.get("api", "email") user_profile = get_user_profile_by_email(email) user_profile.api_key = api_key user_profile.save()
Fix typos in "No ~/.humbugrc found" error message
Fix typos in "No ~/.humbugrc found" error message (imported from commit b0c8aab4668751d9b1d12792d249645498a95932)
Python
apache-2.0
Suninus/zulip,jphilipsen05/zulip,thomasboyt/zulip,easyfmxu/zulip,zhaoweigg/zulip,seapasulli/zulip,moria/zulip,AZtheAsian/zulip,themass/zulip,ryansnowboarder/zulip,jeffcao/zulip,MariaFaBella85/zulip,Frouk/zulip,zofuthan/zulip,zofuthan/zulip,so0k/zulip,deer-hope/zulip,MayB/zulip,RobotCaleb/zulip,mahim97/zulip,tommyip/zulip,MayB/zulip,jessedhillon/zulip,wdaher/zulip,voidException/zulip,avastu/zulip,MariaFaBella85/zulip,hackerkid/zulip,bowlofstew/zulip,rishig/zulip,saitodisse/zulip,MariaFaBella85/zulip,RobotCaleb/zulip,jimmy54/zulip,Diptanshu8/zulip,ufosky-server/zulip,ryansnowboarder/zulip,tiansiyuan/zulip,dnmfarrell/zulip,tdr130/zulip,moria/zulip,vabs22/zulip,technicalpickles/zulip,DazWorrall/zulip,ashwinirudrappa/zulip,showell/zulip,noroot/zulip,zhaoweigg/zulip,ericzhou2008/zulip,MayB/zulip,so0k/zulip,Batterfii/zulip,mahim97/zulip,itnihao/zulip,arpitpanwar/zulip,dhcrzf/zulip,zorojean/zulip,codeKonami/zulip,Qgap/zulip,seapasulli/zulip,vikas-parashar/zulip,grave-w-grave/zulip,tdr130/zulip,dxq-git/zulip,bluesea/zulip,kou/zulip,sup95/zulip,firstblade/zulip,zulip/zulip,Qgap/zulip,mansilladev/zulip,niftynei/zulip,schatt/zulip,adnanh/zulip,xuxiao/zulip,Suninus/zulip,shaunstanislaus/zulip,jessedhillon/zulip,he15his/zulip,dattatreya303/zulip,themass/zulip,sharmaeklavya2/zulip,tbutter/zulip,suxinde2009/zulip,xuanhan863/zulip,tbutter/zulip,Cheppers/zulip,dxq-git/zulip,j831/zulip,mansilladev/zulip,ryansnowboarder/zulip,KJin99/zulip,SmartPeople/zulip,m1ssou/zulip,Frouk/zulip,jimmy54/zulip,dnmfarrell/zulip,punchagan/zulip,mdavid/zulip,dotcool/zulip,nicholasbs/zulip,jrowan/zulip,vabs22/zulip,kou/zulip,KingxBanana/zulip,themass/zulip,timabbott/zulip,j831/zulip,praveenaki/zulip,huangkebo/zulip,calvinleenyc/zulip,PhilSk/zulip,peguin40/zulip,j831/zulip,cosmicAsymmetry/zulip,Frouk/zulip,amallia/zulip,ApsOps/zulip,EasonYi/zulip,KJin99/zulip,schatt/zulip,avastu/zulip,guiquanz/zulip,kokoar/zulip,jerryge/zulip,bssrdf/zulip,ipernet/zulip,paxapy/zulip,JanzTam/zulip,arpith/zulip,christi3k/zulip,sharmaeklavya2/zulip,verma-varsha/zulip,karamcnair/zulip,bowlofstew/zulip,codeKonami/zulip,showell/zulip,kaiyuanheshang/zulip,akuseru/zulip,codeKonami/zulip,tdr130/zulip,udxxabp/zulip,seapasulli/zulip,johnnygaddarr/zulip,ApsOps/zulip,zachallaun/zulip,Qgap/zulip,Batterfii/zulip,aps-sids/zulip,fw1121/zulip,kou/zulip,aakash-cr7/zulip,hengqujushi/zulip,gigawhitlocks/zulip,yocome/zulip,Qgap/zulip,showell/zulip,LeeRisk/zulip,joshisa/zulip,jainayush975/zulip,jerryge/zulip,kou/zulip,hj3938/zulip,stamhe/zulip,shubhamdhama/zulip,SmartPeople/zulip,ryansnowboarder/zulip,fw1121/zulip,atomic-labs/zulip,hj3938/zulip,verma-varsha/zulip,eeshangarg/zulip,reyha/zulip,umkay/zulip,peguin40/zulip,AZtheAsian/zulip,Suninus/zulip,zorojean/zulip,hayderimran7/zulip,stamhe/zulip,DazWorrall/zulip,SmartPeople/zulip,zorojean/zulip,synicalsyntax/zulip,ufosky-server/zulip,zorojean/zulip,paxapy/zulip,itnihao/zulip,LeeRisk/zulip,jainayush975/zulip,levixie/zulip,dotcool/zulip,arpitpanwar/zulip,paxapy/zulip,jerryge/zulip,zofuthan/zulip,grave-w-grave/zulip,sup95/zulip,karamcnair/zulip,praveenaki/zulip,ryansnowboarder/zulip,bluesea/zulip,zacps/zulip,blaze225/zulip,LAndreas/zulip,guiquanz/zulip,bowlofstew/zulip,susansls/zulip,Drooids/zulip,andersk/zulip,xuxiao/zulip,atomic-labs/zulip,jackrzhang/zulip,natanovia/zulip,KingxBanana/zulip,hustlzp/zulip,reyha/zulip,johnny9/zulip,shaunstanislaus/zulip,shrikrishnaholla/zulip,LAndreas/zulip,jackrzhang/zulip,praveenaki/zulip,wweiradio/zulip,andersk/zulip,ericzhou2008/zulip,suxinde2009/zulip,gkotian/zulip,punchagan/zulip,Juanvulcano/zulip,rishig/zulip,proliming/zulip,bitemyapp/zulip,bitemyapp/zulip,pradiptad/zulip,yuvipanda/zulip,jonesgithub/zulip,shubhamdhama/zulip,so0k/zulip,huangkebo/zulip,voidException/zulip,mdavid/zulip,tommyip/zulip,johnny9/zulip,nicholasbs/zulip,johnnygaddarr/zulip,gkotian/zulip,dwrpayne/zulip,Drooids/zulip,MayB/zulip,ufosky-server/zulip,Galexrt/zulip,vakila/zulip,amyliu345/zulip,RobotCaleb/zulip,saitodisse/zulip,sup95/zulip,peiwei/zulip,christi3k/zulip,babbage/zulip,zwily/zulip,christi3k/zulip,dnmfarrell/zulip,Jianchun1/zulip,bitemyapp/zulip,fw1121/zulip,amallia/zulip,bitemyapp/zulip,qq1012803704/zulip,jrowan/zulip,saitodisse/zulip,RobotCaleb/zulip,xuanhan863/zulip,brockwhittaker/zulip,schatt/zulip,eastlhu/zulip,joshisa/zulip,calvinleenyc/zulip,brainwane/zulip,kaiyuanheshang/zulip,hayderimran7/zulip,aakash-cr7/zulip,niftynei/zulip,suxinde2009/zulip,Frouk/zulip,peguin40/zulip,tiansiyuan/zulip,JanzTam/zulip,pradiptad/zulip,atomic-labs/zulip,Frouk/zulip,deer-hope/zulip,armooo/zulip,developerfm/zulip,vakila/zulip,zorojean/zulip,dnmfarrell/zulip,RobotCaleb/zulip,willingc/zulip,gigawhitlocks/zulip,ikasumiwt/zulip,jainayush975/zulip,stamhe/zulip,suxinde2009/zulip,brockwhittaker/zulip,bastianh/zulip,guiquanz/zulip,mdavid/zulip,aliceriot/zulip,levixie/zulip,wavelets/zulip,dattatreya303/zulip,umkay/zulip,ericzhou2008/zulip,johnny9/zulip,amyliu345/zulip,adnanh/zulip,stamhe/zulip,shubhamdhama/zulip,atomic-labs/zulip,souravbadami/zulip,Jianchun1/zulip,hayderimran7/zulip,andersk/zulip,guiquanz/zulip,kaiyuanheshang/zulip,gigawhitlocks/zulip,PhilSk/zulip,tdr130/zulip,andersk/zulip,lfranchi/zulip,ryanbackman/zulip,Vallher/zulip,jphilipsen05/zulip,moria/zulip,cosmicAsymmetry/zulip,peguin40/zulip,amanharitsh123/zulip,esander91/zulip,PaulPetring/zulip,johnny9/zulip,joyhchen/zulip,mdavid/zulip,Juanvulcano/zulip,bowlofstew/zulip,hafeez3000/zulip,hafeez3000/zulip,hengqujushi/zulip,bitemyapp/zulip,aps-sids/zulip,grave-w-grave/zulip,joshisa/zulip,brockwhittaker/zulip,firstblade/zulip,tbutter/zulip,karamcnair/zulip,hustlzp/zulip,RobotCaleb/zulip,tbutter/zulip,wweiradio/zulip,timabbott/zulip,itnihao/zulip,vakila/zulip,EasonYi/zulip,guiquanz/zulip,wdaher/zulip,developerfm/zulip,dhcrzf/zulip,eeshangarg/zulip,shubhamdhama/zulip,stamhe/zulip,easyfmxu/zulip,easyfmxu/zulip,Vallher/zulip,mdavid/zulip,blaze225/zulip,nicholasbs/zulip,KingxBanana/zulip,swinghu/zulip,shrikrishnaholla/zulip,krtkmj/zulip,PhilSk/zulip,joyhchen/zulip,jerryge/zulip,lfranchi/zulip,glovebx/zulip,souravbadami/zulip,rishig/zulip,rishig/zulip,SmartPeople/zulip,amyliu345/zulip,gkotian/zulip,akuseru/zulip,ufosky-server/zulip,atomic-labs/zulip,arpitpanwar/zulip,bastianh/zulip,zofuthan/zulip,Batterfii/zulip,akuseru/zulip,dattatreya303/zulip,timabbott/zulip,qq1012803704/zulip,jeffcao/zulip,tiansiyuan/zulip,Juanvulcano/zulip,fw1121/zulip,deer-hope/zulip,verma-varsha/zulip,babbage/zulip,joshisa/zulip,aps-sids/zulip,Jianchun1/zulip,zofuthan/zulip,bluesea/zulip,Frouk/zulip,punchagan/zulip,amyliu345/zulip,proliming/zulip,moria/zulip,sonali0901/zulip,amanharitsh123/zulip,arpith/zulip,ikasumiwt/zulip,ahmadassaf/zulip,gkotian/zulip,arpitpanwar/zulip,hafeez3000/zulip,Galexrt/zulip,vabs22/zulip,umkay/zulip,johnnygaddarr/zulip,udxxabp/zulip,mohsenSy/zulip,developerfm/zulip,johnnygaddarr/zulip,bitemyapp/zulip,ahmadassaf/zulip,themass/zulip,kaiyuanheshang/zulip,stamhe/zulip,dotcool/zulip,vakila/zulip,shaunstanislaus/zulip,Galexrt/zulip,Drooids/zulip,he15his/zulip,willingc/zulip,developerfm/zulip,Diptanshu8/zulip,alliejones/zulip,umkay/zulip,yocome/zulip,bitemyapp/zulip,gkotian/zulip,eeshangarg/zulip,Vallher/zulip,dawran6/zulip,mahim97/zulip,mohsenSy/zulip,glovebx/zulip,Jianchun1/zulip,pradiptad/zulip,Drooids/zulip,ryanbackman/zulip,zulip/zulip,mdavid/zulip,TigorC/zulip,Jianchun1/zulip,esander91/zulip,jeffcao/zulip,dotcool/zulip,mohsenSy/zulip,kaiyuanheshang/zulip,jimmy54/zulip,ipernet/zulip,zacps/zulip,punchagan/zulip,schatt/zulip,KJin99/zulip,jrowan/zulip,easyfmxu/zulip,avastu/zulip,gigawhitlocks/zulip,wangdeshui/zulip,ApsOps/zulip,susansls/zulip,kou/zulip,susansls/zulip,alliejones/zulip,punchagan/zulip,easyfmxu/zulip,itnihao/zulip,amyliu345/zulip,kokoar/zulip,yocome/zulip,cosmicAsymmetry/zulip,bastianh/zulip,hengqujushi/zulip,lfranchi/zulip,zachallaun/zulip,aliceriot/zulip,verma-varsha/zulip,itnihao/zulip,PhilSk/zulip,KJin99/zulip,vabs22/zulip,jessedhillon/zulip,souravbadami/zulip,luyifan/zulip,wweiradio/zulip,armooo/zulip,hustlzp/zulip,RobotCaleb/zulip,codeKonami/zulip,amanharitsh123/zulip,hustlzp/zulip,luyifan/zulip,zulip/zulip,dwrpayne/zulip,LAndreas/zulip,Juanvulcano/zulip,bowlofstew/zulip,JPJPJPOPOP/zulip,sonali0901/zulip,ahmadassaf/zulip,wangdeshui/zulip,amallia/zulip,JanzTam/zulip,seapasulli/zulip,vaidap/zulip,hustlzp/zulip,niftynei/zulip,m1ssou/zulip,saitodisse/zulip,zachallaun/zulip,so0k/zulip,amallia/zulip,qq1012803704/zulip,calvinleenyc/zulip,he15his/zulip,swinghu/zulip,dwrpayne/zulip,wavelets/zulip,praveenaki/zulip,dotcool/zulip,Gabriel0402/zulip,vikas-parashar/zulip,guiquanz/zulip,krtkmj/zulip,hafeez3000/zulip,Qgap/zulip,technicalpickles/zulip,vikas-parashar/zulip,jeffcao/zulip,timabbott/zulip,yuvipanda/zulip,aakash-cr7/zulip,hafeez3000/zulip,aliceriot/zulip,so0k/zulip,shaunstanislaus/zulip,LeeRisk/zulip,Cheppers/zulip,sharmaeklavya2/zulip,alliejones/zulip,nicholasbs/zulip,cosmicAsymmetry/zulip,Galexrt/zulip,seapasulli/zulip,noroot/zulip,jackrzhang/zulip,luyifan/zulip,voidException/zulip,itnihao/zulip,glovebx/zulip,akuseru/zulip,AZtheAsian/zulip,technicalpickles/zulip,levixie/zulip,jphilipsen05/zulip,hustlzp/zulip,dwrpayne/zulip,PaulPetring/zulip,gkotian/zulip,willingc/zulip,ashwinirudrappa/zulip,littledogboy/zulip,zhaoweigg/zulip,jimmy54/zulip,swinghu/zulip,wdaher/zulip,jackrzhang/zulip,firstblade/zulip,udxxabp/zulip,pradiptad/zulip,noroot/zulip,voidException/zulip,Frouk/zulip,littledogboy/zulip,TigorC/zulip,wavelets/zulip,deer-hope/zulip,brainwane/zulip,jimmy54/zulip,ashwinirudrappa/zulip,pradiptad/zulip,hackerkid/zulip,swinghu/zulip,PaulPetring/zulip,zachallaun/zulip,glovebx/zulip,itnihao/zulip,johnny9/zulip,zhaoweigg/zulip,ipernet/zulip,levixie/zulip,xuxiao/zulip,bssrdf/zulip,verma-varsha/zulip,rishig/zulip,Cheppers/zulip,johnny9/zulip,yuvipanda/zulip,eastlhu/zulip,EasonYi/zulip,aps-sids/zulip,susansls/zulip,shrikrishnaholla/zulip,tdr130/zulip,mahim97/zulip,tbutter/zulip,tdr130/zulip,bastianh/zulip,ryanbackman/zulip,jimmy54/zulip,rishig/zulip,yuvipanda/zulip,qq1012803704/zulip,brockwhittaker/zulip,Cheppers/zulip,dattatreya303/zulip,ApsOps/zulip,udxxabp/zulip,KJin99/zulip,peguin40/zulip,aakash-cr7/zulip,peiwei/zulip,Batterfii/zulip,sup95/zulip,LAndreas/zulip,vaidap/zulip,LAndreas/zulip,Batterfii/zulip,sonali0901/zulip,zwily/zulip,natanovia/zulip,kokoar/zulip,DazWorrall/zulip,babbage/zulip,Drooids/zulip,tiansiyuan/zulip,hackerkid/zulip,developerfm/zulip,armooo/zulip,zulip/zulip,niftynei/zulip,SmartPeople/zulip,noroot/zulip,tbutter/zulip,joyhchen/zulip,dwrpayne/zulip,xuxiao/zulip,ahmadassaf/zulip,dxq-git/zulip,littledogboy/zulip,schatt/zulip,shubhamdhama/zulip,luyifan/zulip,joyhchen/zulip,krtkmj/zulip,dnmfarrell/zulip,ryansnowboarder/zulip,souravbadami/zulip,babbage/zulip,j831/zulip,isht3/zulip,andersk/zulip,sup95/zulip,jerryge/zulip,dawran6/zulip,DazWorrall/zulip,zacps/zulip,codeKonami/zulip,zacps/zulip,showell/zulip,bastianh/zulip,gigawhitlocks/zulip,Juanvulcano/zulip,aps-sids/zulip,fw1121/zulip,pradiptad/zulip,sonali0901/zulip,wavelets/zulip,shubhamdhama/zulip,esander91/zulip,jessedhillon/zulip,bssrdf/zulip,vaidap/zulip,Suninus/zulip,udxxabp/zulip,krtkmj/zulip,cosmicAsymmetry/zulip,stamhe/zulip,KJin99/zulip,LeeRisk/zulip,avastu/zulip,jimmy54/zulip,wweiradio/zulip,KingxBanana/zulip,littledogboy/zulip,wdaher/zulip,dhcrzf/zulip,gkotian/zulip,eastlhu/zulip,jackrzhang/zulip,babbage/zulip,wangdeshui/zulip,brainwane/zulip,blaze225/zulip,timabbott/zulip,aakash-cr7/zulip,dwrpayne/zulip,zhaoweigg/zulip,JanzTam/zulip,LAndreas/zulip,AZtheAsian/zulip,calvinleenyc/zulip,xuanhan863/zulip,synicalsyntax/zulip,zwily/zulip,pradiptad/zulip,lfranchi/zulip,sharmaeklavya2/zulip,dotcool/zulip,johnnygaddarr/zulip,blaze225/zulip,hackerkid/zulip,Galexrt/zulip,natanovia/zulip,peiwei/zulip,suxinde2009/zulip,esander91/zulip,zachallaun/zulip,KingxBanana/zulip,xuanhan863/zulip,ashwinirudrappa/zulip,andersk/zulip,akuseru/zulip,tbutter/zulip,tommyip/zulip,ufosky-server/zulip,samatdav/zulip,avastu/zulip,gigawhitlocks/zulip,moria/zulip,lfranchi/zulip,themass/zulip,joshisa/zulip,dwrpayne/zulip,tommyip/zulip,eeshangarg/zulip,gigawhitlocks/zulip,showell/zulip,wweiradio/zulip,cosmicAsymmetry/zulip,PaulPetring/zulip,nicholasbs/zulip,jessedhillon/zulip,hayderimran7/zulip,lfranchi/zulip,firstblade/zulip,huangkebo/zulip,akuseru/zulip,adnanh/zulip,nicholasbs/zulip,tiansiyuan/zulip,brainwane/zulip,hengqujushi/zulip,aps-sids/zulip,rht/zulip,jonesgithub/zulip,amallia/zulip,zacps/zulip,seapasulli/zulip,timabbott/zulip,dawran6/zulip,avastu/zulip,kaiyuanheshang/zulip,DazWorrall/zulip,luyifan/zulip,ryanbackman/zulip,eastlhu/zulip,ApsOps/zulip,noroot/zulip,umkay/zulip,susansls/zulip,deer-hope/zulip,samatdav/zulip,brainwane/zulip,ryanbackman/zulip,shrikrishnaholla/zulip,proliming/zulip,proliming/zulip,TigorC/zulip,schatt/zulip,bluesea/zulip,xuanhan863/zulip,JPJPJPOPOP/zulip,xuanhan863/zulip,DazWorrall/zulip,samatdav/zulip,samatdav/zulip,ashwinirudrappa/zulip,so0k/zulip,TigorC/zulip,vikas-parashar/zulip,ryanbackman/zulip,qq1012803704/zulip,xuxiao/zulip,zorojean/zulip,JanzTam/zulip,technicalpickles/zulip,wdaher/zulip,reyha/zulip,so0k/zulip,hayderimran7/zulip,bssrdf/zulip,fw1121/zulip,souravbadami/zulip,thomasboyt/zulip,zulip/zulip,peiwei/zulip,PhilSk/zulip,bastianh/zulip,mansilladev/zulip,jonesgithub/zulip,MariaFaBella85/zulip,JanzTam/zulip,isht3/zulip,lfranchi/zulip,ericzhou2008/zulip,LeeRisk/zulip,eeshangarg/zulip,jonesgithub/zulip,proliming/zulip,mohsenSy/zulip,kaiyuanheshang/zulip,firstblade/zulip,alliejones/zulip,wavelets/zulip,rht/zulip,AZtheAsian/zulip,thomasboyt/zulip,Suninus/zulip,j831/zulip,punchagan/zulip,sharmaeklavya2/zulip,karamcnair/zulip,DazWorrall/zulip,Drooids/zulip,umkay/zulip,ufosky-server/zulip,dawran6/zulip,mansilladev/zulip,atomic-labs/zulip,KingxBanana/zulip,jackrzhang/zulip,zwily/zulip,christi3k/zulip,mohsenSy/zulip,aakash-cr7/zulip,zulip/zulip,udxxabp/zulip,jeffcao/zulip,dnmfarrell/zulip,glovebx/zulip,eastlhu/zulip,natanovia/zulip,Batterfii/zulip,ericzhou2008/zulip,jackrzhang/zulip,glovebx/zulip,j831/zulip,glovebx/zulip,huangkebo/zulip,EasonYi/zulip,esander91/zulip,synicalsyntax/zulip,zachallaun/zulip,jrowan/zulip,tommyip/zulip,arpith/zulip,guiquanz/zulip,grave-w-grave/zulip,esander91/zulip,Drooids/zulip,brainwane/zulip,dawran6/zulip,hafeez3000/zulip,johnnygaddarr/zulip,technicalpickles/zulip,wweiradio/zulip,karamcnair/zulip,MayB/zulip,Diptanshu8/zulip,proliming/zulip,wangdeshui/zulip,bssrdf/zulip,yocome/zulip,kokoar/zulip,arpitpanwar/zulip,praveenaki/zulip,aliceriot/zulip,saitodisse/zulip,bowlofstew/zulip,zachallaun/zulip,ericzhou2008/zulip,he15his/zulip,yuvipanda/zulip,Gabriel0402/zulip,Diptanshu8/zulip,jeffcao/zulip,voidException/zulip,tommyip/zulip,bssrdf/zulip,Gabriel0402/zulip,thomasboyt/zulip,johnny9/zulip,PaulPetring/zulip,Galexrt/zulip,armooo/zulip,jerryge/zulip,vakila/zulip,rht/zulip,vakila/zulip,alliejones/zulip,joshisa/zulip,synicalsyntax/zulip,dxq-git/zulip,hustlzp/zulip,adnanh/zulip,wweiradio/zulip,JPJPJPOPOP/zulip,bastianh/zulip,noroot/zulip,codeKonami/zulip,Cheppers/zulip,mansilladev/zulip,ipernet/zulip,ashwinirudrappa/zulip,eastlhu/zulip,peiwei/zulip,vabs22/zulip,bowlofstew/zulip,christi3k/zulip,developerfm/zulip,xuxiao/zulip,wdaher/zulip,arpitpanwar/zulip,shubhamdhama/zulip,synicalsyntax/zulip,arpith/zulip,calvinleenyc/zulip,calvinleenyc/zulip,vaidap/zulip,yocome/zulip,dhcrzf/zulip,qq1012803704/zulip,reyha/zulip,swinghu/zulip,bluesea/zulip,xuanhan863/zulip,isht3/zulip,arpith/zulip,brainwane/zulip,jphilipsen05/zulip,moria/zulip,ahmadassaf/zulip,samatdav/zulip,niftynei/zulip,willingc/zulip,zulip/zulip,joshisa/zulip,jessedhillon/zulip,brockwhittaker/zulip,codeKonami/zulip,arpitpanwar/zulip,eeshangarg/zulip,hj3938/zulip,hj3938/zulip,he15his/zulip,zacps/zulip,udxxabp/zulip,rht/zulip,EasonYi/zulip,he15his/zulip,PaulPetring/zulip,armooo/zulip,jphilipsen05/zulip,shrikrishnaholla/zulip,kokoar/zulip,amanharitsh123/zulip,Vallher/zulip,karamcnair/zulip,mdavid/zulip,Vallher/zulip,paxapy/zulip,joyhchen/zulip,littledogboy/zulip,levixie/zulip,andersk/zulip,ericzhou2008/zulip,zwily/zulip,easyfmxu/zulip,LAndreas/zulip,kokoar/zulip,sharmaeklavya2/zulip,susansls/zulip,grave-w-grave/zulip,souravbadami/zulip,isht3/zulip,ufosky-server/zulip,Gabriel0402/zulip,m1ssou/zulip,LeeRisk/zulip,bluesea/zulip,firstblade/zulip,dattatreya303/zulip,hj3938/zulip,EasonYi/zulip,joyhchen/zulip,armooo/zulip,jonesgithub/zulip,huangkebo/zulip,dattatreya303/zulip,JPJPJPOPOP/zulip,Suninus/zulip,he15his/zulip,hj3938/zulip,deer-hope/zulip,ipernet/zulip,tommyip/zulip,zorojean/zulip,krtkmj/zulip,tiansiyuan/zulip,Batterfii/zulip,JPJPJPOPOP/zulip,hackerkid/zulip,dotcool/zulip,babbage/zulip,Qgap/zulip,shaunstanislaus/zulip,vaidap/zulip,ryansnowboarder/zulip,Galexrt/zulip,zhaoweigg/zulip,technicalpickles/zulip,voidException/zulip,SmartPeople/zulip,wangdeshui/zulip,willingc/zulip,saitodisse/zulip,aliceriot/zulip,zwily/zulip,moria/zulip,vikas-parashar/zulip,thomasboyt/zulip,dnmfarrell/zulip,firstblade/zulip,TigorC/zulip,arpith/zulip,schatt/zulip,dxq-git/zulip,LeeRisk/zulip,yocome/zulip,bssrdf/zulip,xuxiao/zulip,zofuthan/zulip,Qgap/zulip,Vallher/zulip,yuvipanda/zulip,synicalsyntax/zulip,hayderimran7/zulip,sonali0901/zulip,Gabriel0402/zulip,hafeez3000/zulip,themass/zulip,umkay/zulip,PhilSk/zulip,rishig/zulip,hayderimran7/zulip,avastu/zulip,amyliu345/zulip,blaze225/zulip,wavelets/zulip,vaidap/zulip,MariaFaBella85/zulip,amallia/zulip,suxinde2009/zulip,timabbott/zulip,armooo/zulip,vikas-parashar/zulip,isht3/zulip,MayB/zulip,brockwhittaker/zulip,aliceriot/zulip,saitodisse/zulip,karamcnair/zulip,atomic-labs/zulip,ikasumiwt/zulip,natanovia/zulip,MayB/zulip,jainayush975/zulip,Cheppers/zulip,adnanh/zulip,huangkebo/zulip,wangdeshui/zulip,ahmadassaf/zulip,luyifan/zulip,littledogboy/zulip,alliejones/zulip,aliceriot/zulip,fw1121/zulip,adnanh/zulip,jonesgithub/zulip,synicalsyntax/zulip,ikasumiwt/zulip,samatdav/zulip,grave-w-grave/zulip,paxapy/zulip,qq1012803704/zulip,natanovia/zulip,dxq-git/zulip,thomasboyt/zulip,jerryge/zulip,rht/zulip,rht/zulip,m1ssou/zulip,nicholasbs/zulip,Vallher/zulip,yuvipanda/zulip,mahim97/zulip,ipernet/zulip,thomasboyt/zulip,adnanh/zulip,hackerkid/zulip,suxinde2009/zulip,shaunstanislaus/zulip,MariaFaBella85/zulip,wdaher/zulip,willingc/zulip,isht3/zulip,peiwei/zulip,praveenaki/zulip,punchagan/zulip,jonesgithub/zulip,m1ssou/zulip,shrikrishnaholla/zulip,dhcrzf/zulip,mohsenSy/zulip,tiansiyuan/zulip,verma-varsha/zulip,peiwei/zulip,dawran6/zulip,littledogboy/zulip,vakila/zulip,zwily/zulip,dhcrzf/zulip,deer-hope/zulip,huangkebo/zulip,technicalpickles/zulip,kou/zulip,mahim97/zulip,jainayush975/zulip,m1ssou/zulip,swinghu/zulip,shaunstanislaus/zulip,krtkmj/zulip,ApsOps/zulip,peguin40/zulip,proliming/zulip,ikasumiwt/zulip,jrowan/zulip,esander91/zulip,willingc/zulip,seapasulli/zulip,blaze225/zulip,m1ssou/zulip,babbage/zulip,dhcrzf/zulip,MariaFaBella85/zulip,sup95/zulip,Gabriel0402/zulip,ahmadassaf/zulip,hj3938/zulip,shrikrishnaholla/zulip,luyifan/zulip,Diptanshu8/zulip,christi3k/zulip,niftynei/zulip,jainayush975/zulip,johnnygaddarr/zulip,ikasumiwt/zulip,dxq-git/zulip,jphilipsen05/zulip,levixie/zulip,developerfm/zulip,zofuthan/zulip,Suninus/zulip,alliejones/zulip,Juanvulcano/zulip,jeffcao/zulip,jessedhillon/zulip,EasonYi/zulip,krtkmj/zulip,hackerkid/zulip,ApsOps/zulip,reyha/zulip,showell/zulip,levixie/zulip,JPJPJPOPOP/zulip,wavelets/zulip,JanzTam/zulip,aps-sids/zulip,zhaoweigg/zulip,Gabriel0402/zulip,hengqujushi/zulip,ikasumiwt/zulip,noroot/zulip,amanharitsh123/zulip,sonali0901/zulip,reyha/zulip,Cheppers/zulip,voidException/zulip,hengqujushi/zulip,mansilladev/zulip,swinghu/zulip,ipernet/zulip,Diptanshu8/zulip,amallia/zulip,rht/zulip,KJin99/zulip,AZtheAsian/zulip,ashwinirudrappa/zulip,mansilladev/zulip,wangdeshui/zulip,hengqujushi/zulip,showell/zulip,paxapy/zulip,eastlhu/zulip,vabs22/zulip,kokoar/zulip,Jianchun1/zulip,praveenaki/zulip,tdr130/zulip,PaulPetring/zulip,TigorC/zulip,bluesea/zulip,yocome/zulip,themass/zulip,akuseru/zulip,amanharitsh123/zulip,kou/zulip,jrowan/zulip,easyfmxu/zulip,eeshangarg/zulip,natanovia/zulip
--- +++ @@ -11,7 +11,7 @@ def handle(self, *args, **options): config_file = os.path.join(os.environ["HOME"], ".humbugrc") if not os.path.exists(config_file): - raise RuntimeError("Not ~/.humbughrc") + raise RuntimeError("No ~/.humbugrc found") config = SafeConfigParser() with file(config_file, 'r') as f: config.readfp(f, config_file)
a6061ef140e371101c3d04c5b85562586293eee8
scrappyr/scraps/tests/test_models.py
scrappyr/scraps/tests/test_models.py
from test_plus.test import TestCase from ..models import Scrap class TestScrap(TestCase): def test__str__(self): scrap = Scrap(raw_title='hello') assert str(scrap) == 'hello' def test_html_title(self): scrap = Scrap(raw_title='hello') assert scrap.html_title == 'hello' def test_html_title_bold(self): scrap = Scrap(raw_title='**hello**') assert scrap.html_title == '<strong>hello</strong>'
from test_plus.test import TestCase from ..models import Scrap class TestScrap(TestCase): def test__str__(self): scrap = Scrap(raw_title='hello') assert str(scrap) == 'hello' def test_html_title(self): scrap = Scrap(raw_title='hello') assert scrap.html_title == 'hello' def test_html_title_bold(self): scrap = Scrap(raw_title='**hello**') assert scrap.html_title == '<strong>hello</strong>' def test_html_title_with_block_element_gets_escaped(self): scrap = Scrap(raw_title='<div>hello</div>') assert scrap.html_title == '&lt;div&gt;hello&lt;/div&gt;'
Add test of block-elements in scrap title
Add test of block-elements in scrap title
Python
mit
tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app
--- +++ @@ -16,3 +16,7 @@ def test_html_title_bold(self): scrap = Scrap(raw_title='**hello**') assert scrap.html_title == '<strong>hello</strong>' + + def test_html_title_with_block_element_gets_escaped(self): + scrap = Scrap(raw_title='<div>hello</div>') + assert scrap.html_title == '&lt;div&gt;hello&lt;/div&gt;'
0a2fd079c828a8d2f48f8e2c33574aec2d416f06
mbuild/lib/atoms/c3.py
mbuild/lib/atoms/c3.py
from __future__ import division import numpy as np import mbuild as mb class C3(mb.Compound): """A tri-valent, planar carbon.""" def __init__(self): super(C3, self).__init__() self.add(mb.Particle(name='C')) self.add(mb.Port(anchor=self[0]), 'up') self['up'].translate(self['up'], np.array([0, 0.07, 0])) self.add(mb.Port(anchor=self[0]), 'down') self['down'].translate(np.array([0, 0.07, 0])) self['down'].spin(np.pi * 2/3, [0, 0, 1]) self.add(mb.Port(anchor=self[0]), 'left') self['left'].translate(np.array([0, 0.07, 0])) self['left'].spin(-np.pi * 2/3, [0, 0, 1]) if __name__ == '__main__': m = C3() m.visualize(show_ports=True)
from __future__ import division import numpy as np import mbuild as mb class C3(mb.Compound): """A tri-valent, planar carbon.""" def __init__(self): super(C3, self).__init__() self.add(mb.Particle(name='C')) self.add(mb.Port(anchor=self[0]), 'up') self['up'].translate(np.array([0, 0.07, 0])) self.add(mb.Port(anchor=self[0]), 'down') self['down'].translate(np.array([0, 0.07, 0])) self['down'].spin(np.pi * 2/3, [0, 0, 1]) self.add(mb.Port(anchor=self[0]), 'left') self['left'].translate(np.array([0, 0.07, 0])) self['left'].spin(-np.pi * 2/3, [0, 0, 1]) if __name__ == '__main__': m = C3() m.visualize(show_ports=True)
Fix bug in translate call
Fix bug in translate call
Python
mit
iModels/mbuild,ctk3b/mbuild,tcmoore3/mbuild,summeraz/mbuild,summeraz/mbuild,ctk3b/mbuild,iModels/mbuild,tcmoore3/mbuild
--- +++ @@ -12,7 +12,7 @@ self.add(mb.Particle(name='C')) self.add(mb.Port(anchor=self[0]), 'up') - self['up'].translate(self['up'], np.array([0, 0.07, 0])) + self['up'].translate(np.array([0, 0.07, 0])) self.add(mb.Port(anchor=self[0]), 'down') self['down'].translate(np.array([0, 0.07, 0]))
1d8185ed29d448ae181779913b8a0c4f513a799c
opsimulate/constants.py
opsimulate/constants.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 James Wen KEYS_DIR_NAME = './keys' PRIVATE_KEY_FILE = '{}/opsimulate'.format(KEYS_DIR_NAME) PUBLIC_KEY_FILE = '{}/opsimulate.pub'.format(KEYS_DIR_NAME) SERVICE_ACCOUNT_FILE = 'service-account.json' ZONE = 'us-east4-a' MACHINE_TYPE = 'n1-standard-1' UBUNTU_VERSION = 'ubuntu-1404-lts' INSTANCE_NAME = 'opsimulate-gitlab' VM_USERNAME = 'opsimulate'
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 James Wen import os HOME = os.path.expanduser("~") OPSIMULATE_HOME = os.path.join(HOME, '.opsimulate') KEYS_DIR_NAME = os.path.join(OPSIMULATE_HOME, 'keys') PRIVATE_KEY_FILE = os.path.join(KEYS_DIR_NAME, 'opsimulate') PUBLIC_KEY_FILE = os.path.join(KEYS_DIR_NAME, 'opsimulate.pub') SERVICE_ACCOUNT_FILE = os.path.join(OPSIMULATE_HOME, 'service-account.json') ZONE = 'us-east4-a' MACHINE_TYPE = 'n1-standard-1' UBUNTU_VERSION = 'ubuntu-1404-lts' INSTANCE_NAME = 'opsimulate-gitlab' VM_USERNAME = 'opsimulate'
Install keys and service-account.json in ~/.opsimulate directory
Install keys and service-account.json in ~/.opsimulate directory - This ensures that opsimulate can be ran as a regular pip installed CLI tool and not just via pip -e or direct script invocation
Python
mit
RochesterinNYC/opsimulate,RochesterinNYC/opsimulate
--- +++ @@ -2,11 +2,16 @@ # -*- coding: utf-8 -*- # Copyright (c) 2017 James Wen -KEYS_DIR_NAME = './keys' -PRIVATE_KEY_FILE = '{}/opsimulate'.format(KEYS_DIR_NAME) -PUBLIC_KEY_FILE = '{}/opsimulate.pub'.format(KEYS_DIR_NAME) +import os -SERVICE_ACCOUNT_FILE = 'service-account.json' +HOME = os.path.expanduser("~") +OPSIMULATE_HOME = os.path.join(HOME, '.opsimulate') + +KEYS_DIR_NAME = os.path.join(OPSIMULATE_HOME, 'keys') +PRIVATE_KEY_FILE = os.path.join(KEYS_DIR_NAME, 'opsimulate') +PUBLIC_KEY_FILE = os.path.join(KEYS_DIR_NAME, 'opsimulate.pub') + +SERVICE_ACCOUNT_FILE = os.path.join(OPSIMULATE_HOME, 'service-account.json') ZONE = 'us-east4-a' MACHINE_TYPE = 'n1-standard-1'
a424fa213c14a64f0f2aa54a7adba0e9710032c6
osbrain/tests/common.py
osbrain/tests/common.py
import random import pytest from Pyro4.errors import NamingError from osbrain.nameserver import NameServer from osbrain.address import SocketAddress @pytest.fixture(scope='function') def nsaddr(request): while True: try: # Bind to random port host = '127.0.0.1' port = random.randrange(10000, 20000) addr = SocketAddress(host, port) nameserver = NameServer(addr) def terminate(): nameserver.shutdown() request.addfinalizer(terminate) nameserver.start() return addr except NamingError: continue except PermissionError: continue except: raise
import random import pytest from Pyro4.errors import NamingError from osbrain.nameserver import NameServer from osbrain.address import SocketAddress @pytest.yield_fixture(scope='function') def nsaddr(request): while True: try: # Bind to random port host = '127.0.0.1' port = random.randrange(10000, 20000) addr = SocketAddress(host, port) nameserver = NameServer(addr) nameserver.start() break except RuntimeError: continue except: raise yield addr nameserver.shutdown()
Use `yield_fixture` instead of classic `fixture` with pytest
Use `yield_fixture` instead of classic `fixture` with pytest
Python
apache-2.0
opensistemas-hub/osbrain
--- +++ @@ -5,7 +5,7 @@ from osbrain.address import SocketAddress -@pytest.fixture(scope='function') +@pytest.yield_fixture(scope='function') def nsaddr(request): while True: try: @@ -14,14 +14,11 @@ port = random.randrange(10000, 20000) addr = SocketAddress(host, port) nameserver = NameServer(addr) - def terminate(): - nameserver.shutdown() - request.addfinalizer(terminate) nameserver.start() - return addr - except NamingError: - continue - except PermissionError: + break + except RuntimeError: continue except: raise + yield addr + nameserver.shutdown()
80b882b3a790241d3d67ae190b0e32d7e9d7b8ed
mesonwrap/inventory.py
mesonwrap/inventory.py
_ORGANIZATION = 'mesonbuild' _RESTRICTED_PROJECTS = [ 'meson', 'meson-ci', 'mesonbuild.github.io', 'mesonwrap', 'wrapdb', 'wrapdevtools', 'wrapweb', ] _RESTRICTED_ORG_PROJECTS = [ _ORGANIZATION + '/' + proj for proj in _RESTRICTED_PROJECTS ] def is_wrap_project_name(project: str) -> bool: return project not in _RESTRICTED_PROJECTS def is_wrap_full_project_name(full_project: str) -> bool: return full_project not in _RESTRICTED_ORG_PROJECTS
_ORGANIZATION = 'mesonbuild' _RESTRICTED_PROJECTS = [ 'dubtestproject', 'meson', 'meson-ci', 'mesonbuild.github.io', 'mesonwrap', 'wrapdb', 'wrapdevtools', 'wrapweb', ] _RESTRICTED_ORG_PROJECTS = [ _ORGANIZATION + '/' + proj for proj in _RESTRICTED_PROJECTS ] def is_wrap_project_name(project: str) -> bool: return project not in _RESTRICTED_PROJECTS def is_wrap_full_project_name(full_project: str) -> bool: return full_project not in _RESTRICTED_ORG_PROJECTS
Add dubtestproject to the list of restricted projects
Add dubtestproject to the list of restricted projects
Python
apache-2.0
mesonbuild/wrapweb,mesonbuild/wrapweb,mesonbuild/wrapweb
--- +++ @@ -1,5 +1,6 @@ _ORGANIZATION = 'mesonbuild' _RESTRICTED_PROJECTS = [ + 'dubtestproject', 'meson', 'meson-ci', 'mesonbuild.github.io',
959ce4f98577c872c69a29a30a2e0659e12cff75
var/spack/packages/ImageMagick/package.py
var/spack/packages/ImageMagick/package.py
from spack import * class Imagemagick(Package): """ImageMagick is a image processing library""" homepage = "http://www.imagemagic.org" url = "http://www.imagemagick.org/download/ImageMagick-6.8.9-10.tar.gz" version('6.9.0-0', '2cf094cb86ec518fa5bc669ce2d21613') version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c') version('6.8.9-9', 'e63fed3e3550851328352c708f800676') depends_on('libtool') depends_on('jpeg') depends_on('libpng') depends_on('freetype') depends_on('fontconfig') # depends_on('libtiff') def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() make("install")
from spack import * class Imagemagick(Package): """ImageMagick is a image processing library""" homepage = "http://www.imagemagic.org" #------------------------------------------------------------------------- # ImageMagick does not keep around anything but *-10 versions, so # this URL may change. If you want the bleeding edge, you can # uncomment it and see if it works but you may need to try to # fetch a newer version (-6, -7, -8, -9, etc.) or you can stick # wtih the older, stable, archived -10 versions below. # # TODO: would be nice if spack had a way to recommend avoiding a # TODO: bleeding edge version, but not comment it out. # ------------------------------------------------------------------------- # version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b', # url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2") #------------------------------------------------------------------------- # *-10 versions are archived, so these versions should fetch reliably. # ------------------------------------------------------------------------- version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") depends_on('libtool') depends_on('jpeg') depends_on('libpng') depends_on('freetype') depends_on('fontconfig') depends_on('libtiff') def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() make("install")
Downgrade standard version of ImageMagick to a non-changing URL.
Downgrade standard version of ImageMagick to a non-changing URL. - bleeding edge still available but commented by default.
Python
lgpl-2.1
EmreAtes/spack,tmerrick1/spack,matthiasdiener/spack,TheTimmy/spack,lgarren/spack,tmerrick1/spack,skosukhin/spack,TheTimmy/spack,TheTimmy/spack,LLNL/spack,lgarren/spack,mfherbst/spack,iulian787/spack,LLNL/spack,lgarren/spack,skosukhin/spack,mfherbst/spack,EmreAtes/spack,skosukhin/spack,iulian787/spack,EmreAtes/spack,TheTimmy/spack,krafczyk/spack,krafczyk/spack,skosukhin/spack,LLNL/spack,lgarren/spack,matthiasdiener/spack,tmerrick1/spack,EmreAtes/spack,LLNL/spack,krafczyk/spack,matthiasdiener/spack,mfherbst/spack,krafczyk/spack,iulian787/spack,TheTimmy/spack,lgarren/spack,skosukhin/spack,krafczyk/spack,tmerrick1/spack,iulian787/spack,LLNL/spack,EmreAtes/spack,tmerrick1/spack,matthiasdiener/spack,iulian787/spack,matthiasdiener/spack,mfherbst/spack,mfherbst/spack
--- +++ @@ -3,18 +3,32 @@ class Imagemagick(Package): """ImageMagick is a image processing library""" homepage = "http://www.imagemagic.org" - url = "http://www.imagemagick.org/download/ImageMagick-6.8.9-10.tar.gz" - version('6.9.0-0', '2cf094cb86ec518fa5bc669ce2d21613') - version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c') - version('6.8.9-9', 'e63fed3e3550851328352c708f800676') + #------------------------------------------------------------------------- + # ImageMagick does not keep around anything but *-10 versions, so + # this URL may change. If you want the bleeding edge, you can + # uncomment it and see if it works but you may need to try to + # fetch a newer version (-6, -7, -8, -9, etc.) or you can stick + # wtih the older, stable, archived -10 versions below. + # + # TODO: would be nice if spack had a way to recommend avoiding a + # TODO: bleeding edge version, but not comment it out. + # ------------------------------------------------------------------------- + # version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b', + # url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2") + + #------------------------------------------------------------------------- + # *-10 versions are archived, so these versions should fetch reliably. + # ------------------------------------------------------------------------- + version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', + url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") depends_on('libtool') depends_on('jpeg') depends_on('libpng') depends_on('freetype') depends_on('fontconfig') -# depends_on('libtiff') + depends_on('libtiff') def install(self, spec, prefix): configure("--prefix=%s" % prefix)
a61e2d621eb0b2c554c064739bd4c7dcf8a8797a
setup.py
setup.py
from setuptools import setup setup( name='django-extra-views', version='0.6.5', url='https://github.com/AndrewIngram/django-extra-views', install_requires=[ 'Django >=1.3', 'six==1.5.2', ], description="Extra class-based views for Django", long_description=open('README.rst', 'r').read(), license="MIT", author="Andrew Ingram", author_email="andy@andrewingram.net", packages=['extra_views'], package_dir={'extra_views': 'extra_views'}, include_package_data = True, # include everything in source control package_data={'extra_views': ['*.py','contrib/*.py','tests/*.py','tests/templates/*.html', 'tests/templates/extra_views/*.html']}, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 3'] )
from setuptools import setup setup( name='django-extra-views', version='0.6.5', url='https://github.com/AndrewIngram/django-extra-views', install_requires=[ 'Django >=1.3', 'six>=1.5.2', ], description="Extra class-based views for Django", long_description=open('README.rst', 'r').read(), license="MIT", author="Andrew Ingram", author_email="andy@andrewingram.net", packages=['extra_views'], package_dir={'extra_views': 'extra_views'}, include_package_data = True, # include everything in source control package_data={'extra_views': ['*.py','contrib/*.py','tests/*.py','tests/templates/*.html', 'tests/templates/extra_views/*.html']}, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3'] )
Use open-ended dependency on six
Use open-ended dependency on six Having six pinned to 1.5.2 causes issues for e.g. Oscar when other dependencies specify a more current version. AFAIK, six is outstanding at being backwards-compatible, so it should be safe to allow any version above 1.5.2 to be installed. AFAIK, django-extra-views is compatible with Python 2, so the classifiers should include it.
Python
mit
AndrewIngram/django-extra-views,luzfcb/django-extra-views,penta-srl/django-extra-views,AndrewIngram/django-extra-views,luzfcb/django-extra-views,penta-srl/django-extra-views
--- +++ @@ -6,7 +6,7 @@ url='https://github.com/AndrewIngram/django-extra-views', install_requires=[ 'Django >=1.3', - 'six==1.5.2', + 'six>=1.5.2', ], description="Extra class-based views for Django", long_description=open('README.rst', 'r').read(), @@ -23,5 +23,6 @@ 'Framework :: Django', 'Intended Audience :: Developers', 'Programming Language :: Python', + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3'] )
08c8706513953a9e323296396c9e67a45632cc13
setup.py
setup.py
import sys from setuptools import setup, find_packages import populous requirements = [ "click", "cached-property", "Faker", "dateutils", "PyYAML", "peloton_bloomfilters" ] if sys.version_info < (3, 2): requirements.append('functools32') setup( name="populous", version=populous.__version__, url=populous.__url__, description=populous.__doc__, author=populous.__author__, license=populous.__license__, long_description="TODO", packages=find_packages(), install_requires=requirements, extras_require={ 'tests': ['tox', 'pytest', 'pytest-mock', 'flake8'], }, entry_points={ 'console_scripts': [ 'populous = populous.__main__:cli' ] }, classifiers=[ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Utilities", ], keywords='populous populate database', )
import sys from setuptools import setup, find_packages import populous requirements = [ "click", "cached-property", "Faker", "dateutils", "PyYAML", "peloton_bloomfilters", "Jinja2" ] if sys.version_info < (3, 2): requirements.append('functools32') setup( name="populous", version=populous.__version__, url=populous.__url__, description=populous.__doc__, author=populous.__author__, license=populous.__license__, long_description="TODO", packages=find_packages(), install_requires=requirements, extras_require={ 'tests': ['tox', 'pytest', 'pytest-mock', 'flake8'], }, entry_points={ 'console_scripts': [ 'populous = populous.__main__:cli' ] }, classifiers=[ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Utilities", ], keywords='populous populate database', )
Add Jinja2 to the requirements
Add Jinja2 to the requirements
Python
mit
novafloss/populous
--- +++ @@ -10,7 +10,8 @@ "Faker", "dateutils", "PyYAML", - "peloton_bloomfilters" + "peloton_bloomfilters", + "Jinja2" ] if sys.version_info < (3, 2):
a472cf675ee91b7f0506fd7f958ebe0225e052e7
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='7.0.13', 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='7.0.14', 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 7.0.14.
Update the PyPI version to 7.0.14.
Python
mit
Doist/todoist-python
--- +++ @@ -10,7 +10,7 @@ setup( name='todoist-python', - version='7.0.13', + version='7.0.14', packages=['todoist', 'todoist.managers'], author='Doist Team', author_email='info@todoist.com',
9a2316d292a9aed5764de85d6de1aa9391dd233a
setup.py
setup.py
from setuptools import setup, find_packages install_requires = ['future', 'pandas', 'requests', 'requests_cache'] setup( name='pybiomart', version='0.0.3', url='https://github.com/jrderuiter/pybiomart', download_url='https://github.com/jrderuiter/pybiomart/tarball/0.0.3', author='Julian de Ruiter', author_email='julianderuiter@gmail.com', description='A simple pythonic interface to biomart. ', license='MIT', packages=find_packages(), zip_safe=True, classifiers=['Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5'], install_requires=install_requires, extras_require={} )
from setuptools import setup, find_packages try: import pypandoc description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): description = open('README.md').read() install_requires = ['future', 'pandas', 'requests', 'requests_cache'] setup( name='pybiomart', version='0.0.3', url='https://github.com/jrderuiter/pybiomart', download_url='https://github.com/jrderuiter/pybiomart/tarball/0.0.3', author='Julian de Ruiter', author_email='julianderuiter@gmail.com', description=description, license='MIT', packages=find_packages(), zip_safe=True, classifiers=['Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5'], install_requires=install_requires, extras_require={} )
Use pyandoc to read description from README.md.
Use pyandoc to read description from README.md.
Python
mit
jrderuiter/pybiomart
--- +++ @@ -1,4 +1,10 @@ from setuptools import setup, find_packages + +try: + import pypandoc + description = pypandoc.convert('README.md', 'rst') +except (IOError, ImportError): + description = open('README.md').read() install_requires = ['future', 'pandas', 'requests', 'requests_cache'] @@ -9,7 +15,7 @@ download_url='https://github.com/jrderuiter/pybiomart/tarball/0.0.3', author='Julian de Ruiter', author_email='julianderuiter@gmail.com', - description='A simple pythonic interface to biomart. ', + description=description, license='MIT', packages=find_packages(), zip_safe=True,
70d9d9f1a3d36cec951f23232ad9add09fa7d176
setup.py
setup.py
# *-* coding:utf-8 *-* from setuptools import setup setup(name='ie', version='1.0.8', description='Validation of brazilian state registration numbers', classifiers=[ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Software Development :: Libraries :: Python Modules', ], keywords='inscrição estadual inscricao estadual inscricoes estaduais inscrições estaduais validacao validação', url='https://github.com/matheuscas/pyIE', author='Matheus Cardoso', author_email='matheus.mcas@gmail.com', license='MIT', packages=['ie'], test_suite='nose.collector', tests_require=['nose'], zip_safe=False)
# *-* coding:utf-8 *-* from setuptools import setup setup(name='ie', version='1.0.8', description='Validation of brazilian state registration numbers', classifiers=[ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.7', 'Topic :: Software Development :: Libraries :: Python Modules', ], keywords='inscrição estadual inscricao estadual inscricoes estaduais inscrições estaduais validacao validação', url='https://github.com/matheuscas/pyIE', author='Matheus Cardoso', author_email='matheus.mcas@gmail.com', license='MIT', packages=['ie'], tests_require=['tox'], zip_safe=False)
USe tox as test package and added python 3.7 to classifiers
USe tox as test package and added python 3.7 to classifiers
Python
mit
matheuscas/pyIE
--- +++ @@ -8,8 +8,8 @@ classifiers=[ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.7', 'Topic :: Software Development :: Libraries :: Python Modules', ], keywords='inscrição estadual inscricao estadual inscricoes estaduais inscrições estaduais validacao validação', @@ -18,6 +18,5 @@ author_email='matheus.mcas@gmail.com', license='MIT', packages=['ie'], - test_suite='nose.collector', - tests_require=['nose'], + tests_require=['tox'], zip_safe=False)
0f6d9968e23a6c4f25cebe16f87bd0749863939b
setup.py
setup.py
#/usr/bin/env python import os from setuptools import setup, find_packages ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) version = '2.6.dev0' setup( name="django-photologue", version=version, description="Powerful image management for the Django web framework.", author="Justin Driscoll, Marcos Daniel Petry, Richard Barran", author_email="justin@driscolldev.com, marcospetry@gmail.com", url="https://github.com/jdriscoll/django-photologue", packages=find_packages(), package_data={ 'photologue': [ 'res/*.jpg', 'locale/*/LC_MESSAGES/*', 'templates/photologue/*.html', 'templates/photologue/tags/*.html', ] }, zip_safe=False, classifiers=['Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Utilities'], install_requires=['Django>=1.3', # Change to class-based views means 1.3 minimum. 'South>=0.7.5', # Might work with earlier versions, but not tested. 'Pillow>=2.0.0', # Might work with earlier versions, but not tested. ], )
#/usr/bin/env python import os from setuptools import setup, find_packages ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) version = '2.6.dev0' setup( name="django-photologue", version=version, description="Powerful image management for the Django web framework.", author="Justin Driscoll, Marcos Daniel Petry, Richard Barran", author_email="justin@driscolldev.com, marcospetry@gmail.com", url="https://github.com/jdriscoll/django-photologue", packages=find_packages(), package_data={ 'photologue': [ 'res/*.jpg', 'locale/*/LC_MESSAGES/*', 'templates/photologue/*.html', 'templates/photologue/tags/*.html', ] }, zip_safe=False, classifiers=['Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Utilities'], install_requires=['Django>=1.3', # Change to class-based views means 1.3 minimum. 'South>=0.7.5', # Might work with earlier versions, but not tested. 'Pillow>=2.0.0', # Might work with earlier versions, but not tested. YMMV. Note that 2.0.0 needed for Mac users. ], )
Add comment to Pillow requirement to indicate that 2.0.0 is needed for Mac users.
Add comment to Pillow requirement to indicate that 2.0.0 is needed for Mac users.
Python
bsd-3-clause
MathieuDuponchelle/my_patched_photologue,rmaceissoft/django-photologue,seedwithroot/django-photologue-clone,MathieuDuponchelle/my_patched_photologue,rmaceissoft/django-photologue,jlemaes/django-photologue,seedwithroot/django-photologue-clone,rmaceissoft/django-photologue,jlemaes/django-photologue,RossLYoung/django-photologue,RossLYoung/django-photologue,RossLYoung/django-photologue,jlemaes/django-photologue
--- +++ @@ -34,6 +34,6 @@ 'Topic :: Utilities'], install_requires=['Django>=1.3', # Change to class-based views means 1.3 minimum. 'South>=0.7.5', # Might work with earlier versions, but not tested. - 'Pillow>=2.0.0', # Might work with earlier versions, but not tested. + 'Pillow>=2.0.0', # Might work with earlier versions, but not tested. YMMV. Note that 2.0.0 needed for Mac users. ], )
83750f214b880fcd77e059c151d54f644ab76944
setup.py
setup.py
# coding=utf-8 # pylint: disable=missing-docstring # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. from setuptools import setup if __name__ == "__main__": setup(name="funfuzz", version="0.3.0", entry_points={ "console_scripts": ["funfuzz = funfuzz.bot:main"] }, packages=[ "funfuzz", "funfuzz.autobisectjs", "funfuzz.js", "funfuzz.util", "funfuzz.util.tooltool", ], package_data={"funfuzz": [ "autobisectjs/*", "js/*", "js/jsfunfuzz/*", "js/shared/*", "util/*", "util/tooltool/*", ]}, package_dir={"": "src"}, install_requires=[ "FuzzManager>=0.1.1", "lithium-reducer>=0.2.0", ], zip_safe=False)
# coding=utf-8 # pylint: disable=missing-docstring # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. from setuptools import setup if __name__ == "__main__": setup(name="funfuzz", version="0.3.0", entry_points={ "console_scripts": ["funfuzz = funfuzz.bot:main"] }, packages=[ "funfuzz", "funfuzz.autobisectjs", "funfuzz.js", "funfuzz.util", "funfuzz.util.tooltool", ], package_data={"funfuzz": [ "autobisectjs/*", "js/*", "js/jsfunfuzz/*", "js/shared/*", "util/*", "util/tooltool/*", ]}, package_dir={"": "src"}, install_requires=[ "FuzzManager>=0.1.1", "lithium-reducer>=0.2.0", "mercurial>=4.3.3", ], zip_safe=False)
Add explicit dependency on Mercurial.
Add explicit dependency on Mercurial.
Python
mpl-2.0
MozillaSecurity/funfuzz,MozillaSecurity/funfuzz,nth10sd/funfuzz,nth10sd/funfuzz,MozillaSecurity/funfuzz,nth10sd/funfuzz
--- +++ @@ -32,5 +32,6 @@ install_requires=[ "FuzzManager>=0.1.1", "lithium-reducer>=0.2.0", + "mercurial>=4.3.3", ], zip_safe=False)
63f09024fcd936b966b29d55e05c6fb8279f723f
setup.py
setup.py
#!/usr/bin/env python import os import sys from setuptools import setup, find_packages setup( name='jmespath', version='0.0.2', description='JSON Matching Expressions', long_description=open('README.rst').read(), author='James Saryerwinnie', author_email='js@jamesls.com', url='https://github.com/boto/jmespath', scripts=[], packages=find_packages(), install_requires=[ 'ply==3.4', ], classifiers=( 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', ), )
#!/usr/bin/env python import os import sys from setuptools import setup, find_packages setup( name='jmespath', version='0.0.2', description='JSON Matching Expressions', long_description=open('README.rst').read(), author='James Saryerwinnie', author_email='js@jamesls.com', url='https://github.com/boto/jmespath', scripts=['bin/jp'], packages=find_packages(), install_requires=[ 'ply==3.4', ], classifiers=( 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', ), )
Add jp command line interface
Add jp command line interface
Python
mit
henrysher/jmespathv041p
--- +++ @@ -14,7 +14,7 @@ author='James Saryerwinnie', author_email='js@jamesls.com', url='https://github.com/boto/jmespath', - scripts=[], + scripts=['bin/jp'], packages=find_packages(), install_requires=[ 'ply==3.4',
651275b0e3de2377637ffe200f4631e9fde91d08
setup.py
setup.py
import sys from setuptools import setup import numpy from numpy.distutils.core import Extension import railgun from railgun import __author__, __version__, __license__ setup( name='railgun', version=__version__, packages=['railgun'], description=('ctypes utilities for faster and easier ' 'simulation programming in C and Python'), long_description=railgun.__doc__, author=__author__, author_email='aka.tkf@gmail.com', url='https://github.com/tkf/railgun', keywords='numerical simulation, research, ctypes, numpy, c', license=__license__, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "Operating System :: POSIX :: Linux", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Scientific/Engineering", ], include_dirs = [numpy.get_include()], ext_modules=[ Extension( 'railgun.cstyle', sources=['src/cstylemodule.c'], extra_compile_args=["-fPIC", "-Wall"], ), ] if sys.version_info[0] == 2 else [], install_requires=[ 'numpy', 'six', ], )
from setuptools import setup import numpy from numpy.distutils.core import Extension import railgun from railgun import __author__, __version__, __license__ setup( name='railgun', version=__version__, packages=['railgun'], description=('ctypes utilities for faster and easier ' 'simulation programming in C and Python'), long_description=railgun.__doc__, author=__author__, author_email='aka.tkf@gmail.com', url='https://github.com/tkf/railgun', keywords='numerical simulation, research, ctypes, numpy, c', license=__license__, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "Operating System :: POSIX :: Linux", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Scientific/Engineering", ], include_dirs = [numpy.get_include()], ext_modules=[ Extension( 'railgun.cstyle', sources=['src/cstylemodule.c'], extra_compile_args=["-fPIC", "-Wall"], ), ], install_requires=[ 'numpy', 'six', ], )
Install C extension for Python 3 as well
Install C extension for Python 3 as well This reverts commit c01d5842d49bba5283a2c31aed718af443b7e3ed.
Python
mit
tkf/railgun,tkf/railgun
--- +++ @@ -1,4 +1,3 @@ -import sys from setuptools import setup import numpy from numpy.distutils.core import Extension @@ -33,7 +32,7 @@ sources=['src/cstylemodule.c'], extra_compile_args=["-fPIC", "-Wall"], ), - ] if sys.version_info[0] == 2 else [], + ], install_requires=[ 'numpy', 'six',
fe6eeee9033655b08bda4a1a6a64c2741f3f5321
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-switch-templatetag', url="https://chris-lamb.co.uk/projects/django-switch-templatetag", version='2.0.3', description="Simple switch tag for Django templates.", author="Chris Lamb", author_email="chris@chris-lamb.co.uk", license="BSD", packages=find_packages(), include_package_data=True, )
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-switch-templatetag', url="https://chris-lamb.co.uk/projects/django-switch-templatetag", version='2.0.3', description="Simple switch tag for Django templates.", author="Chris Lamb", author_email="chris@chris-lamb.co.uk", license="BSD", packages=find_packages(), include_package_data=True, install_requires=( 'Django>=1.8', ), )
Update Django requirement to latest LTS
Update Django requirement to latest LTS
Python
bsd-3-clause
lamby/django-switch-templatetag
--- +++ @@ -15,4 +15,8 @@ packages=find_packages(), include_package_data=True, + + install_requires=( + 'Django>=1.8', + ), )
13938cfd7549a59c8d5e12a0962310ae78b014d2
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name = 'django-dublincore', version = '0.1', packages = ['dublincore'], include_package_data = True, license = 'BSD License - see LICENSE file', description = 'A simple Django app to attach Dublin Core metadata to arbitrary Django objects', long_description = README, author = 'Mark Redar', author_email = 'mredar@gmail.com', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name = 'django-dublincore', version = '0.1', packages = ['dublincore'], include_package_data = True, license = 'BSD License - see LICENSE file', description = 'A simple Django app to attach Dublin Core metadata to arbitrary Django objects', long_description = README, author = 'Mark Redar', author_email = 'mredar@gmail.com', url = 'https://github.com/mredar/django-dublincore', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
Add url to github for pypi
Add url to github for pypi
Python
bsd-3-clause
mredar/django-dublincore
--- +++ @@ -16,6 +16,7 @@ long_description = README, author = 'Mark Redar', author_email = 'mredar@gmail.com', + url = 'https://github.com/mredar/django-dublincore', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment',
eb2f061574dadaa141047ad27a016ec96b36cf54
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup extra = dict(test_suite="tests.test.suite", include_package_data=True) except ImportError: from distutils.core import setup extra = {} long_description = \ ''' A python library for console-based raw input-based questions with answers and extensive and extensible validation for answers. ''' from qav import __version__ setup( name='qav', version=__version__, author='Derek Yarnell', author_email='derek@umiacs.umd.edu', packages=['qav'], url='https://gitlab.umiacs.umd.edu/staff/qav', license='MIT', description='Question Answer Validation', long_description=long_description, **extra )
#!/usr/bin/env python try: from setuptools import setup extra = dict(test_suite="tests.test.suite", include_package_data=True) except ImportError: from distutils.core import setup extra = {} long_description = \ ''' A python library for console-based raw input-based questions with answers and extensive and extensible validation for answers. ''' from qav import __version__ setup( name='qav', version=__version__, author='Derek Yarnell', author_email='derek@umiacs.umd.edu', packages=['qav'], url='https://github.com/UMIACS/qav', license='MIT', description='Question Answer Validation', long_description=long_description, **extra )
Update the project URL to point to github.
Update the project URL to point to github.
Python
lgpl-2.1
UMIACS/qav,raushan802/qav
--- +++ @@ -21,7 +21,7 @@ author='Derek Yarnell', author_email='derek@umiacs.umd.edu', packages=['qav'], - url='https://gitlab.umiacs.umd.edu/staff/qav', + url='https://github.com/UMIACS/qav', license='MIT', description='Question Answer Validation', long_description=long_description,
a6bafb8af90a82ac95dfa26df24c114cb3808cb8
setup.py
setup.py
from distutils.core import setup from setuptools import setup, find_packages setup(name = "django-image-cropping", version = "0.6.3", description = "A reusable app for cropping images easily and non-destructively in Django", long_description=open('README.rst').read(), author = "jonasvp", author_email = "jvp@jonasundderwolf.de", url = "http://github.com/jonasundderwolf/django-image-cropping", #Name the folder where your packages live: #(If you have other packages (dirs) or modules (py files) then #put them into the package directory - they will be found #recursively.) packages = find_packages(), include_package_data=True, install_requires = [ 'easy_thumbnails==1.1', ], test_suite='example.runtests.runtests', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
from distutils.core import setup from setuptools import setup, find_packages setup(name = "django-image-cropping", version = "0.6.3", description = "A reusable app for cropping images easily and non-destructively in Django", long_description=open('README.rst').read(), author = "jonasvp", author_email = "jvp@jonasundderwolf.de", url = "http://github.com/jonasundderwolf/django-image-cropping", #Name the folder where your packages live: #(If you have other packages (dirs) or modules (py files) then #put them into the package directory - they will be found #recursively.) packages = find_packages(), include_package_data=True, install_requires = [ 'easy_thumbnails==1.2', ], test_suite='example.runtests.runtests', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
Update required version of easy-thumbnails
Update required version of easy-thumbnails So we avoid deprecation warnings with Django 1.5
Python
bsd-3-clause
henriquechehad/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping,winzard/django-image-cropping
--- +++ @@ -15,7 +15,7 @@ packages = find_packages(), include_package_data=True, install_requires = [ - 'easy_thumbnails==1.1', + 'easy_thumbnails==1.2', ], test_suite='example.runtests.runtests', classifiers = [
920b8f565580f228abca43b54027fa4ec7247a34
setup.py
setup.py
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( # Application name: name="blynkapi", # Version number (initial): version="0.1.5", description="This is a simple blynk HTTP/HTTPS API wrapper.", long_description=long_description, #URL url='https://github.com/xandr2/blynkapi', download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.5.tar.gz', # Application author details: author="Alexandr Borysov", author_email="xandr2@gmail.com", # License license='MIT', keywords=['python', 'blynk', 'HTTP/HTTPS', 'API', 'wrapper'], # Packages packages=["blynkapi"], # Include additional files into the package #include_package_data=True, # # license="LICENSE.txt", # long_description=open("README.txt").read(), # Dependent packages (distributions) #install_requires=[ # "urllib2", #], classifiers = [], )
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( # Application name: name="blynkapi", # Version number (initial): version="0.1.6", description="This is a simple blynk HTTP/HTTPS API wrapper.", long_description=long_description, #URL url='https://github.com/xandr2/blynkapi', download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.6.tar.gz', # Application author details: author="Alexandr Borysov", author_email="xandr2@gmail.com", # License license='MIT', keywords=['python', 'blynk', 'HTTP/HTTPS', 'API', 'wrapper'], # Packages packages=["blynkapi"], # Include additional files into the package #include_package_data=True, # # license="LICENSE.txt", # long_description=open("README.txt").read(), # Dependent packages (distributions) #install_requires=[ # "urllib2", #], classifiers = [], )
Add old method for setting val to pin named set_val_old
Add old method for setting val to pin named set_val_old
Python
mit
xandr2/blynkapi
--- +++ @@ -15,14 +15,14 @@ name="blynkapi", # Version number (initial): - version="0.1.5", + version="0.1.6", description="This is a simple blynk HTTP/HTTPS API wrapper.", long_description=long_description, #URL url='https://github.com/xandr2/blynkapi', - download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.5.tar.gz', + download_url = 'https://github.com/xandr2/blynkapi/archive/0.1.6.tar.gz', # Application author details: author="Alexandr Borysov",
853fd7147f6a49968d1d5a48f452e88672742981
setup.py
setup.py
from setuptools import setup, find_packages setup( name='Flask-DebugToolbar', version='0.6dev', url='http://github.com/mvantellingen/flask-debugtoolbar', license='BSD', author='Michael van Tellingen', author_email='michaelvantellingen@gmail.com', description='A port of the Django debug toolbar to Flask', long_description=__doc__, zip_safe=False, platforms='any', include_package_data=True, packages=['flask_debugtoolbar', 'flask_debugtoolbar.panels' ], install_requires=[ 'setuptools', 'simplejson', 'Flask>=0.8', ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
from setuptools import setup, find_packages setup( name='Flask-DebugToolbar', version='0.6dev', url='http://github.com/mvantellingen/flask-debugtoolbar', license='BSD', author='Michael van Tellingen', author_email='michaelvantellingen@gmail.com', description='A port of the Django debug toolbar to Flask', long_description=__doc__, zip_safe=False, platforms='any', include_package_data=True, packages=['flask_debugtoolbar', 'flask_debugtoolbar.panels' ], install_requires=[ 'setuptools', 'simplejson', 'Flask>=0.8', 'Blinker', ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
Add missing dependency on Blinker
Add missing dependency on Blinker
Python
bsd-3-clause
lepture/flask-debugtoolbar,dianchang/flask-debugtoolbar,dianchang/flask-debugtoolbar,dianchang/flask-debugtoolbar,lepture/flask-debugtoolbar
--- +++ @@ -20,6 +20,7 @@ 'setuptools', 'simplejson', 'Flask>=0.8', + 'Blinker', ], classifiers=[ 'Development Status :: 4 - Beta',
67061c16a730ed787699ee79f2edb62a7c9f016a
setup.py
setup.py
from setuptools import setup setup(name='pattern_finder_gpu', version='1.0', description='Brute force OpenCL based pattern localization in images that supports masking and weighting.', url='https://github.com/HearSys/pattern_finder_gpu', author='Samuel John (HörSys GmbH)', author_email='john.samuel@hoersys.de', license='MIT', packages=['pattern_finder_gpu'], package_data={'openCL_kernel': ['pattern_finder_gpu/convolve_with_weighting.cl']}, install_requires=['pyopencl', 'numpy', 'scipy', 'matplotlib', 'scikit-image'], zip_safe=False)
from setuptools import setup setup(name='pattern_finder_gpu', version='1.0', description='Brute force OpenCL based pattern localization in images that supports masking and weighting.', url='https://github.com/HearSys/pattern_finder_gpu', author='Samuel John (HörSys GmbH)', author_email='john.samuel@hoersys.de', license='MIT', packages=['pattern_finder_gpu'], package_data={'openCL_kernel': ['*.cl']}, install_requires=['pyopencl', 'numpy', 'scipy', 'matplotlib', 'scikit-image'], zip_safe=False)
Fix path to OpenCL kernel (2nd)
Fix path to OpenCL kernel (2nd)
Python
mit
HearSys/pattern_finder_gpu,HearSys/pattern_finder_gpu
--- +++ @@ -8,6 +8,6 @@ author_email='john.samuel@hoersys.de', license='MIT', packages=['pattern_finder_gpu'], - package_data={'openCL_kernel': ['pattern_finder_gpu/convolve_with_weighting.cl']}, + package_data={'openCL_kernel': ['*.cl']}, install_requires=['pyopencl', 'numpy', 'scipy', 'matplotlib', 'scikit-image'], zip_safe=False)
ef94b8ee00d7257481cba984f75290a2e8c8ca15
setup.py
setup.py
#/usr/bin/env python import os from setuptools import setup, find_packages ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) # Dynamically calculate the version based on photologue.VERSION version_tuple = __import__('photologue').VERSION if len(version_tuple) == 3: version = "%d.%d.%s" % version_tuple else: version = "%d.%d" % version_tuple[:2] setup( name = "django-photologue-praekelt", version = version, description = "Powerful image management for the Django web framework. Praekelt fork.", author = "Justin Driscoll", author_email = "hedley@praekelt.com", url = "https://github.com/praekelt/django-photologue/", packages = find_packages(), package_data = { 'photologue': [ 'res/*.jpg', 'locale/*/LC_MESSAGES/*', 'templates/photologue/*.html', 'templates/photologue/tags/*.html', ] }, zip_safe = False, test_suite="setuptest.setuptest.SetupTestSuite", tests_require=[ 'django-setuptest>=0.1.4', ], classifiers = ['Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Utilities'], )
#/usr/bin/env python import os from setuptools import setup, find_packages ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) # Dynamically calculate the version based on photologue.VERSION version_tuple = __import__('photologue').VERSION if len(version_tuple) == 3: version = "%d.%d.%s" % version_tuple else: version = "%d.%d" % version_tuple[:2] setup( name = "django-photologue-praekelt", version = version, description = "Powerful image management for the Django web framework. Praekelt fork.", author = "Justin Driscoll", author_email = "hedley@praekelt.com", url = "https://github.com/praekelt/django-photologue/", packages = find_packages(), package_data = { 'photologue': [ 'res/*.jpg', 'locale/*/LC_MESSAGES/*', 'templates/photologue/*.html', 'templates/photologue/tags/*.html', ] }, zip_safe = False, test_suite="setuptest.setuptest.SetupTestSuite", tests_require=[ 'django-setuptest>=0.1.4', 'Pillow', ], classifiers = ['Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Utilities'], )
Add Pillow to tests require
Add Pillow to tests require
Python
bsd-3-clause
praekelt/django-photologue,praekelt/django-photologue
--- +++ @@ -32,6 +32,7 @@ test_suite="setuptest.setuptest.SetupTestSuite", tests_require=[ 'django-setuptest>=0.1.4', + 'Pillow', ], classifiers = ['Development Status :: 5 - Production/Stable', 'Environment :: Web Environment',
96d19368545804bbfbcf2455bb86efa75799b439
setup.py
setup.py
import os, io from setuptools import setup, find_packages long_description = ( io.open('README.rst', encoding='utf-8').read() + '\n' + io.open('CHANGES.txt', encoding='utf-8').read()) setup(name='more.jwtauth', version='0.1.dev0', description="JWT Access Auth Identity Policy for Morepath", long_description=long_description, author="Henri Schumacher", author_email="henri.hulski@gazeta.pl", keywords='morepath JWT identity authentication', license="BSD", url="https://github.com/henri-hulski/more.jwtauth", namespace_packages=['more'], packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'morepath > 0.9', 'cryptography', 'PyJWT >= 0.4.2' ], extras_require=dict( test=['pytest >= 2.6.0', 'pytest-cov', 'WebTest'], ), )
import os, io from setuptools import setup, find_packages long_description = ( io.open('README.rst', encoding='utf-8').read() + '\n' + io.open('CHANGES.txt', encoding='utf-8').read()) setup(name='more.jwtauth', version='0.1.dev0', description="JWT Access Auth Identity Policy for Morepath", long_description=long_description, author="Henri Schumacher", author_email="henri.hulski@gazeta.pl", keywords='morepath JWT identity authentication', license="BSD", url="https://github.com/henri-hulski/more.jwtauth", namespace_packages=['more'], packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=[ 'setuptools', 'morepath > 0.9', 'PyJWT >= 1.0.0', 'cryptography >= 0.8' ], extras_require=dict( test=['pytest >= 2.6.0', 'pytest-cov', 'WebTest'], ), )
Upgrade to PyJWT 1.0.0 and cryptography 0.8
Upgrade to PyJWT 1.0.0 and cryptography 0.8
Python
bsd-3-clause
morepath/more.jwtauth
--- +++ @@ -22,8 +22,8 @@ install_requires=[ 'setuptools', 'morepath > 0.9', - 'cryptography', - 'PyJWT >= 0.4.2' + 'PyJWT >= 1.0.0', + 'cryptography >= 0.8' ], extras_require=dict( test=['pytest >= 2.6.0',
6fe0966cc6c0532ee6d0076ff6306ceda3418928
bluebottle/homepage/model.py
bluebottle/homepage/model.py
from bluebottle.slides.models import Slide from bluebottle.projects import get_project_model from bluebottle.quotes.models import Quote PROJECT_MODEL = get_project_model() class HomePage(object): def get(self, language): self.id = 1 self.quotes = Quote.objects.published().filter(language=language) self.slides = Slide.objects.published().filter(language=language) projects = PROJECT_MODEL.objects.filter(status__viewable=True, favorite=True).order_by('?') if len(projects) > 4: self.projects = projects[0:4] elif len(projects) > 0: self.projects = projects[0:len(projects)] else: self.projects = None return self
from bluebottle.slides.models import Slide from bluebottle.projects import get_project_model from bluebottle.quotes.models import Quote PROJECT_MODEL = get_project_model() class HomePage(object): def get(self, language): # FIXME: Hack to make sure quotes and slides load. if language == 'en-us': language = 'en_US' self.id = 1 self.quotes = Quote.objects.published().filter(language=language) self.slides = Slide.objects.published().filter(language=language) projects = PROJECT_MODEL.objects.filter(status__viewable=True).order_by('?') if len(projects) > 4: self.projects = projects[0:4] elif len(projects) > 0: self.projects = projects[0:len(projects)] else: self.projects = None return self
Fix Slides & Quotes for home
Fix Slides & Quotes for home
Python
bsd-3-clause
jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle
--- +++ @@ -7,11 +7,14 @@ class HomePage(object): def get(self, language): + # FIXME: Hack to make sure quotes and slides load. + if language == 'en-us': + language = 'en_US' self.id = 1 self.quotes = Quote.objects.published().filter(language=language) self.slides = Slide.objects.published().filter(language=language) - projects = PROJECT_MODEL.objects.filter(status__viewable=True, favorite=True).order_by('?') + projects = PROJECT_MODEL.objects.filter(status__viewable=True).order_by('?') if len(projects) > 4: self.projects = projects[0:4] elif len(projects) > 0:
ae10f81c7da54b4eaf8305aee8118b4ee44c51ed
setup.py
setup.py
from setuptools import setup setup(name='s3same', version='0.1', description='Configure Travis-CI artifact uploading to S3', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', ], keywords='travis ci s3 artifact', url='http://github.com/vokal/s3same', author='Isaac Greenspan', author_email='isaac.greenspan@vokal.io', license='MIT', packages=['s3same'], install_requires=[ 'click', 'boto3', 'pycrypto', 'python-dotenv', 'pyyaml', 'travispy', ], include_package_data=True, scripts=[ 'bin/s3same', ], zip_safe=False)
from setuptools import setup setup(name='s3same', version='0.1', description='Configure Travis-CI artifact uploading to S3', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', ], keywords='travis ci s3 artifact', url='http://github.com/vokal/s3same', author='Isaac Greenspan', author_email='isaac.greenspan@vokal.io', license='MIT', packages=['s3same'], install_requires=[ 'click', 'boto3', 'pycrypto', 'python-dotenv', 'pyyaml', 'travispy', ], include_package_data=True, scripts=[ 'bin/s3same', ], zip_safe=False)
Add Python 3 to the classifiers.
Add Python 3 to the classifiers.
Python
mit
vokal/s3same,vokal-isaac/s3same
--- +++ @@ -7,6 +7,7 @@ 'Development Status :: 2 - Pre-Alpha', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', ], keywords='travis ci s3 artifact', url='http://github.com/vokal/s3same',
078b6bf9d58e92742907577f62d7bd0eb752b90c
setup.py
setup.py
#!/usr/bin/python # -*- coding: utf-8 -*- import os from setuptools import setup def read(*paths): """ read files """ with open(os.path.join(*paths), 'r') as filename: return filename.read() install_requires = read('requirements.txt').splitlines() try: import argparse except ImportError: install_requires.append('argparse') setup( name="slacker-cli", version="0.4.0", description="Send messages to slack from command line", long_description=(read('README.rst')), url="https://github.com/juanpabloaj/slacker-cli", install_requires=install_requires, license='MIT', author="JuanPablo AJ", author_email="jpabloaj@gmail.com", packages=['slacker_cli'], test_suite="tests", entry_points={ 'console_scripts': [ 'slacker=slacker_cli:main', ], }, classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4' ] )
#!/usr/bin/python # -*- coding: utf-8 -*- import os from setuptools import setup def read(*paths): """ read files """ with open(os.path.join(*paths), 'r') as filename: return filename.read() install_requires = read('requirements.txt').splitlines() try: import argparse except ImportError: install_requires.append('argparse') setup( name="slacker-cli", version="0.4.0", description="Send messages to slack from command line", long_description=(read('README.rst')), url="https://github.com/juanpabloaj/slacker-cli", install_requires=install_requires, license='MIT', author="JuanPablo AJ", author_email="jpabloaj@gmail.com", packages=['slacker_cli'], test_suite="tests", entry_points={ 'console_scripts': [ 'slacker=slacker_cli:main', ], }, classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6' ] )
Remove 2.6, add 3.5 and 3.6
Remove 2.6, add 3.5 and 3.6
Python
mit
juanpabloaj/slacker-cli
--- +++ @@ -37,9 +37,10 @@ }, classifiers=[ 'Programming Language :: Python', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4' + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6' ] )
752f0f019163e4932b113d7aa72c4a935e6ae516
planetstack/model_policies/__init__.py
planetstack/model_policies/__init__.py
from .model_policy_Slice import * from .model_policy_User import * from .model_policy_Network import * from .model_policy_Site import * from .model_policy_SitePrivilege import * from .model_policy_SlicePrivilege import * from .model_policy_ControllerSlice import * from .model_policy_Controller import * from .model_policy_Image import *
from .model_policy_Slice import * from .model_policy_User import * from .model_policy_Network import * from .model_policy_Site import * from .model_policy_SitePrivilege import * from .model_policy_SlicePrivilege import * from .model_policy_ControllerSlice import * from .model_policy_ControllerSite import * from .model_policy_ControllerUser import * from .model_policy_Controller import * from .model_policy_Image import *
Enable user and site model policies
Enable user and site model policies
Python
apache-2.0
open-cloud/xos,zdw/xos,opencord/xos,cboling/xos,cboling/xos,zdw/xos,open-cloud/xos,opencord/xos,zdw/xos,cboling/xos,zdw/xos,cboling/xos,open-cloud/xos,opencord/xos,cboling/xos
--- +++ @@ -5,5 +5,7 @@ from .model_policy_SitePrivilege import * from .model_policy_SlicePrivilege import * from .model_policy_ControllerSlice import * +from .model_policy_ControllerSite import * +from .model_policy_ControllerUser import * from .model_policy_Controller import * from .model_policy_Image import *
0b03bc03797c6d43573a3f67b9649977f9663a25
setup.py
setup.py
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # 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. from setuptools import setup setup(name='cloud-utils', version='1.0', description='Python Cloud Utilities', author='Arie Abramovici', author_email='beast@google.com', packages=['cloud_utils'], entry_points={'console_scripts': ['list_instances = cloud_utils.list_instances:main']}, install_requires=['boto3', 'botocore', 'google-api-python-client', 'google-auth', 'texttable', 'futures', 'python-dateutil', 'pytz'], zip_safe=False)
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # 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. from setuptools import setup import subprocess COMMIT_COUNT = subprocess.check_output("git rev-list HEAD --count", shell=True) VERSION = '1.0.{}'.format(COMMIT_COUNT) setup(name='cloud-utils', version=VERSION, description='Python Cloud Utilities', author='Arie Abramovici', author_email='beast@google.com', packages=['cloud_utils'], entry_points={'console_scripts': ['list_instances = cloud_utils.list_instances:main']}, install_requires=['boto3', 'botocore', 'google-api-python-client', 'google-auth', 'texttable', 'futures', 'python-dateutil', 'pytz'], zip_safe=False)
Add version by commit count
Add version by commit count
Python
apache-2.0
google/python-cloud-utils
--- +++ @@ -13,9 +13,12 @@ # limitations under the License. from setuptools import setup +import subprocess +COMMIT_COUNT = subprocess.check_output("git rev-list HEAD --count", shell=True) +VERSION = '1.0.{}'.format(COMMIT_COUNT) setup(name='cloud-utils', - version='1.0', + version=VERSION, description='Python Cloud Utilities', author='Arie Abramovici', author_email='beast@google.com',
2392ae642e9f9dd8ede478b63f4c838cfe1dee69
pysyte/text_streams.py
pysyte/text_streams.py
"""Module to handle streams of text""" import os import sys import contextlib from itertools import chain from six import StringIO from pysyte import iteration from pysyte.platforms import get_clipboard_data def clipboard_stream(name=None): stream = StringIO(get_clipboard_data()) stream.name = name or '<clipboard>' return stream @contextlib.contextmanager def clipin(): yield clipboard_stream() def arg_paths(): return [a for a in sys.argv[1:] if os.path.isfile(a)] def arg_files(): """yield streams to all arg.isfile()""" for path in arg_paths(): yield open(path) def all(): more = iter([clipboard_stream(), sys.stdin]) return chain(arg_files(), more) def first(): return iteration.first(all()) def last(): return iteration.last(all()) def any(): try: stream = iteration.first(arg_files()) if stream: return arg_files() except ValueError: return iter([clipboard_stream(), sys.stdin]) def first_file(): try: return iteration.first(arg_files()) except ValueError: return None def full_lines(stream): for line in stream.readlines(): stripped = line.rstrip() if stripped: yield stripped
"""Module to handle streams of text""" import os import sys import contextlib from itertools import chain from six import StringIO from pysyte import iteration from pysyte.platforms import get_clipboard_data def clipboard_stream(name=None): stream = StringIO(get_clipboard_data()) stream.name = name or '<clipboard>' return stream @contextlib.contextmanager def clipin(): yield clipboard_stream() def arg_paths(): return [a for a in sys.argv[1:] if os.path.isfile(a)] def arg_files(): """yield streams to all arg.isfile()""" for path in arg_paths(): yield open(path) def all(): some = False for path in arg_paths(): yield open(path) some = True if not some: yield sys.stdin def first(): return iteration.first(all()) def last(): return iteration.last(all()) def any(): try: stream = iteration.first(arg_files()) if stream: return arg_files() except ValueError: return iter([clipboard_stream(), sys.stdin]) def first_file(): try: return iteration.first(arg_files()) except ValueError: return None def full_lines(stream): for line in stream.readlines(): stripped = line.rstrip() if stripped: yield stripped
Use sys.stdin if not other streams found for all()
Use sys.stdin if not other streams found for all()
Python
mit
jalanb/dotsite
--- +++ @@ -33,8 +33,12 @@ def all(): - more = iter([clipboard_stream(), sys.stdin]) - return chain(arg_files(), more) + some = False + for path in arg_paths(): + yield open(path) + some = True + if not some: + yield sys.stdin def first():
d686524149a11be5e849b449a49429416ef7005d
camelot/roundtable/models.py
camelot/roundtable/models.py
# -*- coding: utf-8 from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Knight(models.Model): name = models.CharField(max_length=63) traitor = models.BooleanField() def __str__(self): return self.name
# -*- coding: utf-8 from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Knight(models.Model): name = models.CharField(max_length=63) traitor = models.BooleanField(default=False) def __str__(self): return self.name
Add False default to traitor BooleanField.
Add False default to traitor BooleanField.
Python
bsd-2-clause
jambonrose/djangocon2014-updj17
--- +++ @@ -7,7 +7,7 @@ @python_2_unicode_compatible class Knight(models.Model): name = models.CharField(max_length=63) - traitor = models.BooleanField() + traitor = models.BooleanField(default=False) def __str__(self): return self.name
bc9289d76c5401d7b43410f2b3150a1d9824757f
donut/email_utils.py
donut/email_utils.py
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart DOMAIN = "beta.donut.caltech.edu" def send_email(to, text, subject, use_prefix=True, group=None, poster='', richtext=''): """ Sends an email to a user. Expects 'to' to be a comma separated string of emails, and for 'msg' and 'subject' to be strings. If group is not none, the email is sent to a newsgroup and the to emails are hidden. """ if richtext: msg = MIMEMultipart('alternative') msg.attach(MIMEText(text, 'plain')) msg.attach(MIMEText(richtext, 'html')) else: msg = MIMEText(text) if use_prefix and '[ASCIT Donut]' not in subject: subject = '[ASCIT Donut] ' + subject msg['Subject'] = subject msg['From'] = f'{poster} <auto@{DOMAIN}>' if group: msg['To'] = group.lower().replace(' ', '_') else: msg['To'] = to with smtplib.SMTP('localhost') as s: s.sendmail('auto@' + DOMAIN, to, msg.as_string())
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart DOMAIN = 'donut.caltech.edu' def send_email(to, text, subject, use_prefix=True, group=None, poster='', richtext=''): """ Sends an email to a user. Expects 'to' to be a comma separated string of emails, and for 'msg' and 'subject' to be strings. If group is not none, the email is sent to a newsgroup and the to emails are hidden. """ if richtext: msg = MIMEMultipart('alternative') msg.attach(MIMEText(text, 'plain')) msg.attach(MIMEText(richtext, 'html')) else: msg = MIMEText(text) if use_prefix and '[ASCIT Donut]' not in subject: subject = '[ASCIT Donut] ' + subject msg['Subject'] = subject msg['From'] = f'{poster} <auto@{DOMAIN}>' if group: msg['To'] = group.lower().replace(' ', '_') else: msg['To'] = to with smtplib.SMTP('localhost') as s: s.sendmail('auto@' + DOMAIN, to, msg.as_string())
Remove beta. from email domain
Remove beta. from email domain
Python
mit
ASCIT/donut,ASCIT/donut-python,ASCIT/donut-python,ASCIT/donut,ASCIT/donut
--- +++ @@ -2,7 +2,7 @@ from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart -DOMAIN = "beta.donut.caltech.edu" +DOMAIN = 'donut.caltech.edu' def send_email(to,
e70537eb2c1a8a68a6a66550e6714816e048bb5e
tests/integration/modules/git.py
tests/integration/modules/git.py
# -*- coding: utf-8 -*- import shutil import subprocess import tempfile # Import Salt Testing libs from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import integration class GitModuleTest(integration.ModuleCase): @classmethod def setUpClass(cls): from salt.utils import which git = which('git') if not git: self.skipTest('The git binary is not available') def setUp(self): self.repos = tempfile.mkdtemp(dir=integration.TMP) self.addCleanup(shutil.rmtree, self.repos, ignore_errors=True) subprocess.check_call(['git', 'init', '--quiet', self.repos]) def test_config_set_value_has_space_characters(self): ''' git.config_set ''' config_key = "user.name" config_value = "foo bar" ret = self.run_function( 'git.config_set', cwd=self.repos, setting_name=config_key, setting_value=config_value, ) self.assertEqual("", ret) output = subprocess.check_output( ['git', 'config', '--local', config_key], cwd=self.repos) self.assertEqual(config_value + "\n", output)
# -*- coding: utf-8 -*- # Import Python Libs import shutil import subprocess import tempfile # Import Salt Testing libs from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import integration class GitModuleTest(integration.ModuleCase): ''' Integration tests for the git module ''' @classmethod def setUpClass(cls): ''' Check if git is installed. If it isn't, skip everything in this class. ''' from salt.utils import which git = which('git') if not git: cls.skipTest('The git binary is not available') def setUp(self): self.repos = tempfile.mkdtemp(dir=integration.TMP) self.addCleanup(shutil.rmtree, self.repos, ignore_errors=True) subprocess.check_call(['git', 'init', '--quiet', self.repos]) def test_config_set_value_has_space_characters(self): ''' Tests the git.config_set function ''' config_key = "user.name" config_value = "foo bar" ret = self.run_function( 'git.config_set', cwd=self.repos, setting_name=config_key, setting_value=config_value, ) self.assertEqual("", ret) output = subprocess.check_output( ['git', 'config', '--local', config_key], cwd=self.repos) self.assertEqual(config_value + "\n", output)
Fix missing cls variable and add some docstring info
Fix missing cls variable and add some docstring info
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
--- +++ @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +# Import Python Libs import shutil import subprocess import tempfile @@ -13,12 +14,19 @@ class GitModuleTest(integration.ModuleCase): + ''' + Integration tests for the git module + ''' + @classmethod def setUpClass(cls): + ''' + Check if git is installed. If it isn't, skip everything in this class. + ''' from salt.utils import which git = which('git') if not git: - self.skipTest('The git binary is not available') + cls.skipTest('The git binary is not available') def setUp(self): self.repos = tempfile.mkdtemp(dir=integration.TMP) @@ -27,7 +35,7 @@ def test_config_set_value_has_space_characters(self): ''' - git.config_set + Tests the git.config_set function ''' config_key = "user.name" config_value = "foo bar"
8a3b4dd4821f22fcb54e9da6386d5e7b90cc99cc
tests/search_backend_postgres.py
tests/search_backend_postgres.py
from wolis.test_case import WolisTestCase class SearchBackendPostgresTest(WolisTestCase): def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morpheus', 'morpheus') self.change_acp_knob( link_text='Search settings', check_page_text='Here you can define what search backend will be used', name='search_type', value='phpbb_search_fulltext_postgres', ) if __name__ == '__main__': import unittest unittest.main()
from wolis.test_case import WolisTestCase class SearchBackendPostgresTest(WolisTestCase): def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morpheus', 'morpheus') self.change_acp_knob( link_text='Search settings', check_page_text='Here you can define what search backend will be used', name='config[search_type]', value='phpbb_search_fulltext_postgres', confirm=True, ) if __name__ == '__main__': import unittest unittest.main()
Make postgres search backend test actually change search backend
Make postgres search backend test actually change search backend
Python
bsd-2-clause
p/wolis-phpbb,p/wolis-phpbb
--- +++ @@ -8,8 +8,9 @@ self.change_acp_knob( link_text='Search settings', check_page_text='Here you can define what search backend will be used', - name='search_type', + name='config[search_type]', value='phpbb_search_fulltext_postgres', + confirm=True, ) if __name__ == '__main__':
79779ed3fdf7bbc5f248cb73c55ccc2715455fe4
thinglang/compiler/allocation.py
thinglang/compiler/allocation.py
class LinearMemoryAllocationLayout(object): def __init__(self, initial=None): initial = initial or {} self.mapping = initial self.next_index = len(initial) def add(self, name): index = self.next_index self.mapping[name] = self.next_index, name.type self.next_index += 1 return index def get(self, name): return self.mapping.get(name) def __contains__(self, item): return self.mapping.__contains__(item)
class LinearMemoryAllocationLayout(object): def __init__(self, initial=None): initial = initial or {} self.mapping = initial self.next_index = len(initial) def add(self, name): index = self.next_index self.mapping[name] = self.next_index, name.type self.next_index += 1 return index def get(self, name): return self.mapping[name] def __contains__(self, item): return self.mapping.__contains__(item)
Make reference resolution get stricter
Make reference resolution get stricter
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
--- +++ @@ -11,7 +11,7 @@ return index def get(self, name): - return self.mapping.get(name) + return self.mapping[name] def __contains__(self, item): return self.mapping.__contains__(item)
20a2a530f797d0eb2e59b283c9c0bdff9d3bb616
conda_env/installers/base.py
conda_env/installers/base.py
ENTRY_POINT = 'conda_env.installers' class InvalidInstaller(Exception): def __init__(self, name): msg = 'Unable to load installer for {}'.format(name) super(InvalidInstaller, self).__init__(msg) def get_installer(name): try: return __import__(ENTRY_POINT + '.' + name) except ImportError: raise InvalidInstaller(name)
import importlib ENTRY_POINT = 'conda_env.installers' class InvalidInstaller(Exception): def __init__(self, name): msg = 'Unable to load installer for {}'.format(name) super(InvalidInstaller, self).__init__(msg) def get_installer(name): try: return importlib.import_module(ENTRY_POINT + '.' + name) except ImportError: raise InvalidInstaller(name)
Switch to using importlib to work
Switch to using importlib to work
Python
bsd-3-clause
ESSS/conda-env,dan-blanchard/conda-env,mikecroucher/conda-env,ESSS/conda-env,isaac-kit/conda-env,mikecroucher/conda-env,isaac-kit/conda-env,nicoddemus/conda-env,nicoddemus/conda-env,phobson/conda-env,conda/conda-env,asmeurer/conda-env,asmeurer/conda-env,conda/conda-env,phobson/conda-env,dan-blanchard/conda-env
--- +++ @@ -1,3 +1,4 @@ +import importlib ENTRY_POINT = 'conda_env.installers' @@ -9,6 +10,6 @@ def get_installer(name): try: - return __import__(ENTRY_POINT + '.' + name) + return importlib.import_module(ENTRY_POINT + '.' + name) except ImportError: raise InvalidInstaller(name)
08c1b6d8523936319dee2525dc795db844432a5d
fjord/heartbeat/tests/__init__.py
fjord/heartbeat/tests/__init__.py
import time import factory from fjord.heartbeat.models import Answer, Survey class SurveyFactory(factory.DjangoModelFactory): class Meta: model = Survey name = 'survey123' enabled = True class AnswerFactory(factory.DjangoModelFactory): class Meta: model = Answer experiment_version = '1' response_version = 1 updated_ts = int(time.time()) survey_id = factory.SubFactory(SurveyFactory) flow_id = 'flowabc' question_id = 'questionabc' # The rest of the fields aren't required and should have sane # defaults.
import time import factory from factory import fuzzy from fjord.heartbeat.models import Answer, Survey class SurveyFactory(factory.DjangoModelFactory): class Meta: model = Survey name = fuzzy.FuzzyText(length=100) enabled = True class AnswerFactory(factory.DjangoModelFactory): class Meta: model = Answer experiment_version = '1' response_version = 1 updated_ts = int(time.time()) survey_id = factory.SubFactory(SurveyFactory) flow_id = fuzzy.FuzzyText(length=50) question_id = fuzzy.FuzzyText(length=50) # The rest of the fields aren't required and should have sane # defaults.
Change some fields to use fuzzy values
Change some fields to use fuzzy values This makes it easier to have tests generate multiple surveys and answers without hitting integrity issues.
Python
bsd-3-clause
hoosteeno/fjord,hoosteeno/fjord,mozilla/fjord,mozilla/fjord,mozilla/fjord,hoosteeno/fjord,mozilla/fjord,hoosteeno/fjord
--- +++ @@ -1,6 +1,7 @@ import time import factory +from factory import fuzzy from fjord.heartbeat.models import Answer, Survey @@ -9,7 +10,7 @@ class Meta: model = Survey - name = 'survey123' + name = fuzzy.FuzzyText(length=100) enabled = True @@ -21,8 +22,8 @@ response_version = 1 updated_ts = int(time.time()) survey_id = factory.SubFactory(SurveyFactory) - flow_id = 'flowabc' - question_id = 'questionabc' + flow_id = fuzzy.FuzzyText(length=50) + question_id = fuzzy.FuzzyText(length=50) # The rest of the fields aren't required and should have sane # defaults.
6a53185da27ca3c1257d503389fe66936a4d8014
testing/test_rm_dirs.py
testing/test_rm_dirs.py
from __future__ import absolute_import, print_function import os import sys import pytest from ..pyautoupdate.launcher import Launcher @pytest.fixture(scope='function') def create_update_dir(request): os.mkdir('downloads') files=['tesfeo','fjfesf','fihghg'] filedir=[os.path.join('downloads',fi) for fi in files] os.mkdir(os.path.join('downloads','subfolder')) filedir.append(os.path.join('downloads','subfolder','oweigjoewig')) for each_file in filedir: with open(each_file, mode='w') as new_file: new_file.write('') def teardown(): for file_path in filedir: try: if os.path.isfile(file_path): os.unlink(file_path) raise AssertionError#fail test if files exist except OSError as error: print(error, file=sys.stderr) try: if os.path.isdir('downloads'): os.rmdir('downloads') except OSError as error: print(error, file=sys.stderr) request.addfinalizer(teardown) return create_update_dir def test_rm_dirs(create_update_dir): launch = Launcher('','') launch._reset_update_dir()
from __future__ import absolute_import, print_function import os import sys import pytest from ..pyautoupdate.launcher import Launcher @pytest.fixture(scope='function') def create_update_dir(request): os.mkdir('downloads') files=['tesfeo','fjfesf','fihghg'] filedir=[os.path.join('downloads',fi) for fi in files] os.mkdir(os.path.join('downloads','subfolder')) filedir.append(os.path.join('downloads','subfolder','oweigjoewig')) for each_file in filedir: with open(each_file, mode='w') as new_file: new_file.write('') def teardown(): for file_path in filedir: try: if os.path.isfile(file_path): os.unlink(file_path) raise AssertionError#fail test if files exist except OSError as error: print(error, file=sys.stderr) try: if os.path.isdir('downloads'): os.rmdir('downloads') except OSError as error: print(error, file=sys.stderr) request.addfinalizer(teardown) return create_update_dir def test_rm_dirs(create_update_dir): launch = Launcher('','') launch._reset_update_dir() assert os.path.isdir('downloads')
Fix test to add assertion
Fix test to add assertion rmdir test now expected to fail
Python
lgpl-2.1
rlee287/pyautoupdate,rlee287/pyautoupdate
--- +++ @@ -34,3 +34,4 @@ def test_rm_dirs(create_update_dir): launch = Launcher('','') launch._reset_update_dir() + assert os.path.isdir('downloads')
6c16fb42efd148a6e99788e55e20fa7d55b15cab
tests/docs/test_docs.py
tests/docs/test_docs.py
import subprocess import unittest import os class Doc_Test(unittest.TestCase): @property def path_to_docs(self): dirname, file_name = os.path.split(os.path.abspath(__file__)) return dirname.split(os.path.sep)[:-2] + ["docs"] def test_html(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) response = subprocess.run(["make", "html"]) self.assertTrue(response.returncode == 0) os.chdir(wd) def test_linkcheck(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) response = subprocess.run(["make", "linkcheck"]) print(response.returncode) self.assertTrue(response.returncode == 0) os.chdir(wd) if __name__ == "__main__": unittest.main()
import subprocess import unittest import os class Doc_Test(unittest.TestCase): @property def path_to_docs(self): dirname, file_name = os.path.split(os.path.abspath(__file__)) return dirname.split(os.path.sep)[:-2] + ["docs"] def test_html(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) if platform.system() != "Windows": response = subprocess.run(["make", "html-noplot"]) self.assertTrue(response.returncode == 0) else: response = subprocess.call(["make", "html"], shell=True) self.assertTrue(response == 0) os.chdir(wd) def test_linkcheck(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) if platform.system() != "Windows": response = subprocess.run(["make", "linkcheck-noplot"]) self.assertTrue(response.returncode == 0) else: response = subprocess.call(["make", "linkcheck"], shell=True) self.assertTrue(response == 0) os.chdir(wd) if __name__ == "__main__": unittest.main()
Update link check to look at platform
Update link check to look at platform
Python
mit
simpeg/discretize,simpeg/discretize,simpeg/discretize
--- +++ @@ -13,17 +13,26 @@ wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) - response = subprocess.run(["make", "html"]) - self.assertTrue(response.returncode == 0) + if platform.system() != "Windows": + response = subprocess.run(["make", "html-noplot"]) + self.assertTrue(response.returncode == 0) + else: + response = subprocess.call(["make", "html"], shell=True) + self.assertTrue(response == 0) + os.chdir(wd) def test_linkcheck(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) - response = subprocess.run(["make", "linkcheck"]) - print(response.returncode) - self.assertTrue(response.returncode == 0) + if platform.system() != "Windows": + response = subprocess.run(["make", "linkcheck-noplot"]) + self.assertTrue(response.returncode == 0) + else: + response = subprocess.call(["make", "linkcheck"], shell=True) + self.assertTrue(response == 0) + os.chdir(wd)
4b84cedd15a2774391544a6edee3532e5e267608
tests/docs/test_docs.py
tests/docs/test_docs.py
import subprocess import unittest import os import subprocess import unittest import os class Doc_Test(unittest.TestCase): @property def path_to_docs(self): dirname, filename = os.path.split(os.path.abspath(__file__)) return dirname.split(os.path.sep)[:-2] + ['docs'] def test_html(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) response = subprocess.run(["make", "html"]) self.assertTrue(response.returncode == 0) os.chdir(wd) def test_linkcheck(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) response = subprocess.run(["make", "linkcheck"]) print(response.returncode) self.assertTrue(response.returncode == 0) os.chdir(wd) if __name__ == '__main__': unittest.main()
import subprocess import unittest import os import subprocess import unittest import os class Doc_Test(unittest.TestCase): @property def path_to_docs(self): dirname, filename = os.path.split(os.path.abspath(__file__)) return dirname.split(os.path.sep)[:-2] + ['docs'] def test_html(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) response = subprocess.run(["make", "html"]) self.assertTrue(response.returncode == 0) # response = subprocess.call(["make", "html"], shell=True) # Needed for local test on Windows # self.assertTrue(response == 0) os.chdir(wd) def test_linkcheck(self): wd = os.getcwd() os.chdir(os.path.sep.join(self.path_to_docs)) response = subprocess.run(["make", "linkcheck"]) print(response.returncode) self.assertTrue(response.returncode == 0) # response = subprocess.call(["make", "linkcheck"], shell=True) # Needed for local test on Windows # print(response) # self.assertTrue(response == 0) os.chdir(wd) if __name__ == '__main__': unittest.main()
Edit docs test for local test on windows machine
Edit docs test for local test on windows machine
Python
mit
simpeg/simpeg
--- +++ @@ -20,6 +20,9 @@ response = subprocess.run(["make", "html"]) self.assertTrue(response.returncode == 0) + # response = subprocess.call(["make", "html"], shell=True) # Needed for local test on Windows + # self.assertTrue(response == 0) + os.chdir(wd) def test_linkcheck(self): @@ -29,6 +32,10 @@ response = subprocess.run(["make", "linkcheck"]) print(response.returncode) self.assertTrue(response.returncode == 0) + # response = subprocess.call(["make", "linkcheck"], shell=True) # Needed for local test on Windows + # print(response) + # self.assertTrue(response == 0) + os.chdir(wd)
17390cc09c7ffd8583fd170acb2a4b1e8d4efabd
tests/formats/visual.py
tests/formats/visual.py
from __future__ import unicode_literals import unittest from pyaavso.formats.visual import VisualFormatWriter class VisualFormatWriterTestCase(unittest.TestCase): def test_writer_init(self): writer = VisualFormatWriter()
from __future__ import unicode_literals import unittest from StringIO import StringIO from pyaavso.formats.visual import VisualFormatWriter class VisualFormatWriterTestCase(unittest.TestCase): """ Tests for VisualFormatWriter class. """ def test_write_header_obscode(self): """ Check that observer code is written into file. """ fp = StringIO() writer = VisualFormatWriter(fp, 'XYZ') contents = fp.getvalue() self.assertIn("#OBSCODE=XYZ", contents)
Test for obscode in file.
Test for obscode in file.
Python
mit
zsiciarz/pyaavso
--- +++ @@ -1,10 +1,20 @@ from __future__ import unicode_literals import unittest +from StringIO import StringIO from pyaavso.formats.visual import VisualFormatWriter class VisualFormatWriterTestCase(unittest.TestCase): - def test_writer_init(self): - writer = VisualFormatWriter() + """ + Tests for VisualFormatWriter class. + """ + def test_write_header_obscode(self): + """ + Check that observer code is written into file. + """ + fp = StringIO() + writer = VisualFormatWriter(fp, 'XYZ') + contents = fp.getvalue() + self.assertIn("#OBSCODE=XYZ", contents)
3a2fc6b73aec538802adff2bd95261ffc56ca475
rover.py
rover.py
class Rover: compass = ['N', 'E', 'S', 'W'] def __init__(self, x=0, y=0, direction='N'): self.x = x self.y = y self.direction = direction @property def position(self): return self.x, self.y, self.direction @property def compass_index(self): return next(i for i in range(0, len(self.compass)) if self.compass[i] == self.direction) @property def axis(self): # 0 if pointing along x axis # 1 if pointing along y axis return (self.compass_index + 1) % 2 def set_position(self, x=self.x, y=self.y, direction=self.direction): self.x = x self.y = y self.direction = direction def move(*args): for command in args: if command == 'F': # Move forward command pass else: pass
class Rover: compass = ['N', 'E', 'S', 'W'] def __init__(self, x=0, y=0, direction='N'): self.x = x self.y = y self.direction = direction @property def position(self): return self.x, self.y, self.direction @property def compass_index(self): return next(i for i in range(0, len(self.compass)) if self.compass[i] == self.direction) @property def axis(self): # 0 if pointing along x axis # 1 if pointing along y axis return (self.compass_index + 1) % 2 def set_position(self, x=None, y=None, direction=None): if x is not None: self.x = x if y is not None: self.y = y if direction is not None: self.direction = direction def move(self, *args): for command in args: if command == 'F': # Move forward command if self.compass_index < 2: # Upper right quadrant, increasing x/y pass else: pass
Add default arguments to set_position, add self argument to move function
Add default arguments to set_position, add self argument to move function
Python
mit
authentik8/rover
--- +++ @@ -22,15 +22,22 @@ # 1 if pointing along y axis return (self.compass_index + 1) % 2 - def set_position(self, x=self.x, y=self.y, direction=self.direction): - self.x = x - self.y = y - self.direction = direction + def set_position(self, x=None, y=None, direction=None): + if x is not None: + self.x = x - def move(*args): + if y is not None: + self.y = y + + if direction is not None: + self.direction = direction + + def move(self, *args): for command in args: if command == 'F': # Move forward command - pass + if self.compass_index < 2: + # Upper right quadrant, increasing x/y + pass else: pass
1e7e103799661acfd2cd492febbcc0ef537215e1
bazaar/warehouse/views.py
bazaar/warehouse/views.py
from __future__ import unicode_literals from django.core.urlresolvers import reverse_lazy from django.views.generic import FormView from braces.views import LoginRequiredMixin from ..mixins import BazaarPrefixMixin from . import api from .forms import MovementForm class MovementMixin(LoginRequiredMixin, BazaarPrefixMixin): def get_success_url(self): if "next" in self.request.GET: return self.request.GET.get("next") else: return super(MovementMixin, self).get_success_url() def get_initial(self): initial = super(MovementMixin, self).get_initial() product = self.request.GET.get("product") if product: initial["product"] = product return initial class MovementFormView(MovementMixin, FormView): form_class = MovementForm template_name = "warehouse/movement.html" success_url = reverse_lazy("bazaar:movement") def form_valid(self, form): product = form.cleaned_data["product"] from_location = form.cleaned_data["from_location"] to_location = form.cleaned_data["to_location"] quantity = form.cleaned_data["quantity"] unit_price = form.cleaned_data["unit_price"] note = form.cleaned_data["note"] api.move(from_location, to_location, product, quantity, unit_price, agent=self.request.user, note=note) return super(MovementFormView, self).form_valid(form)
from __future__ import unicode_literals from django.core.urlresolvers import reverse_lazy from django.views.generic import FormView from braces.views import LoginRequiredMixin from ..mixins import BazaarPrefixMixin from . import api from .forms import MovementForm class MovementMixin(LoginRequiredMixin, BazaarPrefixMixin): def get_success_url(self): if "next" in self.request.GET: return self.request.GET.get("next") else: return super(MovementMixin, self).get_success_url() def get_initial(self): initial = super(MovementMixin, self).get_initial() product = self.request.GET.get("product") if product: initial["product"] = product return initial class MovementFormView(MovementMixin, FormView): form_class = MovementForm template_name = "warehouse/movement.html" success_url = reverse_lazy("bazaar:movement") def form_valid(self, form): product = form.cleaned_data["product"] from_location = form.cleaned_data["from_location"] to_location = form.cleaned_data["to_location"] quantity = form.cleaned_data["quantity"] unit_price = form.cleaned_data["unit_price"] note = form.cleaned_data["note"] price_multiplier = unit_price / product.price product.move(from_location, to_location, quantity=quantity, price_multiplier=price_multiplier, agent=self.request.user, note=note) return super(MovementFormView, self).form_valid(form)
Fix of dummymovement form to use product.move instead of api.move
Fix of dummymovement form to use product.move instead of api.move
Python
bsd-2-clause
meghabhoj/NEWBAZAAR,evonove/django-bazaar,evonove/django-bazaar,meghabhoj/NEWBAZAAR,meghabhoj/NEWBAZAAR,evonove/django-bazaar
--- +++ @@ -40,7 +40,9 @@ unit_price = form.cleaned_data["unit_price"] note = form.cleaned_data["note"] - api.move(from_location, to_location, product, quantity, unit_price, - agent=self.request.user, note=note) + price_multiplier = unit_price / product.price + + product.move(from_location, to_location, quantity=quantity, price_multiplier=price_multiplier, + agent=self.request.user, note=note) return super(MovementFormView, self).form_valid(form)
9cffd831aaf1aff1dd3f655c4336c57831fef700
nomadblog/urls.py
nomadblog/urls.py
from django.conf.urls.defaults import patterns, url from nomadblog.views import PostList urlpatterns = patterns('nomadblog.views', # List blog posts url('^$', PostList.as_view(), name='list_posts'), # Show single post, category + slug based URL url( regex=r'^(?P<category_slug>[-\w]+)/(?P<post_slug>[-\w]+)/$', view='show_post', name='show_post', ), # List categories url( regex=r'^categories/list/all/$', view='list_categories', name='list_categories', ), # List posts by category url( regex=r'^(?P<category>[-\w]+)/$', view='list_posts_by_category', name='list_posts_by_category', ), )
from django.conf.urls import patterns, include, url from nomadblog.views import PostList urlpatterns = patterns( 'nomadblog.views', url('^$', PostList.as_view(), name='list_posts'), url(regex=r'^(?P<category_slug>[-\w]+)/(?P<post_slug>[-\w]+)/$', view='show_post', name='show_post'), url(regex=r'^categories/list/all/$', view='list_categories', name='list_categories'), url(regex=r'^(?P<category>[-\w]+)/$', view='list_posts_by_category', name='list_posts_by_category'), )
Fix ImportError: No module named defaults (dj 1.6)
Fix ImportError: No module named defaults (dj 1.6)
Python
bsd-3-clause
Nomadblue/django-nomad-blog,Nomadblue/django-nomad-blog
--- +++ @@ -1,26 +1,11 @@ -from django.conf.urls.defaults import patterns, url +from django.conf.urls import patterns, include, url from nomadblog.views import PostList -urlpatterns = patterns('nomadblog.views', - # List blog posts +urlpatterns = patterns( + 'nomadblog.views', url('^$', PostList.as_view(), name='list_posts'), - # Show single post, category + slug based URL - url( - regex=r'^(?P<category_slug>[-\w]+)/(?P<post_slug>[-\w]+)/$', - view='show_post', - name='show_post', - ), - # List categories - url( - regex=r'^categories/list/all/$', - view='list_categories', - name='list_categories', - ), - # List posts by category - url( - regex=r'^(?P<category>[-\w]+)/$', - view='list_posts_by_category', - name='list_posts_by_category', - ), + url(regex=r'^(?P<category_slug>[-\w]+)/(?P<post_slug>[-\w]+)/$', view='show_post', name='show_post'), + url(regex=r'^categories/list/all/$', view='list_categories', name='list_categories'), + url(regex=r'^(?P<category>[-\w]+)/$', view='list_posts_by_category', name='list_posts_by_category'), )
c8e21dc4de9bae65bca9d30a91cb45bf7872b3f9
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='windpowerlib', version='0.1.2dev', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof developing group', author_email='windpowerlib@rl-institut.de', license=None, packages=['windpowerlib'], package_data={ 'windpowerlib': [os.path.join('data', '*.csv')]}, long_description=read('README.rst'), zip_safe=False, install_requires=['pandas >= 0.19.1', 'requests'])
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='windpowerlib', version='0.1.2dev', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', author='oemof developer group', author_email='windpowerlib@rl-institut.de', license=None, packages=['windpowerlib'], package_data={ 'windpowerlib': [os.path.join('data', '*.csv')]}, long_description=read('README.rst'), zip_safe=False, install_requires=['pandas >= 0.19.1', 'requests'])
Correct author to oemof developER group
Correct author to oemof developER group
Python
mit
wind-python/windpowerlib
--- +++ @@ -10,7 +10,7 @@ version='0.1.2dev', description='Creating time series of wind power plants.', url='http://github.com/wind-python/windpowerlib', - author='oemof developing group', + author='oemof developer group', author_email='windpowerlib@rl-institut.de', license=None, packages=['windpowerlib'],
777e9e8d76520f1e5d35ee9e17c0f36a7609ebd0
setup.py
setup.py
from setuptools import setup setup( name='scrapy-corenlp', version='0.1.1', description='Scrapy spider middleware :: Stanford CoreNLP Named Entity Recognition', url='https://github.com/vu3jej/scrapy-corenlp', author='Jithesh E J', author_email='mail@jithesh.net', license='BSD-2-Clause', packages=['scrapy_corenlp'], classifiers=[ 'Development Status :: 3 - Alpha', 'Programming Language :: Python :: 3.4', 'Topic :: Text Processing :: Linguistic', ] )
from setuptools import setup setup( name='scrapy-corenlp', version='0.2.0', description='Scrapy spider middleware :: Stanford CoreNLP Named Entity Recognition', url='https://github.com/vu3jej/scrapy-corenlp', author='Jithesh E J', author_email='mail@jithesh.net', license='BSD-2-Clause', packages=['scrapy_corenlp'], classifiers=[ 'Development Status :: 3 - Alpha', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Text Processing :: Linguistic', ] )
Add support for Python 2.7, 3.4 & 3.5
Add support for Python 2.7, 3.4 & 3.5
Python
bsd-2-clause
vu3jej/scrapy-corenlp
--- +++ @@ -3,7 +3,7 @@ setup( name='scrapy-corenlp', - version='0.1.1', + version='0.2.0', description='Scrapy spider middleware :: Stanford CoreNLP Named Entity Recognition', url='https://github.com/vu3jej/scrapy-corenlp', author='Jithesh E J', @@ -12,7 +12,9 @@ packages=['scrapy_corenlp'], classifiers=[ 'Development Status :: 3 - Alpha', + 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Topic :: Text Processing :: Linguistic', ] )
71d155704ba2614f27684c622863727084a4b9d1
setup.py
setup.py
import os import setuptools setuptools.setup( name='c3d', version='0.2.0', py_modules=['c3d'], author='Leif Johnson', author_email='leif@leifjohnson.net', description='A library for manipulating C3D binary files', long_description=open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.rst')).read(), license='MIT', url='http://github.com/EmbodiedCognition/py-c3d', keywords=('c3d motion-capture'), install_requires=['numpy'], scripts=['scripts/c3d-viewer', 'scripts/c3d2csv'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Topic :: Scientific/Engineering', ], )
import os import setuptools setuptools.setup( name='c3d', version='0.2.0', py_modules=['c3d'], author='Leif Johnson', author_email='leif@leifjohnson.net', description='A library for manipulating C3D binary files', long_description=open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.rst')).read(), license='MIT', url='http://github.com/EmbodiedCognition/py-c3d', keywords=('c3d motion-capture'), install_requires=['numpy'], scripts=['scripts/c3d-metadata', 'scripts/c3d-viewer', 'scripts/c3d2csv'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Topic :: Scientific/Engineering', ], )
Install c3d-metadata script as part of the package.
Install c3d-metadata script as part of the package.
Python
mit
EmbodiedCognition/py-c3d
--- +++ @@ -13,7 +13,7 @@ url='http://github.com/EmbodiedCognition/py-c3d', keywords=('c3d motion-capture'), install_requires=['numpy'], - scripts=['scripts/c3d-viewer', 'scripts/c3d2csv'], + scripts=['scripts/c3d-metadata', 'scripts/c3d-viewer', 'scripts/c3d2csv'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research',
301593cbbd25e8cfce3998450f4954ce0610f23e
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='python-ev3', version='0.1', description='Python library of Lego EV3', author='Gong Yi', author_email='topikachu@163.com', url='https://github.com/topikachu/python-ev3', packages=['ev3', 'ev3.rawdevice'], )
#!/usr/bin/env python from distutils.core import setup setup(name='python-ev3', version='0.1', description='Python library of Lego EV3', author='Gong Yi', author_email='topikachu@163.com', url='https://github.com/topikachu/python-ev3', packages=['ev3', 'ev3.rawdevice', 'ev3.motor', 'ev3.sensor'] )
Update list of packages to install.
Update list of packages to install.
Python
apache-2.0
MaxNoe/python-ev3,topikachu/python-ev3,evz/python-ev3,MaxNoe/python-ev3,topikachu/python-ev3,evz/python-ev3
--- +++ @@ -8,5 +8,5 @@ author='Gong Yi', author_email='topikachu@163.com', url='https://github.com/topikachu/python-ev3', - packages=['ev3', 'ev3.rawdevice'], - ) + packages=['ev3', 'ev3.rawdevice', 'ev3.motor', 'ev3.sensor'] + )
b2e346f2f78d172bfd7f7e8b37ba0bc48f2f02eb
setup.py
setup.py
# Copyright (c) 2011 gocept gmbh & co. kg # See also LICENSE.txt from setuptools import setup, find_packages setup( name='zeit.content.video', version='2.0.5dev', author='gocept', author_email='mail@gocept.com', url='https://svn.gocept.com/repos/gocept-int/zeit.content.video', description="""\ """, packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, zip_safe=False, license='gocept proprietary', namespace_packages=['zeit', 'zeit.content'], install_requires=[ 'gocept.form', 'gocept.selenium', 'grokcore.component', 'lxml', 'pytz', 'setuptools', 'zeit.cms>=1.51.1dev', 'zeit.connector', 'zeit.solr', 'zeit.workflow', 'zope.annotation', 'zope.app.zcmlfiles', 'zope.component', 'zope.dublincore', 'zope.formlib', 'zope.interface', 'zope.schema', 'zope.traversing', ], )
# Copyright (c) 2011 gocept gmbh & co. kg # See also LICENSE.txt from setuptools import setup, find_packages setup( name='zeit.content.video', version='2.0.5dev', author='gocept', author_email='mail@gocept.com', url='https://svn.gocept.com/repos/gocept-int/zeit.content.video', description="""\ """, packages=find_packages('src'), package_dir={'': 'src'}, include_package_data=True, zip_safe=False, license='gocept proprietary', namespace_packages=['zeit', 'zeit.content'], install_requires=[ 'gocept.form', 'gocept.selenium', 'grokcore.component', 'lxml', 'pytz', 'setuptools', 'zeit.cms>=1.51.1dev', 'zeit.connector', 'zeit.solr', 'zope.annotation', 'zope.app.zcmlfiles', 'zope.component', 'zope.dublincore', 'zope.formlib', 'zope.interface', 'zope.schema', 'zope.traversing', ], )
Fix dependencies: zeit.workflow is contained in the zeit.cms egg
Fix dependencies: zeit.workflow is contained in the zeit.cms egg
Python
bsd-3-clause
ZeitOnline/zeit.content.video
--- +++ @@ -28,7 +28,6 @@ 'zeit.cms>=1.51.1dev', 'zeit.connector', 'zeit.solr', - 'zeit.workflow', 'zope.annotation', 'zope.app.zcmlfiles', 'zope.component',
bbc1d797e8e05ec8b0f7934116bd9ca7a402ba2f
setup.py
setup.py
#from distutils.core import setup from setuptools import setup setup( name='auth_mac', version='0.1', description="Basic Django implementation of the draft RFC ietf-oauth-v2-http-mac-01", author='Nicholas Devenish', author_email='n.devenish@gmail.com', packages=['auth_mac', 'auth_mac.tests'], license=open('LICENSE.txt').read(), long_description=open('README.rst').read(), url='https://github.com/ndevenish/auth_mac', keywords = ['django', 'authorization', 'MAC'], classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "License :: OSI Approved :: MIT License", "Framework :: Django", "Operating System :: OS Independent", "Intended Audience :: Developers", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Development Status :: 2 - Pre-Alpha", "Topic :: Software Development :: Libraries :: Python Modules", ], install_requires=['django', 'south'], zip_safe=False, )
#from distutils.core import setup from setuptools import setup setup( name='django-auth_mac', version='0.1', description="Basic Django implementation of the draft RFC ietf-oauth-v2-http-mac-01", author='Nicholas Devenish', author_email='n.devenish@gmail.com', packages=['auth_mac', 'auth_mac.tests'], license=open('LICENSE.txt').read(), long_description=open('README.rst').read(), url='https://github.com/ndevenish/auth_mac', keywords = ['django', 'authorization', 'MAC'], classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "License :: OSI Approved :: MIT License", "Framework :: Django", "Operating System :: OS Independent", "Intended Audience :: Developers", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Development Status :: 2 - Pre-Alpha", "Topic :: Software Development :: Libraries :: Python Modules", ], install_requires=['django', 'south'], zip_safe=False, )
Change the "name" to django-auth_mac
Change the "name" to django-auth_mac
Python
mit
ndevenish/auth_mac
--- +++ @@ -2,7 +2,7 @@ from setuptools import setup setup( - name='auth_mac', + name='django-auth_mac', version='0.1', description="Basic Django implementation of the draft RFC ietf-oauth-v2-http-mac-01", author='Nicholas Devenish',
a380e3aeef3e956efc7002b60f50b0981bd8f033
setup.py
setup.py
from setuptools import setup, find_packages setup( name="web-stuartmccall-ca", version="1.0", author="Dylan McCall", author_email="dylan@dylanmccall.com", url="http://www.stuartmccall.ca", packages=find_packages(), include_package_data=True, scripts=['manage.py'], python_requires='>=3.4', setup_requires=[ 'wheel>=0.31.1' ], install_requires=[ 'django-compressor-autoprefixer>=0.1.0', 'django-compressor>=2.4', 'django-dbbackup>=3.3.0', 'django-extensions>=2.2.9', 'django-simplemde>=0.1.3', 'django-tinycontent>=0.8.0', 'django-sort-order-field>=1.0', 'Django>=2.2,<2.3', 'Markdown>=3.2.1', 'Pillow>=7.1.2', 'python-memcached>=1.59', 'pytz==2020.1', 'sorl-thumbnail>=12.6.3' ], tests_require=[ 'nose2>=0.8.0' ] )
from setuptools import setup, find_packages setup( name="web-stuartmccall-ca", version="1.0", author="Dylan McCall", author_email="dylan@dylanmccall.com", url="http://www.stuartmccall.ca", packages=find_packages(), include_package_data=True, scripts=['manage.py'], python_requires='>=3.4', setup_requires=[ 'wheel>=0.31.1' ], install_requires=[ 'django-compressor-autoprefixer>=0.1.0', 'django-compressor>=2.4', 'django-dbbackup>=3.3.0', 'django-extensions>=2.2.9', 'django-simplemde>=0.1.3', 'django-tinycontent>=0.8.0', 'django-sort-order-field>=1.2', 'Django>=2.2,<2.3', 'Markdown>=3.2.1', 'Pillow>=7.1.2', 'python-memcached>=1.59', 'pytz==2020.1', 'sorl-thumbnail>=12.6.3' ], tests_require=[ 'nose2>=0.8.0' ] )
Upgrade django-sort-order-field to version 1.2
Upgrade django-sort-order-field to version 1.2
Python
mit
DylanMcCall/stuartmccall.ca,DylanMcCall/stuartmccall.ca,DylanMcCall/stuartmccall.ca
--- +++ @@ -20,7 +20,7 @@ 'django-extensions>=2.2.9', 'django-simplemde>=0.1.3', 'django-tinycontent>=0.8.0', - 'django-sort-order-field>=1.0', + 'django-sort-order-field>=1.2', 'Django>=2.2,<2.3', 'Markdown>=3.2.1', 'Pillow>=7.1.2',
975c7d27d5972d92f491048add9786da50da7d71
setup.py
setup.py
from setuptools import setup, find_packages setup(name='lightweight-rest-tester', version='1.2.0', description='A lightweight REST API testing framework.', url='https://github.com/ridibooks/lightweight-rest-tester', author='Jeehoon Yoo', author_email='jeehoon.yoo@ridi.com', license='MIT', packages=find_packages(), zip_safe=False, install_requires=[ 'certifi==2017.4.17', 'chardet==3.0.4', 'idna==2.5', 'jsonschema==2.6.0', 'requests==2.18.1', 'urllib3==1.21.1', 'click==6.7', ], entry_points={ 'console_scripts': [ 'lw_rest_tester = rest_tester.command_line:main' ], })
from setuptools import setup, find_packages setup(name='lightweight-rest-tester', version='1.4.0', description='A lightweight REST API testing framework.', url='https://github.com/ridibooks/lightweight-rest-tester', author='Jeehoon Yoo', author_email='jeehoon.yoo@ridi.com', license='MIT', packages=find_packages(), zip_safe=False, install_requires=[ 'certifi==2017.4.17', 'chardet==3.0.4', 'idna==2.5', 'jsonschema==2.6.0', 'requests==2.18.1', 'urllib3==1.21.1', 'click==6.7', ], entry_points={ 'console_scripts': [ 'lw_rest_tester = rest_tester.command_line:main' ], })
Update the version to 1.4.0.
Update the version to 1.4.0.
Python
mit
ridibooks/lightweight-rest-tester,ridibooks/lightweight-rest-tester
--- +++ @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='lightweight-rest-tester', - version='1.2.0', + version='1.4.0', description='A lightweight REST API testing framework.', url='https://github.com/ridibooks/lightweight-rest-tester', author='Jeehoon Yoo',
c66b4aa59fef6049433a8373d075b0c48eab021f
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() INSTALL_REQUIREMENTS = ["Pillow"] # Allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name = 'django-initialcon', version = '0.1.5, packages = ['initialcon'], include_package_data = True, license = 'MIT License', description = 'A small django application for generating small colourful icons for users profile pictures', long_description = README, url = 'https://github.com/bettsmatt/django-initialcon', author = 'Matthew Betts', author_email = 'matt.je.betts@gmail.com', classifiers =[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content' ] )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() INSTALL_REQUIREMENTS = ["Pillow"] # Allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name = 'django-initialcon', version = '0.1.6', packages = ['initialcon'], include_package_data = True, license = 'MIT License', description = 'A small django application for generating small colourful icons for users profile pictures', long_description = README, url = 'https://github.com/bettsmatt/django-initialcon', author = 'Matthew Betts', author_email = 'matt.je.betts@gmail.com', classifiers =[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content' ] )
Bump version again as pip wont let me upload the same file twice
Bump version again as pip wont let me upload the same file twice
Python
mit
bettsmatt/django-initialcon
--- +++ @@ -9,7 +9,7 @@ setup( name = 'django-initialcon', - version = '0.1.5, + version = '0.1.6', packages = ['initialcon'], include_package_data = True, license = 'MIT License',
f6989fe0c0af44c5edf4d5a01579c82b3273aa24
setup.py
setup.py
from setuptools import setup, find_packages setup( name='infosystem', version='0.1.37', summary='Infosystem Framework', url='https://github.com/samueldmq/infosystem', author='Samuel de Medeiros Queiroz, Francois Oliveira', author_email='samueldmq@gmail.com, oliveira.francois@gmail.com', license='Apache-2', packages=find_packages(exclude=["tests"]) )
from setuptools import setup, find_packages setup( name='infosystem', version='0.1.38', summary='Infosystem Framework', url='https://github.com/samueldmq/infosystem', author='Samuel de Medeiros Queiroz, Francois Oliveira', author_email='samueldmq@gmail.com, oliveira.francois@gmail.com', license='Apache-2', packages=find_packages(exclude=["tests"]) )
Upgrade version and adjust session control doing on last commit
Upgrade version and adjust session control doing on last commit
Python
apache-2.0
samueldmq/infosystem
--- +++ @@ -3,7 +3,7 @@ setup( name='infosystem', - version='0.1.37', + version='0.1.38', summary='Infosystem Framework', url='https://github.com/samueldmq/infosystem', author='Samuel de Medeiros Queiroz, Francois Oliveira',
68fda5f8585bbb3beb74b495a5d817eefbee634d
setup.py
setup.py
from setuptools import setup, find_packages with open('README.rst') as f: desc = f.read() setup( name = "spdx", version = "2.3.0-beta.1_2", packages = ['spdx'], package_data = {'spdx': ['data/*.txt', 'data/db.json']}, author = "Brendan Molloy", author_email = "brendan+pypi@bbqsrc.net", description = "SPDX license list database", license = "CC0-1.0", keywords = ["spdx", "licenses", "database"], url = "https://github.com/bbqsrc/spdx-python", long_description=desc, classifiers=[ "Development Status :: 4 - Beta", "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", "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" ] )
from setuptools import setup, find_packages with open('README.rst') as f: desc = f.read() setup( name = "spdx", version = "2.3.0b1.post2", packages = ['spdx'], package_data = {'spdx': ['data/*.txt', 'data/db.json']}, author = "Brendan Molloy", author_email = "brendan+pypi@bbqsrc.net", description = "SPDX license list database", license = "CC0-1.0", keywords = ["spdx", "licenses", "database"], url = "https://github.com/bbqsrc/spdx-python", long_description=desc, classifiers=[ "Development Status :: 4 - Beta", "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", "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" ] )
Update version to revision 2 (also PEP 0440)
Update version to revision 2 (also PEP 0440)
Python
cc0-1.0
bbqsrc/spdx-python
--- +++ @@ -5,7 +5,7 @@ setup( name = "spdx", - version = "2.3.0-beta.1_2", + version = "2.3.0b1.post2", packages = ['spdx'], package_data = {'spdx': ['data/*.txt', 'data/db.json']}, author = "Brendan Molloy",
35cff34fd330ed21e6ff8d8fbe815a46e7892657
setup.py
setup.py
# -*- coding: utf-8 - import codecs import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name = 'bernhard', version = '0.1.1', description = 'Python client for Riemann', long_description = long_description, author = 'Benjamin Anderspn', author_email = 'b@banjiewen.net', license = 'ASF2.0', url = 'http://github.com/banjiewen/bernhard.git', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Other Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Operating System :: Unix', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Internet :: Log Analysis', 'Topic :: Utilities', 'Topic :: System :: Networking :: Monitoring' ], zip_safe = False, packages = ['bernhard'], include_package_data = True, install_requires=['protobuf >= 2.4'] )
# -*- coding: utf-8 - import codecs import io import os from setuptools import setup with io.open(os.path.join(os.path.dirname(__file__), 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name = 'bernhard', version = '0.2.0', description = 'Python client for Riemann', long_description = long_description, author = 'Benjamin Anderspn', author_email = 'b@banjiewen.net', license = 'ASF2.0', url = 'http://github.com/banjiewen/bernhard.git', classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Other Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Operating System :: Unix', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Internet :: Log Analysis', 'Topic :: Utilities', 'Topic :: System :: Networking :: Monitoring' ], zip_safe = False, packages = ['bernhard'], include_package_data = True, install_requires=['protobuf >= 2.4'] )
Use io.open for 2->3 compatibility
Use io.open for 2->3 compatibility
Python
apache-2.0
ClodoCorp/bernhard,banjiewen/bernhard,cranti/bernhard,bmhatfield/bernhard
--- +++ @@ -1,17 +1,18 @@ # -*- coding: utf-8 - import codecs +import io import os from setuptools import setup -with open(os.path.join(os.path.dirname(__file__), 'README.md'), +with io.open(os.path.join(os.path.dirname(__file__), 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name = 'bernhard', - version = '0.1.1', + version = '0.2.0', description = 'Python client for Riemann', long_description = long_description, author = 'Benjamin Anderspn',
a7114d934514e988f8043ce655c69572e33a6357
setup.py
setup.py
from setuptools import setup setup( name='tangled.auth', version='0.1a4.dev0', description='Tangled auth integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.auth/tags', author='Wyatt Baldwin', author_email='self@wyattbaldwin.com', packages=[ 'tangled', 'tangled.auth', 'tangled.auth.tests', ], install_requires=[ 'tangled.web>=0.1a5', ], extras_require={ 'dev': [ 'tangled.web[dev]>=0.1a5', ], }, entry_points=""" [tangled.scripts] auth = tangled.auth.command:Command """, classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], )
from setuptools import setup setup( name='tangled.auth', version='0.1a4.dev0', description='Tangled auth integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.auth/tags', author='Wyatt Baldwin', author_email='self@wyattbaldwin.com', packages=[ 'tangled', 'tangled.auth', 'tangled.auth.tests', ], install_requires=[ 'tangled.web>=0.1a5', ], extras_require={ 'dev': [ 'tangled.web[dev]>=0.1a5', ], }, entry_points=""" [tangled.scripts] auth = tangled.auth.command:Command """, 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', ], )
Add generic Python 3 trove classifier
Add generic Python 3 trove classifier
Python
mit
TangledWeb/tangled.auth
--- +++ @@ -32,6 +32,7 @@ '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', ],
0bc83982e4df8c2eb0ec88952656a40504143c83
setup.py
setup.py
# coding: utf-8 from __future__ import print_function, unicode_literals import sys import codecs from setuptools import setup, find_packages from nhentai import __version__, __author__, __email__ with open('requirements.txt') as f: requirements = [l for l in f.read().splitlines() if l] def long_description(): with codecs.open('README.md', 'rb') as f: if sys.version_info >= (3, 0, 0): return str(f.read()) setup( name='nhentai', version=__version__, packages=find_packages(), author=__author__, author_email=__email__, keywords='nhentai, doujinshi', description='nhentai.net doujinshis downloader', long_description=long_description(), url='https://github.com/RicterZ/nhentai', download_url='https://github.com/RicterZ/nhentai/tarball/master', include_package_data=True, zip_safe=False, install_requires=requirements, entry_points={ 'console_scripts': [ 'nhentai = nhentai.command:main', ] }, license='MIT', )
# coding: utf-8 from __future__ import print_function, unicode_literals import sys import codecs from setuptools import setup, find_packages from nhentai import __version__, __author__, __email__ with open('requirements.txt') as f: requirements = [l for l in f.read().splitlines() if l] def long_description(): with codecs.open('README.md', 'rb') as f: if sys.version_info >= (3, 0, 0): return str(f.read()) setup( name='nhentai', version=__version__, packages=find_packages(), package_data={ 'nhentai': ['viewer/**'] }, author=__author__, author_email=__email__, keywords='nhentai, doujinshi', description='nhentai.net doujinshis downloader', long_description=long_description(), url='https://github.com/RicterZ/nhentai', download_url='https://github.com/RicterZ/nhentai/tarball/master', include_package_data=True, zip_safe=False, install_requires=requirements, entry_points={ 'console_scripts': [ 'nhentai = nhentai.command:main', ] }, license='MIT', )
Add the viewer to the package_data entry
Add the viewer to the package_data entry
Python
mit
RicterZ/nhentai,RicterZ/nhentai,RicterZ/nhentai
--- +++ @@ -19,6 +19,9 @@ name='nhentai', version=__version__, packages=find_packages(), + package_data={ + 'nhentai': ['viewer/**'] + }, author=__author__, author_email=__email__,
70cb11eefe58fc02ed10d95ec4a556e7ca0895cf
setup.py
setup.py
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as f: readme = f.read() with open(os.path.join(here, 'requirements.txt')) as f: requires = f.read().split('\n') with open(os.path.join(here, 'requirements-dev.txt')) as f: requires_dev = f.read().split('\n') with open(os.path.join(here, 'VERSION')) as f: version = f.read().strip() setup(name='molo.commenting', version=version, description=('Comments helpers for sites built with Molo.'), long_description=readme, classifiers=[ "Programming Language :: Python", "Framework :: Django", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], author='Praekelt Foundation', author_email='dev@praekelt.com', url='http://github.com/praekelt/molo.commenting', license='BSD', keywords='praekelt, mobi, web, django', packages=find_packages(), include_package_data=True, zip_safe=False, namespace_packages=['molo'], install_requires=requires, tests_require=requires_dev, entry_points={})
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as f: readme = f.read() with open(os.path.join(here, 'requirements.txt')) as f: requires = [req for req in f.read().split('\n') if req] with open(os.path.join(here, 'requirements-dev.txt')) as f: requires_dev = [req for req in f.read().split('\n') if req] with open(os.path.join(here, 'VERSION')) as f: version = f.read().strip() setup(name='molo.commenting', version=version, description=('Comments helpers for sites built with Molo.'), long_description=readme, classifiers=[ "Programming Language :: Python", "Framework :: Django", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], author='Praekelt Foundation', author_email='dev@praekelt.com', url='http://github.com/praekelt/molo.commenting', license='BSD', keywords='praekelt, mobi, web, django', packages=find_packages(), include_package_data=True, zip_safe=False, namespace_packages=['molo'], install_requires=requires, tests_require=requires_dev, entry_points={})
Remove empty string from requirements list
Remove empty string from requirements list When we moved to Python 3 we used this simpler method to read the requirements file. However we need to remove the empty/Falsey elements from the list. This fixes the error: ``` Failed building wheel for molo.commenting ```
Python
bsd-2-clause
praekelt/molo.commenting,praekelt/molo.commenting
--- +++ @@ -7,10 +7,10 @@ readme = f.read() with open(os.path.join(here, 'requirements.txt')) as f: - requires = f.read().split('\n') + requires = [req for req in f.read().split('\n') if req] with open(os.path.join(here, 'requirements-dev.txt')) as f: - requires_dev = f.read().split('\n') + requires_dev = [req for req in f.read().split('\n') if req] with open(os.path.join(here, 'VERSION')) as f: version = f.read().strip()
64ba6fe757351b7d94704290c74487c3344f1f2e
setup.py
setup.py
from setuptools import setup def getVersion(): f = open("sphinxarg/__init__.py") _ = f.read() ver = _.split("'")[1] f.close() return ver setup( name='sphinx-argparse', version=getVersion(), packages=[ 'sphinxarg', ], url='https://github.com/ribozz/sphinx-argparse', license='MIT', author='Aleksandr Rudakov and Devon Ryan', author_email='ribozz@gmail.com', description='A sphinx extension that automatically documents argparse commands and options', long_description="""A sphinx extension that automatically documents argparse commands and options. For installation and usage details, see the `documentation <http://sphinx-argparse.readthedocs.org/en/latest/>`_.""", install_requires=[ 'sphinx>=1.2.0', 'CommonMark>=0.5.6' ], extras_require={ 'dev': ['pytest', 'sphinx_rtd_theme'] } )
from setuptools import setup def getVersion(): f = open("sphinxarg/__init__.py") _ = f.read() ver = _.split("'")[1] f.close() return ver setup( name='sphinx-argparse', version=getVersion(), packages=[ 'sphinxarg', ], url='https://github.com/ribozz/sphinx-argparse', license='MIT', author='Aleksandr Rudakov and Devon Ryan', author_email='ribozz@gmail.com', description='A sphinx extension that automatically documents argparse commands and options', long_description="""A sphinx extension that automatically documents argparse commands and options. For installation and usage details, see the `documentation <http://sphinx-argparse.readthedocs.org/en/latest/>`_.""", classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', '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', 'Programming Language :: Python :: 3.6', 'Topic :: Documentation :: Sphinx', 'Topic :: Software Development :: Documentation' ], install_requires=[ 'sphinx>=1.2.0', 'CommonMark>=0.5.6' ], extras_require={ 'dev': ['pytest', 'sphinx_rtd_theme'] } )
Add some classifiers for pypi
Add some classifiers for pypi
Python
mit
ribozz/sphinx-argparse
--- +++ @@ -23,6 +23,19 @@ long_description="""A sphinx extension that automatically documents argparse commands and options. For installation and usage details, see the `documentation <http://sphinx-argparse.readthedocs.org/en/latest/>`_.""", + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + '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', + 'Programming Language :: Python :: 3.6', + 'Topic :: Documentation :: Sphinx', + 'Topic :: Software Development :: Documentation' + ], install_requires=[ 'sphinx>=1.2.0', 'CommonMark>=0.5.6'
365bbbfe7993f90003c394742ea41bf4193fdb83
setup.py
setup.py
from setuptools import setup, find_packages long_description = """ The POEditor Client is a command line tool that enables you to easily manage your translation files within a project. """ import poeditor_client setup( name="poeditor_client", version=poeditor_client.__version__, url='https://github.com/lukin0110/poeditor-client', license='LICENSE.txt', description='The POEditor Client', scripts=[ 'scripts/poeditor', ], author='Maarten Huijsmans', author_email='maarten@lukin.be', packages=find_packages(), include_package_data=True, zip_safe=False, long_description=long_description, python_requires='>3.6.0', install_requires=[ "poeditor==1.1.0", ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: System Administrators', 'Operating System :: POSIX', 'Programming Language :: Python', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Shells', ], )
from setuptools import setup, find_packages long_description = """ The POEditor Client is a command line tool that enables you to easily manage your translation files within a project. """ import poeditor_client setup( name="poeditor_client", version=poeditor_client.__version__, url='https://github.com/lukin0110/poeditor-client', license='LICENSE.txt', description='The POEditor Client', scripts=[ 'scripts/poeditor', ], author='Maarten Huijsmans', author_email='maarten@lukin.be', packages=find_packages(), include_package_data=True, zip_safe=False, long_description=long_description, python_requires='>3.5.0', install_requires=[ "poeditor==1.1.0", ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: System Administrators', 'Operating System :: POSIX', 'Programming Language :: Python', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Shells', ], )
Change minimal python version to 3.5
Change minimal python version to 3.5
Python
apache-2.0
lukin0110/poeditor-client,lukin0110/poeditor-client
--- +++ @@ -22,7 +22,7 @@ include_package_data=True, zip_safe=False, long_description=long_description, - python_requires='>3.6.0', + python_requires='>3.5.0', install_requires=[ "poeditor==1.1.0", ],
cf4d16e4c65edee90a9509b8feb438cc14ad63df
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages REQUIREMENTS = [ ] DEP = [ ] TEST_REQUIREMENTS = [ ] pyxed = [] pack = find_packages(exclude=["test"]) setup( name="debinterface", version="2.2", description=" A simple Python library for dealing with the /etc/network/interfaces file in most Debian based distributions.", ext_modules=pyxed, packages=pack, install_requires=REQUIREMENTS, dependency_links=DEP, # tests test_suite="test", tests_require=TEST_REQUIREMENTS, )
#!/usr/bin/env python from setuptools import setup, find_packages REQUIREMENTS = [ ] DEP = [ ] TEST_REQUIREMENTS = [ ] pyxed = [] pack = find_packages(exclude=["test"]) setup( name="debinterface", version="2.2.0", description=" A simple Python library for dealing with the /etc/network/interfaces file in most Debian based distributions.", ext_modules=pyxed, packages=pack, install_requires=REQUIREMENTS, dependency_links=DEP, # tests test_suite="test", tests_require=TEST_REQUIREMENTS, )
Change version so it has the vrsion tuple
Change version so it has the vrsion tuple
Python
bsd-3-clause
nMustaki/debinterface,michaelboulton/debinterface,michaelboulton/debinterface,nMustaki/debinterface
--- +++ @@ -17,7 +17,7 @@ setup( name="debinterface", - version="2.2", + version="2.2.0", description=" A simple Python library for dealing with the /etc/network/interfaces file in most Debian based distributions.", ext_modules=pyxed, packages=pack,
3fc109a396ccbdf1f9b26a0cf89e2a92d3f87fb0
setup.py
setup.py
#!/usr/bin/env python """ setup.py file for afnumpy """ from distutils.core import setup from afnumpy import __version__ setup (name = 'afnumpy', version = __version__, author = "Filipe Maia", author_email = "filipe.c.maia@gmail.com", url = 'https://github.com/FilipeMaia/afnumpy', download_url = 'https://github.com/FilipeMaia/afnumpy/archive/'+__version__, keywords = ['arrayfire', 'numpy', 'GPU'], description = """A GPU-ready drop-in replacement for numpy""", packages = ["afnumpy", "afnumpy/core", "afnumpy/lib", "afnumpy/linalg"], install_requires=['arrayfire', 'numpy'], )
#!/usr/bin/env python """ setup.py file for afnumpy """ from distutils.core import setup from afnumpy import __version__ setup (name = 'afnumpy', version = __version__, author = "Filipe Maia", author_email = "filipe.c.maia@gmail.com", url = 'https://github.com/FilipeMaia/afnumpy', download_url = 'https://github.com/FilipeMaia/afnumpy/archive/'+__version__+'.tar.gz', keywords = ['arrayfire', 'numpy', 'GPU'], description = """A GPU-ready drop-in replacement for numpy""", packages = ["afnumpy", "afnumpy/core", "afnumpy/lib", "afnumpy/linalg"], install_requires=['arrayfire', 'numpy'], )
Correct again the pip URL
Correct again the pip URL
Python
bsd-2-clause
FilipeMaia/afnumpy,daurer/afnumpy
--- +++ @@ -13,7 +13,7 @@ author = "Filipe Maia", author_email = "filipe.c.maia@gmail.com", url = 'https://github.com/FilipeMaia/afnumpy', - download_url = 'https://github.com/FilipeMaia/afnumpy/archive/'+__version__, + download_url = 'https://github.com/FilipeMaia/afnumpy/archive/'+__version__+'.tar.gz', keywords = ['arrayfire', 'numpy', 'GPU'], description = """A GPU-ready drop-in replacement for numpy""", packages = ["afnumpy", "afnumpy/core", "afnumpy/lib", "afnumpy/linalg"],
29980772f93392c72987329c38dc0cab38251006
setup.py
setup.py
import setuptools import versioneer if __name__ == "__main__": setuptools.setup( name='basis_set_exchange', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='The Quantum Chemistry Basis Set Exchange', author='The Molecular Sciences Software Institute', author_email='bpp4@vt.edu', url="https://github.com/MolSSI/basis_set_exchange", license='BSD-3C', packages=setuptools.find_packages(), install_requires=[ 'jsonschema', ], extras_require={ 'docs': [ 'sphinx', 'sphinxcontrib-napoleon', 'sphinx_rtd_theme', 'numpydoc', ], 'tests': [ 'pytest', 'pytest-cov' ], }, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'Programming Language :: Python :: 3', ], zip_safe=True, )
import setuptools import versioneer if __name__ == "__main__": my_packages=setuptools.find_packages() setuptools.setup( name='basis_set_exchange', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='The Quantum Chemistry Basis Set Exchange', author='The Molecular Sciences Software Institute', author_email='bpp4@vt.edu', url="https://github.com/MolSSI/basis_set_exchange", license='BSD-3C', packages=my_packages, install_requires=[ 'jsonschema', ], extras_require={ 'docs': [ 'sphinx', 'sphinxcontrib-napoleon', 'sphinx_rtd_theme', 'numpydoc', ], 'tests': [ 'pytest', 'pytest-cov' ], }, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'Programming Language :: Python :: 3', ], package_data={'basis_set_exchange': ['data/*', 'data/*/*']}, zip_safe=True, )
Add data files to python packaging
Add data files to python packaging
Python
bsd-3-clause
MOLSSI-BSE/basis_set_exchange
--- +++ @@ -2,6 +2,8 @@ import versioneer if __name__ == "__main__": + my_packages=setuptools.find_packages() + setuptools.setup( name='basis_set_exchange', version=versioneer.get_version(), @@ -11,7 +13,7 @@ author_email='bpp4@vt.edu', url="https://github.com/MolSSI/basis_set_exchange", license='BSD-3C', - packages=setuptools.find_packages(), + packages=my_packages, install_requires=[ 'jsonschema', ], @@ -33,5 +35,8 @@ 'Intended Audience :: Science/Research', 'Programming Language :: Python :: 3', ], + + package_data={'basis_set_exchange': ['data/*', 'data/*/*']}, + zip_safe=True, )
e436650de6eafaa64b5d26728ba7806374960e4b
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( setup_requires=['pbr==1.0.1'], pbr=True, tests_require=['mock', 'nose', ], test_suite='nose.collector', platforms=['any'], zip_safe=False, )
#!/usr/bin/env python from setuptools import setup setup( setup_requires=['pbr==1.8.1'], pbr=True, tests_require=['mock', 'nose', ], test_suite='nose.collector', platforms=['any'], zip_safe=False, )
Update pbr from version 1.0.1 to 1.8.1.
Update pbr from version 1.0.1 to 1.8.1. Signed-off-by: David Black <c4b737561a711e07c31fd1e1811f33a5d770e31c@atlassian.com>
Python
mit
atlassian/asap-authentication-python
--- +++ @@ -3,7 +3,7 @@ setup( - setup_requires=['pbr==1.0.1'], + setup_requires=['pbr==1.8.1'], pbr=True, tests_require=['mock', 'nose', ], test_suite='nose.collector',
9c50c5e028dd4d8a7a51e142d35fcc45b1b60f58
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup(name='pyspotify_helper', version='0.0.1', author='Matt Wismer', author_email='mattwis86@gmail.com', description='Simplest integration of Spotify into Python', license='MIT', packages=['pyspotify_helper'], url='https://github.com/MattWis/pyspotify_helper.git', install_requires=['pyspotify'])
#!/usr/bin/env python from setuptools import setup setup(name='pyspotify_helper', version='0.0.1', author='Matt Wismer', author_email='mattwis86@gmail.com', description='Simplest integration of Spotify into Python', license='MIT', packages=['pyspotify_helper'], package_dir={'pyspotify_helper': 'pyspotify_helper'}, url='https://github.com/MattWis/pyspotify_helper.git', install_requires=['pyspotify'])
Use a queue to manage playing tracks
Use a queue to manage playing tracks
Python
mit
MattWis/pyspotify_helper
--- +++ @@ -8,5 +8,6 @@ description='Simplest integration of Spotify into Python', license='MIT', packages=['pyspotify_helper'], + package_dir={'pyspotify_helper': 'pyspotify_helper'}, url='https://github.com/MattWis/pyspotify_helper.git', install_requires=['pyspotify'])
1b4fe087ca88cfcd79e33c21c514eeb26835659c
setup.py
setup.py
#!/usr/bin/env python import os import sys import io try: import setuptools except ImportError: from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, Extension from setuptools import find_packages extra_compile_args = [] if os.name == 'nt' else ["-g", "-O2", "-march=native"] extra_link_args = [] if os.name == 'nt' else ["-g"] platform_src = ["src/windows.cpp"] if os.name == 'nt' else [] mod_cv_algorithms = Extension('cv_algorithms._cv_algorithms', sources=['src/thinning.cpp', 'src/distance.cpp', 'src/grassfire.cpp', 'src/popcount.cpp', 'src/neighbours.cpp'] + platform_src, extra_compile_args=extra_compile_args, extra_link_args=extra_link_args) setup( name='cv_algorithms', license='Apache license 2.0', packages=find_packages(exclude=['tests*']), install_requires=['cffi>=0.7'], ext_modules=[mod_cv_algorithms], test_suite='nose.collector', tests_require=['nose', 'coverage', 'mock', 'rednose', 'nose-parameterized'], setup_requires=['nose>=1.0'], platforms="any", zip_safe=False, version='1.0.0', description='Optimized OpenCV extra algorithms for Python', url="https://github.com/ulikoehler/cv_algorithms" )
#!/usr/bin/env python import os import sys import io try: import setuptools except ImportError: from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, Extension from setuptools import find_packages extra_compile_args = [] if os.name == 'nt' else ["-g", "-O2", "-march=native"] extra_link_args = [] if os.name == 'nt' else ["-g"] platform_src = ["src/windows.cpp"] if os.name == 'nt' else [] mod_cv_algorithms = Extension('cv_algorithms._cv_algorithms', include_dirs = ["src"], sources=['src/thinning.cpp', 'src/distance.cpp', 'src/grassfire.cpp', 'src/popcount.cpp', 'src/neighbours.cpp'] + platform_src, extra_compile_args=extra_compile_args, extra_link_args=extra_link_args) setup( name='cv_algorithms', license='Apache license 2.0', packages=find_packages(exclude=['tests*']), install_requires=['cffi>=0.7'], ext_modules=[mod_cv_algorithms], test_suite='nose.collector', tests_require=['nose', 'coverage', 'mock', 'rednose', 'nose-parameterized'], setup_requires=['nose>=1.0'], platforms="any", zip_safe=False, version='1.0.1', description='Optimized OpenCV extra algorithms for Python', url="https://github.com/ulikoehler/cv_algorithms" )
Fix windows compiler not finding common.hpp
Fix windows compiler not finding common.hpp
Python
apache-2.0
ulikoehler/cv_algorithms,ulikoehler/cv_algorithms
--- +++ @@ -15,6 +15,7 @@ platform_src = ["src/windows.cpp"] if os.name == 'nt' else [] mod_cv_algorithms = Extension('cv_algorithms._cv_algorithms', + include_dirs = ["src"], sources=['src/thinning.cpp', 'src/distance.cpp', 'src/grassfire.cpp', @@ -34,7 +35,7 @@ setup_requires=['nose>=1.0'], platforms="any", zip_safe=False, - version='1.0.0', + version='1.0.1', description='Optimized OpenCV extra algorithms for Python', url="https://github.com/ulikoehler/cv_algorithms" )
77806390ab03a06230ca0942e26e4086fb1a0e72
setup.py
setup.py
#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.12", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-likwid-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py"], package_data={ '': ['*.adoc', '*.rst', '*.md'] }, author="Zhang YANG", author_email="zyangmath@gmail.com", license="PSF", keywords="Benchmark;Performance Analysis", url="http://github.com/ProgramFan/bentoo" )
#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.13.dev", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-likwid-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py"], package_data={ '': ['*.adoc', '*.rst', '*.md'] }, author="Zhang YANG", author_email="zyangmath@gmail.com", license="PSF", keywords="Benchmark;Performance Analysis", url="http://github.com/ProgramFan/bentoo" )
Prepare for next dev cycle
Prepare for next dev cycle
Python
mit
ProgramFan/bentoo
--- +++ @@ -5,7 +5,7 @@ setup( name="bentoo", description="Benchmarking tools", - version="0.12", + version="0.13.dev", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py",
50b773cdde5b367ee6cb44426817664ee379ee9f
setup.py
setup.py
from setuptools import setup setup( name='jobcli', version='0.1.a2', py_modules=['jobcli'], install_requires=['click', 'requests',], entry_points={'console_scripts':['jobcli=jobcli:cli',]}, url='https://www.jobcli.com', author='Stephan Goergen', author_email='stephan.goergen@gmail.com', description='Job Search from the Command Line', license='MIT', zip_safe=False, include_package_data=False, keywords='board job search command line career developer engineer', classifiers=[ 'License :: OSI Approved :: MIT License' ,'Development Status :: 3 - Alpha' ,'Environment :: Console' ,'Operating System :: OS Independent' ,'Natural Language :: English' ,'Intended Audience :: Developers' ,'Intended Audience :: Information Technology' ,'Intended Audience :: System Administrators' ,'Intended Audience :: Science/Research' ,'Topic :: Office/Business' ,'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' ] )
from setuptools import setup setup( name='jobcli', version='0.1b1', py_modules=['jobcli'], install_requires=['click', 'requests',], entry_points={'console_scripts':['jobcli=jobcli:cli',]}, url='https://www.jobcli.com', author='Stephan Goergen', author_email='stephan.goergen@gmail.com', description='Job Search from the Command Line', license='MIT', zip_safe=False, include_package_data=False, keywords='board job search command line career developer engineer', classifiers=[ 'License :: OSI Approved :: MIT License' ,'Development Status :: 4 - Beta' ,'Environment :: Console' ,'Operating System :: OS Independent' ,'Natural Language :: English' ,'Intended Audience :: Developers' ,'Intended Audience :: Information Technology' ,'Intended Audience :: System Administrators' ,'Intended Audience :: Science/Research' ,'Topic :: Office/Business' ,'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' ] )
Increase version to beta 1.
Increase version to beta 1.
Python
mit
jobcli/jobcli-app,jobcli/jobcli-app
--- +++ @@ -2,7 +2,7 @@ setup( name='jobcli', - version='0.1.a2', + version='0.1b1', py_modules=['jobcli'], install_requires=['click', 'requests',], entry_points={'console_scripts':['jobcli=jobcli:cli',]}, @@ -16,7 +16,7 @@ keywords='board job search command line career developer engineer', classifiers=[ 'License :: OSI Approved :: MIT License' - ,'Development Status :: 3 - Alpha' + ,'Development Status :: 4 - Beta' ,'Environment :: Console' ,'Operating System :: OS Independent' ,'Natural Language :: English'
8b408db0e41dba83cb354787a9b1406f365b0b30
setup.py
setup.py
import os from setuptools import setup, find_packages f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='micawber', version='0.3.5', description='a small library for extracting rich content from urls', long_description=readme, author='Charles Leifer', author_email='coleifer@gmail.com', url='http://github.com/coleifer/micawber/', packages=find_packages(), package_data = { 'micawber': [ 'contrib/mcdjango/templates/micawber/*.html', ], 'examples': [ #'requirements.txt', '*/static/*.css', '*/templates/*.html', ], }, classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Framework :: Django', ], test_suite='runtests.runtests', )
import os from setuptools import setup, find_packages f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='micawber', version='0.3.5', description='a small library for extracting rich content from urls', long_description=readme, author='Charles Leifer', author_email='coleifer@gmail.com', url='http://github.com/coleifer/micawber/', packages=find_packages(), package_data = { 'micawber': [ 'contrib/mcdjango/templates/micawber/*.html', ], }, classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Framework :: Django', ], test_suite='runtests.runtests', )
Remove examples/ from package installation.
Remove examples/ from package installation.
Python
mit
coleifer/micawber,coleifer/micawber
--- +++ @@ -18,11 +18,6 @@ 'micawber': [ 'contrib/mcdjango/templates/micawber/*.html', ], - 'examples': [ - #'requirements.txt', - '*/static/*.css', - '*/templates/*.html', - ], }, classifiers=[ 'Development Status :: 4 - Beta',
719037cf20ae17e5fba71136cad1db7e8a47f703
spacy/lang/fi/examples.py
spacy/lang/fi/examples.py
# coding: utf8 from __future__ import unicode_literals """ Example sentences to test spaCy and its language models. >>> from spacy.lang.tr.examples import sentences >>> docs = nlp.pipe(sentences) """ sentences = [ "Apple harkitsee ostavansa startup-yrityksen UK:sta 1 miljardilla dollarilla." "Itseajavat autot siirtävät vakuutusriskin valmistajille." "San Francisco harkitsee jakelurobottien kieltämistä jalkakäytävillä." "Lontoo on iso kaupunki Iso-Britanniassa." ]
# coding: utf8 from __future__ import unicode_literals """ Example sentences to test spaCy and its language models. >>> from spacy.lang.fi.examples import sentences >>> docs = nlp.pipe(sentences) """ sentences = [ "Apple harkitsee ostavansa startup-yrityksen UK:sta 1 miljardilla dollarilla.", "Itseajavat autot siirtävät vakuutusriskin valmistajille.", "San Francisco harkitsee jakelurobottien kieltämistä jalkakäytävillä.", "Lontoo on iso kaupunki Iso-Britanniassa." ]
Update formatting and add missing commas
Update formatting and add missing commas
Python
mit
recognai/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/spaCy
--- +++ @@ -3,13 +3,13 @@ """ Example sentences to test spaCy and its language models. ->>> from spacy.lang.tr.examples import sentences +>>> from spacy.lang.fi.examples import sentences >>> docs = nlp.pipe(sentences) """ sentences = [ -"Apple harkitsee ostavansa startup-yrityksen UK:sta 1 miljardilla dollarilla." -"Itseajavat autot siirtävät vakuutusriskin valmistajille." -"San Francisco harkitsee jakelurobottien kieltämistä jalkakäytävillä." -"Lontoo on iso kaupunki Iso-Britanniassa." + "Apple harkitsee ostavansa startup-yrityksen UK:sta 1 miljardilla dollarilla.", + "Itseajavat autot siirtävät vakuutusriskin valmistajille.", + "San Francisco harkitsee jakelurobottien kieltämistä jalkakäytävillä.", + "Lontoo on iso kaupunki Iso-Britanniassa." ]
05fe4ae3a93662fc919a81d5f0b5680ff4ff40d9
setup.py
setup.py
from setuptools import setup, find_packages import versioneer def read_requirements(): import os path = os.path.dirname(os.path.abspath(__file__)) requirements_file = os.path.join(path, 'requirements.txt') try: with open(requirements_file, 'r') as req_fp: requires = req_fp.read().split() except IOError: return [] else: return [require.split() for require in requires] setup(name='PyMT', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='The CSDMS Python Modeling Toolkit', author='Eric Hutton', author_email='huttone@colorado.edu', url='http://csdms.colorado.edu', setup_requires=['setuptools', ], packages=find_packages(), entry_points={ 'console_scripts': [ 'cmt-config=cmt.cmd.cmt_config:main', ], }, )
from setuptools import setup, find_packages import versioneer def read_requirements(): import os path = os.path.dirname(os.path.abspath(__file__)) requirements_file = os.path.join(path, 'requirements.txt') try: with open(requirements_file, 'r') as req_fp: requires = req_fp.read().split() except IOError: return [] else: return [require.split() for require in requires] setup(name='PyMT', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='The CSDMS Python Modeling Toolkit', author='Eric Hutton', author_email='huttone@colorado.edu', url='http://csdms.colorado.edu', setup_requires=['setuptools', ], packages=find_packages(exclude=("tests*", "cmt")), entry_points={ 'console_scripts': [ 'cmt-config=cmt.cmd.cmt_config:main', ], }, )
Exclude tests and cmt folder from installed packages.
Exclude tests and cmt folder from installed packages.
Python
mit
csdms/coupling,csdms/coupling,csdms/pymt
--- +++ @@ -26,7 +26,7 @@ author_email='huttone@colorado.edu', url='http://csdms.colorado.edu', setup_requires=['setuptools', ], - packages=find_packages(), + packages=find_packages(exclude=("tests*", "cmt")), entry_points={ 'console_scripts': [ 'cmt-config=cmt.cmd.cmt_config:main',
8c6c0c425b27f4bfcba93d8d9af7cb0709a5c518
setup.py
setup.py
from setuptools import setup setup( name='redis-url-py', version='0.0.3', url='https://github.com/Xopherus/redis-url-py', license='BSD', author='Chris Raborg', author_email='craborg1@umbc.edu', description='Use Redis URLs in your Python applications', py_modules=['redis_url'], zip_safe=False, )
#!/usr/bin/env python import os from setuptools import setup LICENSE = open( os.path.join(os.path.dirname(__file__), 'LICENSE')).read().strip() DESCRIPTION = open( os.path.join(os.path.dirname(__file__), 'README.md')).read().strip() setup( name='redis-url-py', version='0.0.3', url='https://github.com/Xopherus/redis-url-py', license=LICENSE, author='Chris Raborg', author_email='craborg1@umbc.edu', description='Use Redis URLs in your Python applications', long_description=DESCRIPTION, py_modules=['redis_url'], zip_safe=False, )
Set license and long description
Set license and long description
Python
bsd-2-clause
Xopherus/redis-url-py
--- +++ @@ -1,13 +1,21 @@ +#!/usr/bin/env python +import os from setuptools import setup + +LICENSE = open( + os.path.join(os.path.dirname(__file__), 'LICENSE')).read().strip() +DESCRIPTION = open( + os.path.join(os.path.dirname(__file__), 'README.md')).read().strip() setup( name='redis-url-py', version='0.0.3', url='https://github.com/Xopherus/redis-url-py', - license='BSD', + license=LICENSE, author='Chris Raborg', author_email='craborg1@umbc.edu', description='Use Redis URLs in your Python applications', + long_description=DESCRIPTION, py_modules=['redis_url'], zip_safe=False, )
9913e1ed57717af248370149b6f69127bc4a48f0
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-flatblocks', version='0.9', description='django-flatblocks acts like django.contrib.flatpages but ' 'for parts of a page; like an editable help box you want ' 'show alongside the main content.', long_description=open('README.rst').read(), keywords='django apps', license='New BSD License', author='Horst Gutmann', author_email='zerok@zerokspot.com', url='http://github.com/funkybob/django-flatblocks/', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Plugins', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], packages=find_packages(exclude=['test_project']), package_data={ 'flatblocks': [ 'templates/flatblocks/*.html', 'locale/*/*/*.mo', 'locale/*/*/*.po', ] }, zip_safe=False, requires = [ 'Django (>=1.4)', ], )
from setuptools import setup, find_packages setup( name='django-flatblocks', version='0.9', description='django-flatblocks acts like django.contrib.flatpages but ' 'for parts of a page; like an editable help box you want ' 'show alongside the main content.', long_description=open('README.rst').read(), keywords='django apps', license='New BSD License', author='Horst Gutmann, Curtis Maloney', author_email='curtis@tinbrain.net', url='http://github.com/funkybob/django-flatblocks/', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Plugins', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], packages=find_packages(exclude=['test_project']), package_data={ 'flatblocks': [ 'templates/flatblocks/*.html', 'locale/*/*/*.mo', 'locale/*/*/*.po', ] }, zip_safe=False, requires = [ 'Django (>=1.4)', ], )
Update author and trove details
Update author and trove details
Python
bsd-3-clause
funkybob/django-flatblocks,funkybob/django-flatblocks
--- +++ @@ -10,8 +10,8 @@ long_description=open('README.rst').read(), keywords='django apps', license='New BSD License', - author='Horst Gutmann', - author_email='zerok@zerokspot.com', + author='Horst Gutmann, Curtis Maloney', + author_email='curtis@tinbrain.net', url='http://github.com/funkybob/django-flatblocks/', classifiers=[ 'Development Status :: 4 - Beta', @@ -27,6 +27,7 @@ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',