commit
stringlengths
40
40
old_file
stringlengths
4
118
new_file
stringlengths
4
118
old_contents
stringlengths
0
2.94k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
444
message
stringlengths
16
3.45k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
5
43.2k
prompt
stringlengths
17
4.58k
response
stringlengths
1
4.43k
prompt_tagged
stringlengths
58
4.62k
response_tagged
stringlengths
1
4.43k
text
stringlengths
132
7.29k
text_tagged
stringlengths
173
7.33k
0770c9fd014aff6fa2707014355b0200a8827f64
setup.py
setup.py
from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy', 'dendropy>=4'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], )
from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], )
Remove dendropy from required packages
Remove dendropy from required packages Let the users decide for themselves whether to install DendroPy and/or BioPython.
Python
mit
jmenglund/pandas-charm
from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy', 'dendropy>=4'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], ) Remove dendropy from required packages Let the users decide for themselves whether to install DendroPy and/or BioPython.
from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], )
<commit_before>from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy', 'dendropy>=4'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], ) <commit_msg>Remove dendropy from required packages Let the users decide for themselves whether to install DendroPy and/or BioPython.<commit_after>
from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], )
from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy', 'dendropy>=4'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], ) Remove dendropy from required packages Let the users decide for themselves whether to install DendroPy and/or BioPython.from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], )
<commit_before>from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy', 'dendropy>=4'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], ) <commit_msg>Remove dendropy from required packages Let the users decide for themselves whether to install DendroPy and/or BioPython.<commit_after>from setuptools import setup, find_packages from os.path import join, dirname setup( name='pandas-charm', version='0.1.0', description=( 'A small Python library for getting character matrices ' '(alignments) into and out of pandas'), long_description=open( join(dirname(__file__), 'README.rst'), encoding='utf-8').read(), packages=find_packages(exclude=['docs', 'tests*']), py_modules=['pandascharm'], install_requires=['pandas>=0.16', 'numpy'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov']}, author='Markus Englund', author_email='jan.markus.englund@gmail.com', url='https://github.com/jmenglund/pandas-charm', license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3'], keywords=['alignment', 'biopython', 'DendroPy', 'pandas'], )
122f596f3568d1ee1031733344e7eebb057cc032
setup.py
setup.py
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], test_suite="titlecase.tests", entry_points = """\ """ )
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], setup_requires=['nose>=1.0'], test_suite="titlecase.tests", entry_points = """\ """ )
Add python3 support for nosetests
Add python3 support for nosetests
Python
mit
ppannuto/python-titlecase
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], test_suite="titlecase.tests", entry_points = """\ """ ) Add python3 support for nosetests
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], setup_requires=['nose>=1.0'], test_suite="titlecase.tests", entry_points = """\ """ )
<commit_before>import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], test_suite="titlecase.tests", entry_points = """\ """ ) <commit_msg>Add python3 support for nosetests<commit_after>
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], setup_requires=['nose>=1.0'], test_suite="titlecase.tests", entry_points = """\ """ )
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], test_suite="titlecase.tests", entry_points = """\ """ ) Add python3 support for nosetestsimport os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], setup_requires=['nose>=1.0'], test_suite="titlecase.tests", entry_points = """\ """ )
<commit_before>import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], test_suite="titlecase.tests", entry_points = """\ """ ) <commit_msg>Add python3 support for nosetests<commit_after>import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() sys.path.insert(0, here) from titlecase import __version__ setup(name='titlecase', version=__version__, description="Python Port of John Gruber's titlecase.pl", long_description=README, classifiers=[ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing :: Filters", ], keywords='string formatting', author="Stuart Colville", author_email="pypi@muffinresearch.co.uk", url="http://muffinresearch.co.uk/", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require=['nose'], setup_requires=['nose>=1.0'], test_suite="titlecase.tests", entry_points = """\ """ )
6a0752d9a9d7b9687eeba3472a5df44d0fca1a0a
setup.py
setup.py
from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) #Handle other dirs default_conf_dir = '/etc/squadron' default_tmp_dir = '/var/squadron' if '--conf_dir' in sys.argv: #actually read it conf_dir = sys.argv[sys.argv.index('--conf_dir')+1] print conf_dir sys.argv.remove('--conf_dir') exit() if '--tmp_dir' in sys.argv: #actually read it sys.argv.remove('--tmp_dir') conf_dir = default_conf_dir tmp_dir = default_tmp_dir from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[(conf_dir,['files/config']), (tmp_dir,['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] )
from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[('/etc/squadron',['files/config']), ('/var/squadron',['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] )
Revert "starting extra install params" and "almost there"
Revert "starting extra install params" and "almost there" This reverts commits 38992e13a9aa4dcdb4b33427436bc2d1f9f96a66 and c1cb41fd4505bd3a2ce7315a2813cb7509fcadcc.
Python
mit
gosquadron/squadron,gosquadron/squadron
from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) #Handle other dirs default_conf_dir = '/etc/squadron' default_tmp_dir = '/var/squadron' if '--conf_dir' in sys.argv: #actually read it conf_dir = sys.argv[sys.argv.index('--conf_dir')+1] print conf_dir sys.argv.remove('--conf_dir') exit() if '--tmp_dir' in sys.argv: #actually read it sys.argv.remove('--tmp_dir') conf_dir = default_conf_dir tmp_dir = default_tmp_dir from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[(conf_dir,['files/config']), (tmp_dir,['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] ) Revert "starting extra install params" and "almost there" This reverts commits 38992e13a9aa4dcdb4b33427436bc2d1f9f96a66 and c1cb41fd4505bd3a2ce7315a2813cb7509fcadcc.
from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[('/etc/squadron',['files/config']), ('/var/squadron',['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] )
<commit_before>from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) #Handle other dirs default_conf_dir = '/etc/squadron' default_tmp_dir = '/var/squadron' if '--conf_dir' in sys.argv: #actually read it conf_dir = sys.argv[sys.argv.index('--conf_dir')+1] print conf_dir sys.argv.remove('--conf_dir') exit() if '--tmp_dir' in sys.argv: #actually read it sys.argv.remove('--tmp_dir') conf_dir = default_conf_dir tmp_dir = default_tmp_dir from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[(conf_dir,['files/config']), (tmp_dir,['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] ) <commit_msg>Revert "starting extra install params" and "almost there" This reverts commits 38992e13a9aa4dcdb4b33427436bc2d1f9f96a66 and c1cb41fd4505bd3a2ce7315a2813cb7509fcadcc.<commit_after>
from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[('/etc/squadron',['files/config']), ('/var/squadron',['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] )
from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) #Handle other dirs default_conf_dir = '/etc/squadron' default_tmp_dir = '/var/squadron' if '--conf_dir' in sys.argv: #actually read it conf_dir = sys.argv[sys.argv.index('--conf_dir')+1] print conf_dir sys.argv.remove('--conf_dir') exit() if '--tmp_dir' in sys.argv: #actually read it sys.argv.remove('--tmp_dir') conf_dir = default_conf_dir tmp_dir = default_tmp_dir from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[(conf_dir,['files/config']), (tmp_dir,['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] ) Revert "starting extra install params" and "almost there" This reverts commits 38992e13a9aa4dcdb4b33427436bc2d1f9f96a66 and c1cb41fd4505bd3a2ce7315a2813cb7509fcadcc.from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[('/etc/squadron',['files/config']), ('/var/squadron',['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] )
<commit_before>from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) #Handle other dirs default_conf_dir = '/etc/squadron' default_tmp_dir = '/var/squadron' if '--conf_dir' in sys.argv: #actually read it conf_dir = sys.argv[sys.argv.index('--conf_dir')+1] print conf_dir sys.argv.remove('--conf_dir') exit() if '--tmp_dir' in sys.argv: #actually read it sys.argv.remove('--tmp_dir') conf_dir = default_conf_dir tmp_dir = default_tmp_dir from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[(conf_dir,['files/config']), (tmp_dir,['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] ) <commit_msg>Revert "starting extra install params" and "almost there" This reverts commits 38992e13a9aa4dcdb4b33427436bc2d1f9f96a66 and c1cb41fd4505bd3a2ce7315a2813cb7509fcadcc.<commit_after>from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): #import here, cause outside the eggs aren't loaded import pytest errno = pytest.main(self.test_args) sys.exit(errno) from setuptools import setup, find_packages setup( name='squadron', version='0.0.1', packages=find_packages(), license='Proprietary', scripts=['scripts/squadron'], data_files=[('/etc/squadron',['files/config']), ('/var/squadron',['files/info.json'])], tests_require=['pytest>=2.5.1'], cmdclass = {'test': PyTest}, install_requires=[ 'jsonschema>=2.3.0', 'gitpython>=0.3.2.RC1', 'quik>=0.2.2', 'requests>=2.2.0', 'py>=1.4.19'] )
1dfba0718c7a5166adc188a75b15fdf592ac584b
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.16.0", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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.17.0_dev", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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
#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.16.0", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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
#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.17.0_dev", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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")
<commit_before>#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.16.0", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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") <commit_msg>Prepare for next dev cycle<commit_after>
#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.17.0_dev", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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.16.0", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.17.0_dev", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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")
<commit_before>#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.16.0", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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") <commit_msg>Prepare for next dev cycle<commit_after>#!/usr/bin/env python # coding: utf-8 from setuptools import setup, find_packages setup( name="bentoo", description="Benchmarking tools", version="0.17.0_dev", packages=find_packages(), scripts=["scripts/bentoo-generator.py", "scripts/bentoo-runner.py", "scripts/bentoo-collector.py", "scripts/bentoo-analyser.py", "scripts/bentoo-aggregator.py", "scripts/bentoo-metric.py", "scripts/bentoo-quickstart.py", "scripts/bentoo-calltree.py", "scripts/bentoo-merge.py", "scripts/bentoo-calltree-analyser.py", "scripts/bentoo-viewer.py", "scripts/bentoo-svgconvert.py", "scripts/bentoo-confreader.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")
25aba2beceda000d89aab969fec96fc1678e6f6a
websockets/test_uri.py
websockets/test_uri.py
import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'http://localhost/path#fragment' ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri)
import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'ws://localhost/path#fragment', 'ws://user:pass@localhost/', ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri)
Fix a test case and add another.
Fix a test case and add another.
Python
bsd-3-clause
aaugustin/websockets,aaugustin/websockets,dommert/pywebsockets,aaugustin/websockets,aaugustin/websockets,andrewyoung1991/websockets,biddyweb/websockets
import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'http://localhost/path#fragment' ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri) Fix a test case and add another.
import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'ws://localhost/path#fragment', 'ws://user:pass@localhost/', ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri)
<commit_before>import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'http://localhost/path#fragment' ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri) <commit_msg>Fix a test case and add another.<commit_after>
import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'ws://localhost/path#fragment', 'ws://user:pass@localhost/', ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri)
import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'http://localhost/path#fragment' ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri) Fix a test case and add another.import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'ws://localhost/path#fragment', 'ws://user:pass@localhost/', ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri)
<commit_before>import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'http://localhost/path#fragment' ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri) <commit_msg>Fix a test case and add another.<commit_after>import unittest from .exceptions import InvalidURI from .uri import * VALID_URIS = [ ('ws://localhost/', (False, 'localhost', 80, '/')), ('wss://localhost/', (True, 'localhost', 443, '/')), ('ws://localhost/path?query', (False, 'localhost', 80, '/path?query')), ('WS://LOCALHOST/PATH?QUERY', (False, 'localhost', 80, '/PATH?QUERY')), ] INVALID_URIS = [ 'http://localhost/', 'https://localhost/', 'ws://localhost/path#fragment', 'ws://user:pass@localhost/', ] class URITests(unittest.TestCase): def test_success(self): for uri, parsed in VALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 self.assertEqual(parse_uri(uri), parsed) def test_error(self): for uri in INVALID_URIS: # wrap in `with self.subTest():` when dropping Python 3.3 with self.assertRaises(InvalidURI): parse_uri(uri)
cc3f475345a6a0885eea7bc7ba41ebabd2821488
src/damis/models.py
src/damis/models.py
from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField() file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True)
from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) def get_dataset_upload_path(self, instance, filename): return '/%s/' % instance.author.username class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField(upload_to=get_dataset_upload_path) file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True)
Add dataset upload_to attribute. Fix DateTimeField name.
Add dataset upload_to attribute. Fix DateTimeField name.
Python
agpl-3.0
InScience/DAMIS-old,InScience/DAMIS-old
from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField() file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) Add dataset upload_to attribute. Fix DateTimeField name.
from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) def get_dataset_upload_path(self, instance, filename): return '/%s/' % instance.author.username class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField(upload_to=get_dataset_upload_path) file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True)
<commit_before>from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField() file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) <commit_msg>Add dataset upload_to attribute. Fix DateTimeField name.<commit_after>
from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) def get_dataset_upload_path(self, instance, filename): return '/%s/' % instance.author.username class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField(upload_to=get_dataset_upload_path) file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True)
from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField() file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) Add dataset upload_to attribute. Fix DateTimeField name.from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) def get_dataset_upload_path(self, instance, filename): return '/%s/' % instance.author.username class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField(upload_to=get_dataset_upload_path) file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True)
<commit_before>from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField() file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DatetimeField(auto_now=True) created = models.DatetimeField(auto_now_add=True) <commit_msg>Add dataset upload_to attribute. Fix DateTimeField name.<commit_after>from django.db import models from django.contrib.auth.models import User class DatasetLicence(models.Model): title = models.CharField(max_length=255) short_title = models.CharField(max_length=30) url = models.URLField() summary = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) class FileFormat(models.Model): extension = models.CharField(max_length=10) description = models.TextField() updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) def get_dataset_upload_path(self, instance, filename): return '/%s/' % instance.author.username class Dataset(models.Model): title = models.CharField(max_length=255) licence = models.ForeignKey('DatasetLicence') file = models.FileField(upload_to=get_dataset_upload_path) file_format = models.ForeignKey('FileFormat') description = models.TextField() author = models.ForeignKey(User) updated = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True)
364aa00d3f97711e25654f63e5d4ab5d6b4e7d44
tests/mod_auth_tests.py
tests/mod_auth_tests.py
from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() user = User(username=USERNAME, password=PASSWORD) db.session.add(user) db.session.commit() def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in())
from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() User.create(username=USERNAME, password=PASSWORD) def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in())
Use BaseModel.create to create a test user
Use BaseModel.create to create a test user
Python
mit
ziel980/website,ziel980/website
from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() user = User(username=USERNAME, password=PASSWORD) db.session.add(user) db.session.commit() def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in()) Use BaseModel.create to create a test user
from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() User.create(username=USERNAME, password=PASSWORD) def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in())
<commit_before>from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() user = User(username=USERNAME, password=PASSWORD) db.session.add(user) db.session.commit() def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in()) <commit_msg>Use BaseModel.create to create a test user<commit_after>
from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() User.create(username=USERNAME, password=PASSWORD) def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in())
from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() user = User(username=USERNAME, password=PASSWORD) db.session.add(user) db.session.commit() def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in()) Use BaseModel.create to create a test userfrom tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() User.create(username=USERNAME, password=PASSWORD) def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in())
<commit_before>from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() user = User(username=USERNAME, password=PASSWORD) db.session.add(user) db.session.commit() def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in()) <commit_msg>Use BaseModel.create to create a test user<commit_after>from tests.app_tests import BaseTestCase from app.mod_auth.models import * from app.mod_auth.views import user_is_logged_in from flask import url_for USERNAME = 'username' PASSWORD = 'password' INVALID_USERNAME = 'wrong_username' INVALID_PASSWORD = 'wrong_password' class TestAuth(BaseTestCase): def setUp(self): super().setUp() User.create(username=USERNAME, password=PASSWORD) def login(self, username, password): return self.client.post(url_for('auth.login'), data=dict( username=username, password=password ), follow_redirects=True) def logout(self): return self.client.get(url_for('auth.logout', follow_redirects=True)) def test_login(self): with self.client: self.login(INVALID_USERNAME, PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(INVALID_USERNAME, INVALID_PASSWORD) self.assertFalse(user_is_logged_in()) self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) def test_logout(self): with self.client: self.login(USERNAME, PASSWORD) self.assertTrue(user_is_logged_in()) self.logout() self.assertFalse(user_is_logged_in())
64d7ca9695eed6112c793fda3f2e7fea3751c3cc
tasks.py
tasks.py
from invoke import run from invoke import task @task def clean(docs=False, bytecode=True, extra=''): patterns = ['build'] if docs: patterns.append('docs/_build') if bytecode: patterns.append('**/*.pyc') if extra: patterns.append(extra) for pattern in patterns: run("rm -rf %s" % pattern) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8")
from invoke import run from invoke import task @task def clean(all=False): if all: flag = "--all" else: flag = "" run("python setup.py clean {}".format(flag)) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8")
Change clean task to use setup.py
Change clean task to use setup.py
Python
bsd-3-clause
pando85/django-registration,allo-/django-registration,sergafts/django-registration,pando85/django-registration,allo-/django-registration,sergafts/django-registration
from invoke import run from invoke import task @task def clean(docs=False, bytecode=True, extra=''): patterns = ['build'] if docs: patterns.append('docs/_build') if bytecode: patterns.append('**/*.pyc') if extra: patterns.append(extra) for pattern in patterns: run("rm -rf %s" % pattern) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8") Change clean task to use setup.py
from invoke import run from invoke import task @task def clean(all=False): if all: flag = "--all" else: flag = "" run("python setup.py clean {}".format(flag)) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8")
<commit_before>from invoke import run from invoke import task @task def clean(docs=False, bytecode=True, extra=''): patterns = ['build'] if docs: patterns.append('docs/_build') if bytecode: patterns.append('**/*.pyc') if extra: patterns.append(extra) for pattern in patterns: run("rm -rf %s" % pattern) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8") <commit_msg>Change clean task to use setup.py<commit_after>
from invoke import run from invoke import task @task def clean(all=False): if all: flag = "--all" else: flag = "" run("python setup.py clean {}".format(flag)) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8")
from invoke import run from invoke import task @task def clean(docs=False, bytecode=True, extra=''): patterns = ['build'] if docs: patterns.append('docs/_build') if bytecode: patterns.append('**/*.pyc') if extra: patterns.append(extra) for pattern in patterns: run("rm -rf %s" % pattern) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8") Change clean task to use setup.pyfrom invoke import run from invoke import task @task def clean(all=False): if all: flag = "--all" else: flag = "" run("python setup.py clean {}".format(flag)) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8")
<commit_before>from invoke import run from invoke import task @task def clean(docs=False, bytecode=True, extra=''): patterns = ['build'] if docs: patterns.append('docs/_build') if bytecode: patterns.append('**/*.pyc') if extra: patterns.append(extra) for pattern in patterns: run("rm -rf %s" % pattern) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8") <commit_msg>Change clean task to use setup.py<commit_after>from invoke import run from invoke import task @task def clean(all=False): if all: flag = "--all" else: flag = "" run("python setup.py clean {}".format(flag)) @task def build(docs=False): run("python setup.py build") if docs: run("sphinx-build docs docs/_build") @task def test(): run("python setup.py test") @task def lint(): run("flake8")
6bfd2d0cb6a92322391d7f5d5348594268e305b4
tilequeue/queue/file.py
tilequeue/queue/file.py
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self._lock = threading.RLock() def enqueue(self, coord): with self._lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self._lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self._lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self._lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close()
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self.lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self.lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self.lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close()
Revert "Rename lock to _lock to imply that it's private."
Revert "Rename lock to _lock to imply that it's private." tilequeue/queue/file.py -On second thought, the convention of prefixing private instance variables with an underscore isn't consistently adhered to elsewhere in the codebase, so don't bother using it, or we'll end up with a mix of classes that do and don't use it. This reverts commit 4417b3c701e44fbf94fb7375a7a3f148f1ee6112.
Python
mit
mapzen/tilequeue,tilezen/tilequeue
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self._lock = threading.RLock() def enqueue(self, coord): with self._lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self._lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self._lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self._lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close() Revert "Rename lock to _lock to imply that it's private." tilequeue/queue/file.py -On second thought, the convention of prefixing private instance variables with an underscore isn't consistently adhered to elsewhere in the codebase, so don't bother using it, or we'll end up with a mix of classes that do and don't use it. This reverts commit 4417b3c701e44fbf94fb7375a7a3f148f1ee6112.
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self.lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self.lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self.lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close()
<commit_before>from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self._lock = threading.RLock() def enqueue(self, coord): with self._lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self._lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self._lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self._lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close() <commit_msg>Revert "Rename lock to _lock to imply that it's private." tilequeue/queue/file.py -On second thought, the convention of prefixing private instance variables with an underscore isn't consistently adhered to elsewhere in the codebase, so don't bother using it, or we'll end up with a mix of classes that do and don't use it. This reverts commit 4417b3c701e44fbf94fb7375a7a3f148f1ee6112.<commit_after>
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self.lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self.lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self.lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close()
from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self._lock = threading.RLock() def enqueue(self, coord): with self._lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self._lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self._lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self._lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close() Revert "Rename lock to _lock to imply that it's private." tilequeue/queue/file.py -On second thought, the convention of prefixing private instance variables with an underscore isn't consistently adhered to elsewhere in the codebase, so don't bother using it, or we'll end up with a mix of classes that do and don't use it. This reverts commit 4417b3c701e44fbf94fb7375a7a3f148f1ee6112.from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self.lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self.lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self.lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close()
<commit_before>from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self._lock = threading.RLock() def enqueue(self, coord): with self._lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self._lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self._lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self._lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close() <commit_msg>Revert "Rename lock to _lock to imply that it's private." tilequeue/queue/file.py -On second thought, the convention of prefixing private instance variables with an underscore isn't consistently adhered to elsewhere in the codebase, so don't bother using it, or we'll end up with a mix of classes that do and don't use it. This reverts commit 4417b3c701e44fbf94fb7375a7a3f148f1ee6112.<commit_after>from tilequeue.tile import serialize_coord, deserialize_coord, CoordMessage import threading class OutputFileQueue(object): def __init__(self, fp): self.fp = fp self.lock = threading.RLock() def enqueue(self, coord): with self.lock: payload = serialize_coord(coord) self.fp.write(payload + '\n') def enqueue_batch(self, coords): n = 0 for coord in coords: self.enqueue(coord) n += 1 return n, 0 def read(self, max_to_read=1, timeout_seconds=20): with self.lock: coords = [] for _ in range(max_to_read): try: coord = next(self.fp) except StopIteration: break coords.append(CoordMessage(deserialize_coord(coord), None)) return coords def job_done(self, coord_message): pass def clear(self): with self.lock: self.fp.seek(0) self.fp.truncate() return -1 def close(self): with self.lock: remaining_queue = "".join([ln for ln in self.fp]) self.clear() self.fp.write(remaining_queue) self.fp.close()
b4fa43b85a162fa9bef3cb67c2dd523f25707b4d
mo/cli.py
mo/cli.py
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='+') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) for task in args.tasks: runner.run_task(task)
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='*') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) if args.tasks is None: for task in args.tasks: runner.run_task(task) else: print() for task in runner.tasks.values(): print('', task.name, '-', task.description)
Add a way of listing commands
Add a way of listing commands
Python
mit
thomasleese/mo
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='+') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) for task in args.tasks: runner.run_task(task) Add a way of listing commands
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='*') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) if args.tasks is None: for task in args.tasks: runner.run_task(task) else: print() for task in runner.tasks.values(): print('', task.name, '-', task.description)
<commit_before>from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='+') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) for task in args.tasks: runner.run_task(task) <commit_msg>Add a way of listing commands<commit_after>
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='*') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) if args.tasks is None: for task in args.tasks: runner.run_task(task) else: print() for task in runner.tasks.values(): print('', task.name, '-', task.description)
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='+') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) for task in args.tasks: runner.run_task(task) Add a way of listing commandsfrom argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='*') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) if args.tasks is None: for task in args.tasks: runner.run_task(task) else: print() for task in runner.tasks.values(): print('', task.name, '-', task.description)
<commit_before>from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='+') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) for task in args.tasks: runner.run_task(task) <commit_msg>Add a way of listing commands<commit_after>from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] = value return variables def main(): parser = ArgumentParser() parser.add_argument('-f', '--file', default='mo.yaml') parser.add_argument('-v', '--var', dest='variables', nargs='*') parser.add_argument('tasks', metavar='task', nargs='*') args = parser.parse_args() with open(args.file) as file: configuration = yaml.load(file.read()) variables = parse_variables(args.variables) runner = Runner(configuration, variables) if args.tasks is None: for task in args.tasks: runner.run_task(task) else: print() for task in runner.tasks.values(): print('', task.name, '-', task.description)
a6a59cc0fded7bd2f6dc1d0d01e68836f33726aa
mdotdevs/tests.py
mdotdevs/tests.py
from django.test import TestCase # Create your tests here.
from django.test import TestCase from django.test import Client from django.core.urlresolvers import resolve class MdotdevTest(TestCase): def setUp(self): self.client = Client() pass def test_url_home(self): resolver = resolve('/developers/') self.assertEqual('home', resolver.view_name) def test_url_guidelines(self): resolver = resolve('/developers/guidelines/') self.assertEqual('guidelines', resolver.view_name) def test_url_process(self): resolver = resolve('/developers/process/') self.assertEqual('process', resolver.view_name) def test_url_review(self): resolver = resolve('/developers/review/') self.assertEqual('review', resolver.view_name) def test_view_home(self): response = self.client.get('/developers/') self.assertEqual(response.status_code, 200) def test_view_guidelines(self): response = self.client.get('/developers/guidelines/') self.assertEqual(response.status_code, 200) def test_view_process(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def test_view_review(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def tearDown(self): pass
Test the urls.py and views.py.
Test the urls.py and views.py.
Python
apache-2.0
uw-it-aca/mdot-developers,uw-it-aca/mdot-developers
from django.test import TestCase # Create your tests here. Test the urls.py and views.py.
from django.test import TestCase from django.test import Client from django.core.urlresolvers import resolve class MdotdevTest(TestCase): def setUp(self): self.client = Client() pass def test_url_home(self): resolver = resolve('/developers/') self.assertEqual('home', resolver.view_name) def test_url_guidelines(self): resolver = resolve('/developers/guidelines/') self.assertEqual('guidelines', resolver.view_name) def test_url_process(self): resolver = resolve('/developers/process/') self.assertEqual('process', resolver.view_name) def test_url_review(self): resolver = resolve('/developers/review/') self.assertEqual('review', resolver.view_name) def test_view_home(self): response = self.client.get('/developers/') self.assertEqual(response.status_code, 200) def test_view_guidelines(self): response = self.client.get('/developers/guidelines/') self.assertEqual(response.status_code, 200) def test_view_process(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def test_view_review(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def tearDown(self): pass
<commit_before>from django.test import TestCase # Create your tests here. <commit_msg>Test the urls.py and views.py.<commit_after>
from django.test import TestCase from django.test import Client from django.core.urlresolvers import resolve class MdotdevTest(TestCase): def setUp(self): self.client = Client() pass def test_url_home(self): resolver = resolve('/developers/') self.assertEqual('home', resolver.view_name) def test_url_guidelines(self): resolver = resolve('/developers/guidelines/') self.assertEqual('guidelines', resolver.view_name) def test_url_process(self): resolver = resolve('/developers/process/') self.assertEqual('process', resolver.view_name) def test_url_review(self): resolver = resolve('/developers/review/') self.assertEqual('review', resolver.view_name) def test_view_home(self): response = self.client.get('/developers/') self.assertEqual(response.status_code, 200) def test_view_guidelines(self): response = self.client.get('/developers/guidelines/') self.assertEqual(response.status_code, 200) def test_view_process(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def test_view_review(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def tearDown(self): pass
from django.test import TestCase # Create your tests here. Test the urls.py and views.py.from django.test import TestCase from django.test import Client from django.core.urlresolvers import resolve class MdotdevTest(TestCase): def setUp(self): self.client = Client() pass def test_url_home(self): resolver = resolve('/developers/') self.assertEqual('home', resolver.view_name) def test_url_guidelines(self): resolver = resolve('/developers/guidelines/') self.assertEqual('guidelines', resolver.view_name) def test_url_process(self): resolver = resolve('/developers/process/') self.assertEqual('process', resolver.view_name) def test_url_review(self): resolver = resolve('/developers/review/') self.assertEqual('review', resolver.view_name) def test_view_home(self): response = self.client.get('/developers/') self.assertEqual(response.status_code, 200) def test_view_guidelines(self): response = self.client.get('/developers/guidelines/') self.assertEqual(response.status_code, 200) def test_view_process(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def test_view_review(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def tearDown(self): pass
<commit_before>from django.test import TestCase # Create your tests here. <commit_msg>Test the urls.py and views.py.<commit_after>from django.test import TestCase from django.test import Client from django.core.urlresolvers import resolve class MdotdevTest(TestCase): def setUp(self): self.client = Client() pass def test_url_home(self): resolver = resolve('/developers/') self.assertEqual('home', resolver.view_name) def test_url_guidelines(self): resolver = resolve('/developers/guidelines/') self.assertEqual('guidelines', resolver.view_name) def test_url_process(self): resolver = resolve('/developers/process/') self.assertEqual('process', resolver.view_name) def test_url_review(self): resolver = resolve('/developers/review/') self.assertEqual('review', resolver.view_name) def test_view_home(self): response = self.client.get('/developers/') self.assertEqual(response.status_code, 200) def test_view_guidelines(self): response = self.client.get('/developers/guidelines/') self.assertEqual(response.status_code, 200) def test_view_process(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def test_view_review(self): response = self.client.get('/developers/process/') self.assertEqual(response.status_code, 200) def tearDown(self): pass
3e5e35aa85e656efbdddddf4c4d2accad964a42b
members/elections/serializers.py
members/elections/serializers.py
from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'external_url', 'seat_type', 'organization', 'reason')
from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') expertise = serializers.SerializerMethodField() class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'expertise_other', 'expertise_expanded', 'external_url', 'seat_type', 'organization', 'reason') def get_expertise(self, obj): return ', '.join(obj.get_expertise_items())
Update elections with new apis
Update elections with new apis
Python
mit
ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members,ocwc/ocwc-members
from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'external_url', 'seat_type', 'organization', 'reason') Update elections with new apis
from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') expertise = serializers.SerializerMethodField() class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'expertise_other', 'expertise_expanded', 'external_url', 'seat_type', 'organization', 'reason') def get_expertise(self, obj): return ', '.join(obj.get_expertise_items())
<commit_before>from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'external_url', 'seat_type', 'organization', 'reason') <commit_msg>Update elections with new apis<commit_after>
from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') expertise = serializers.SerializerMethodField() class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'expertise_other', 'expertise_expanded', 'external_url', 'seat_type', 'organization', 'reason') def get_expertise(self, obj): return ', '.join(obj.get_expertise_items())
from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'external_url', 'seat_type', 'organization', 'reason') Update elections with new apisfrom rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') expertise = serializers.SerializerMethodField() class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'expertise_other', 'expertise_expanded', 'external_url', 'seat_type', 'organization', 'reason') def get_expertise(self, obj): return ', '.join(obj.get_expertise_items())
<commit_before>from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'external_url', 'seat_type', 'organization', 'reason') <commit_msg>Update elections with new apis<commit_after>from rest_framework import serializers from .models import Election, Candidate class CandidatePublicSerializer(serializers.ModelSerializer): organization = serializers.CharField(source='organization.display_name') expertise = serializers.SerializerMethodField() class Meta: model = Candidate fields = ('candidate_first_name', 'candidate_last_name', 'candidate_job_title', 'biography', 'vision', 'ideas', 'expertise', 'expertise_other', 'expertise_expanded', 'external_url', 'seat_type', 'organization', 'reason') def get_expertise(self, obj): return ', '.join(obj.get_expertise_items())
743f8dd38869987570eba3ea4cf22c6ad5a50cd1
complaints/forms.py
complaints/forms.py
from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})]
from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Group fields into fieldsets. class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) def clean(self): """ Hook for doing any extra form-wide cleaning after Field.clean() been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named '__all__'. """ #todo: define how to clean forms. return self.cleaned_data
Add in stubs for further preview development
Add in stubs for further preview development
Python
mit
CSC301H-Fall2013/healthyhome,CSC301H-Fall2013/healthyhome
from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] Add in stubs for further preview development
from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Group fields into fieldsets. class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) def clean(self): """ Hook for doing any extra form-wide cleaning after Field.clean() been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named '__all__'. """ #todo: define how to clean forms. return self.cleaned_data
<commit_before>from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] <commit_msg>Add in stubs for further preview development<commit_after>
from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Group fields into fieldsets. class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) def clean(self): """ Hook for doing any extra form-wide cleaning after Field.clean() been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named '__all__'. """ #todo: define how to clean forms. return self.cleaned_data
from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] Add in stubs for further preview developmentfrom django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Group fields into fieldsets. class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) def clean(self): """ Hook for doing any extra form-wide cleaning after Field.clean() been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named '__all__'. """ #todo: define how to clean forms. return self.cleaned_data
<commit_before>from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] <commit_msg>Add in stubs for further preview development<commit_after>from django import forms from form_utils.forms import BetterForm # This specifies the fields that are in the complaint form class ComplaintForm(BetterForm): # Group fields into fieldsets. class Meta: fieldsets = [('address', {'fields': ['civic', 'city', 'province']}), ('complaints', {'fields': ['bed_bugs', 'cockroaches', 'mice', 'heating', 'plumbing', 'elevator', 'repair_order', 'mold', 'other']})] # Address for the complaints. civic = forms.CharField(label='Address', max_length=250, required=True) city = forms.CharField(label='City', max_length=250, required=True) province = forms.CharField(label='Province', max_length=250, required=True) # Types of complaints. bed_bugs = forms.BooleanField(required=False) cockroaches = forms.BooleanField(required=False) mice = forms.BooleanField(required=False) heating = forms.BooleanField(required=False) plumbing = forms.BooleanField(required=False) elevator = forms.BooleanField(required=False) repair_order = forms.BooleanField(required=False) mold = forms.BooleanField(required=False) other = forms.BooleanField(required=False) def clean(self): """ Hook for doing any extra form-wide cleaning after Field.clean() been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named '__all__'. """ #todo: define how to clean forms. return self.cleaned_data
e3ed0f5e2aba0bcd2328c95f401cc17e2d63ba8f
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 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
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): mongod = host.service('mongod') assert mongod.is_running assert mongod.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
Rename service name in default test
Rename service name in default test
Python
bsd-2-clause
jugatsu-infra/ansible-role-mongodb
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 Rename service name in default test
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): mongod = host.service('mongod') assert mongod.is_running assert mongod.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
<commit_before>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 <commit_msg>Rename service name in default test<commit_after>
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): mongod = host.service('mongod') assert mongod.is_running assert mongod.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 Rename service name in default testimport 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): mongod = host.service('mongod') assert mongod.is_running assert mongod.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
<commit_before>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 <commit_msg>Rename service name in default test<commit_after>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): mongod = host.service('mongod') assert mongod.is_running assert mongod.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
7936ef73a786ac7b4d3a718d72e6d0e087b35e05
myFirstProgram.py
myFirstProgram.py
#! /usr/bin/env python num = 3 print num
#! /usr/bin/env python num = 3 print num # This is great! # Now, assign the value 88 to the variable "blanket". # blanket = ?? # print blanket
Add comments about blanket variable.
Add comments about blanket variable.
Python
mit
sk8boarder/my-first-program
#! /usr/bin/env python num = 3 print num Add comments about blanket variable.
#! /usr/bin/env python num = 3 print num # This is great! # Now, assign the value 88 to the variable "blanket". # blanket = ?? # print blanket
<commit_before>#! /usr/bin/env python num = 3 print num <commit_msg>Add comments about blanket variable.<commit_after>
#! /usr/bin/env python num = 3 print num # This is great! # Now, assign the value 88 to the variable "blanket". # blanket = ?? # print blanket
#! /usr/bin/env python num = 3 print num Add comments about blanket variable.#! /usr/bin/env python num = 3 print num # This is great! # Now, assign the value 88 to the variable "blanket". # blanket = ?? # print blanket
<commit_before>#! /usr/bin/env python num = 3 print num <commit_msg>Add comments about blanket variable.<commit_after>#! /usr/bin/env python num = 3 print num # This is great! # Now, assign the value 88 to the variable "blanket". # blanket = ?? # print blanket
0818f5e1471c6da24dbc55954ef4ad27ac289ada
tests/test_grammars.py
tests/test_grammars.py
from .generic import GrammarTest def test_np(): grammar = GrammarTest('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_subject(): grammar = GrammarTest('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_object(): grammar = GrammarTest('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative') grammar.check_positive() grammar.check_negative()
from .generic import GrammarTest def add_grammar(grammar, positive_sample, negative_sample): grammar = GrammarTest(grammar, positive_sample, negative_sample) grammar.check_positive() grammar.check_negative() def test_np(): add_grammar('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') def test_subject(): add_grammar('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') def test_object(): add_grammar('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative')
Refactor grammar tests to be easily extensible
Refactor grammar tests to be easily extensible
Python
mit
caninemwenja/marker,kmwenja/marker
from .generic import GrammarTest def test_np(): grammar = GrammarTest('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_subject(): grammar = GrammarTest('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_object(): grammar = GrammarTest('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative') grammar.check_positive() grammar.check_negative() Refactor grammar tests to be easily extensible
from .generic import GrammarTest def add_grammar(grammar, positive_sample, negative_sample): grammar = GrammarTest(grammar, positive_sample, negative_sample) grammar.check_positive() grammar.check_negative() def test_np(): add_grammar('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') def test_subject(): add_grammar('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') def test_object(): add_grammar('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative')
<commit_before>from .generic import GrammarTest def test_np(): grammar = GrammarTest('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_subject(): grammar = GrammarTest('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_object(): grammar = GrammarTest('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative') grammar.check_positive() grammar.check_negative() <commit_msg>Refactor grammar tests to be easily extensible<commit_after>
from .generic import GrammarTest def add_grammar(grammar, positive_sample, negative_sample): grammar = GrammarTest(grammar, positive_sample, negative_sample) grammar.check_positive() grammar.check_negative() def test_np(): add_grammar('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') def test_subject(): add_grammar('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') def test_object(): add_grammar('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative')
from .generic import GrammarTest def test_np(): grammar = GrammarTest('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_subject(): grammar = GrammarTest('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_object(): grammar = GrammarTest('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative') grammar.check_positive() grammar.check_negative() Refactor grammar tests to be easily extensiblefrom .generic import GrammarTest def add_grammar(grammar, positive_sample, negative_sample): grammar = GrammarTest(grammar, positive_sample, negative_sample) grammar.check_positive() grammar.check_negative() def test_np(): add_grammar('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') def test_subject(): add_grammar('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') def test_object(): add_grammar('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative')
<commit_before>from .generic import GrammarTest def test_np(): grammar = GrammarTest('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_subject(): grammar = GrammarTest('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') grammar.check_positive() grammar.check_negative() def test_object(): grammar = GrammarTest('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative') grammar.check_positive() grammar.check_negative() <commit_msg>Refactor grammar tests to be easily extensible<commit_after>from .generic import GrammarTest def add_grammar(grammar, positive_sample, negative_sample): grammar = GrammarTest(grammar, positive_sample, negative_sample) grammar.check_positive() grammar.check_negative() def test_np(): add_grammar('grammars/test_np.fcfg', 'grammars/nounphrase.sample', 'grammars/nounphrase.sample.negative') def test_subject(): add_grammar('grammars/test_subject.fcfg', 'grammars/subjectphrase.sample', 'grammars/subjectphrase.sample.negative') def test_object(): add_grammar('grammars/test_object.fcfg', 'grammars/object.sample', 'grammars/object.sample.negative')
7f5f4f95eabd1f70c82d336816ae2d17fb273af2
stronghold/middleware.py
stronghold/middleware.py
from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it is_public = utils.is_view_func_public(view_func) if is_public: return None # if this view matches a whitelisted regex, don't process it for view_url in self.public_view_urls: if view_url.match(request.path_info): return None return login_required(view_func)(request, *view_args, **view_kwargs)
from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it if utils.is_view_func_public(view_func): return None # if this view matches a whitelisted regex, don't process it if any(view_url.match(request.path_info) for view_url in self.public_view_urls): return None return login_required(view_func)(request, *view_args, **view_kwargs)
Refactor public_view_url check to be more pythonic
Refactor public_view_url check to be more pythonic In addition to this I also removed the is_public variable because the new utils function says the same thing so it is redundant.
Python
mit
SunilMohanAdapa/django-stronghold,mgrouchy/django-stronghold,SunilMohanAdapa/django-stronghold
from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it is_public = utils.is_view_func_public(view_func) if is_public: return None # if this view matches a whitelisted regex, don't process it for view_url in self.public_view_urls: if view_url.match(request.path_info): return None return login_required(view_func)(request, *view_args, **view_kwargs) Refactor public_view_url check to be more pythonic In addition to this I also removed the is_public variable because the new utils function says the same thing so it is redundant.
from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it if utils.is_view_func_public(view_func): return None # if this view matches a whitelisted regex, don't process it if any(view_url.match(request.path_info) for view_url in self.public_view_urls): return None return login_required(view_func)(request, *view_args, **view_kwargs)
<commit_before>from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it is_public = utils.is_view_func_public(view_func) if is_public: return None # if this view matches a whitelisted regex, don't process it for view_url in self.public_view_urls: if view_url.match(request.path_info): return None return login_required(view_func)(request, *view_args, **view_kwargs) <commit_msg>Refactor public_view_url check to be more pythonic In addition to this I also removed the is_public variable because the new utils function says the same thing so it is redundant.<commit_after>
from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it if utils.is_view_func_public(view_func): return None # if this view matches a whitelisted regex, don't process it if any(view_url.match(request.path_info) for view_url in self.public_view_urls): return None return login_required(view_func)(request, *view_args, **view_kwargs)
from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it is_public = utils.is_view_func_public(view_func) if is_public: return None # if this view matches a whitelisted regex, don't process it for view_url in self.public_view_urls: if view_url.match(request.path_info): return None return login_required(view_func)(request, *view_args, **view_kwargs) Refactor public_view_url check to be more pythonic In addition to this I also removed the is_public variable because the new utils function says the same thing so it is redundant.from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it if utils.is_view_func_public(view_func): return None # if this view matches a whitelisted regex, don't process it if any(view_url.match(request.path_info) for view_url in self.public_view_urls): return None return login_required(view_func)(request, *view_args, **view_kwargs)
<commit_before>from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it is_public = utils.is_view_func_public(view_func) if is_public: return None # if this view matches a whitelisted regex, don't process it for view_url in self.public_view_urls: if view_url.match(request.path_info): return None return login_required(view_func)(request, *view_args, **view_kwargs) <commit_msg>Refactor public_view_url check to be more pythonic In addition to this I also removed the is_public variable because the new utils function says the same thing so it is redundant.<commit_after>from django.contrib.auth.decorators import login_required from stronghold import conf, utils class LoginRequiredMiddleware(object): """ Force all views to use login required View is deemed to be public if the @public decorator is applied to the view View is also deemed to be Public if listed in in django settings in the STRONGHOLD_PUBLIC_URLS dictionary each url in STRONGHOLD_PUBLIC_URLS must be a valid regex """ def __init__(self, *args, **kwargs): self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ()) def process_view(self, request, view_func, view_args, view_kwargs): # if request is authenticated, dont process it if request.user.is_authenticated(): return None # if its a public view, don't process it if utils.is_view_func_public(view_func): return None # if this view matches a whitelisted regex, don't process it if any(view_url.match(request.path_info) for view_url in self.public_view_urls): return None return login_required(view_func)(request, *view_args, **view_kwargs)
6785f6ef2287bc161085bcca7f1cb8653b88a433
resolwe/flow/management/commands/cleantestdir.py
resolwe/flow/management/commands/cleantestdir.py
""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if volume_config["config"].get("read_only", False) == False ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir)
""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if not volume_config["config"].get("read_only", False) and volume_config["type"] == "host_path" ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir)
Clean only volumes of type host_path
Clean only volumes of type host_path
Python
apache-2.0
genialis/resolwe,genialis/resolwe
""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if volume_config["config"].get("read_only", False) == False ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir) Clean only volumes of type host_path
""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if not volume_config["config"].get("read_only", False) and volume_config["type"] == "host_path" ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir)
<commit_before>""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if volume_config["config"].get("read_only", False) == False ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir) <commit_msg>Clean only volumes of type host_path<commit_after>
""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if not volume_config["config"].get("read_only", False) and volume_config["type"] == "host_path" ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir)
""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if volume_config["config"].get("read_only", False) == False ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir) Clean only volumes of type host_path""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if not volume_config["config"].get("read_only", False) and volume_config["type"] == "host_path" ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir)
<commit_before>""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if volume_config["config"].get("read_only", False) == False ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir) <commit_msg>Clean only volumes of type host_path<commit_after>""".. Ignore pydocstyle D400. ==================== Clean test directory ==================== Command to run on local machine:: ./manage.py cleantestdir """ import re import shutil from itertools import chain from pathlib import Path from django.core.management.base import BaseCommand from resolwe.storage import settings as storage_settings from resolwe.storage.connectors import connectors TEST_DIR_REGEX = r"^test_.*_\d+$" class Command(BaseCommand): """Cleanup files created during testing.""" help = "Cleanup files created during testing." def handle(self, *args, **kwargs): """Cleanup files created during testing.""" directories = [ Path(connector.path) for connector in chain( connectors.for_storage("data"), connectors.for_storage("upload") ) if connector.mountable ] directories += [ Path(volume_config["config"]["path"]) for volume_name, volume_config in storage_settings.FLOW_VOLUMES.items() if not volume_config["config"].get("read_only", False) and volume_config["type"] == "host_path" ] for directory in directories: directory = directory.resolve() for test_dir in directory.iterdir(): if not test_dir.is_dir(): continue if not re.match(TEST_DIR_REGEX, test_dir.name): continue shutil.rmtree(test_dir)
0fc8c56438acad93fc74868ef3bec694efe25246
heat/db/sqlalchemy/migrate_repo/versions/034_raw_template_files.py
heat/db/sqlalchemy/migrate_repo/versions/034_raw_template_files.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default='{}') files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop()
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default={}) files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop()
Fix default raw_template files value in migration
Fix default raw_template files value in migration This was causing the following error when trying to do a stack-list: ERROR: Attribute 'files' does not accept objects of type <type 'unicode'> Change-Id: Ideee81e44e85fcd8d8f3c9c196702a6c78e5adfd Closes-Bug: #1277278
Python
apache-2.0
maestro-hybrid-cloud/heat,rh-s/heat,ntt-sic/heat,jasondunsmore/heat,rdo-management/heat,redhat-openstack/heat,rh-s/heat,srznew/heat,dragorosson/heat,steveb/heat,cryptickp/heat,pshchelo/heat,gonzolino/heat,pshchelo/heat,jasondunsmore/heat,ntt-sic/heat,miguelgrinberg/heat,redhat-openstack/heat,pratikmallya/heat,maestro-hybrid-cloud/heat,steveb/heat,NeCTAR-RC/heat,openstack/heat,takeshineshiro/heat,miguelgrinberg/heat,cwolferh/heat-scratch,NeCTAR-RC/heat,openstack/heat,rdo-management/heat,gonzolino/heat,noironetworks/heat,noironetworks/heat,cwolferh/heat-scratch,dims/heat,dims/heat,srznew/heat,pratikmallya/heat,takeshineshiro/heat,dragorosson/heat,cryptickp/heat
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default='{}') files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop() Fix default raw_template files value in migration This was causing the following error when trying to do a stack-list: ERROR: Attribute 'files' does not accept objects of type <type 'unicode'> Change-Id: Ideee81e44e85fcd8d8f3c9c196702a6c78e5adfd Closes-Bug: #1277278
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default={}) files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop()
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default='{}') files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop() <commit_msg>Fix default raw_template files value in migration This was causing the following error when trying to do a stack-list: ERROR: Attribute 'files' does not accept objects of type <type 'unicode'> Change-Id: Ideee81e44e85fcd8d8f3c9c196702a6c78e5adfd Closes-Bug: #1277278<commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default={}) files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop()
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default='{}') files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop() Fix default raw_template files value in migration This was causing the following error when trying to do a stack-list: ERROR: Attribute 'files' does not accept objects of type <type 'unicode'> Change-Id: Ideee81e44e85fcd8d8f3c9c196702a6c78e5adfd Closes-Bug: #1277278# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default={}) files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop()
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default='{}') files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop() <commit_msg>Fix default raw_template files value in migration This was causing the following error when trying to do a stack-list: ERROR: Attribute 'files' does not accept objects of type <type 'unicode'> Change-Id: Ideee81e44e85fcd8d8f3c9c196702a6c78e5adfd Closes-Bug: #1277278<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sqlalchemy from heat.db.sqlalchemy.types import Json def upgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) files = sqlalchemy.Column('files', Json, default={}) files.create(raw_template) def downgrade(migrate_engine): meta = sqlalchemy.MetaData() meta.bind = migrate_engine raw_template = sqlalchemy.Table('raw_template', meta, autoload=True) raw_template.c.files.drop()
0adc42bbcf77c284ed7fbbbed4e50a3640dfa0b5
masters/master.tryserver.chromium.angle/master_site_config.py
masters/master.tryserver.chromium.angle/master_site_config.py
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com'
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' service_account_file = 'service-account-chromium-tryserver.json' buildbucket_bucket = 'master.tryserver.chromium.angle'
Enable buildbucket builds to Angle tryserver.
Enable buildbucket builds to Angle tryserver. This is a re-land with a fix of https://codereview.chromium.org/1624703003/ R=nodir@chromium.org BUG=577560 Review URL: https://codereview.chromium.org/1614243005 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@298382 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' Enable buildbucket builds to Angle tryserver. This is a re-land with a fix of https://codereview.chromium.org/1624703003/ R=nodir@chromium.org BUG=577560 Review URL: https://codereview.chromium.org/1614243005 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@298382 0039d316-1c4b-4281-b951-d872f2087c98
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' service_account_file = 'service-account-chromium-tryserver.json' buildbucket_bucket = 'master.tryserver.chromium.angle'
<commit_before># Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' <commit_msg>Enable buildbucket builds to Angle tryserver. This is a re-land with a fix of https://codereview.chromium.org/1624703003/ R=nodir@chromium.org BUG=577560 Review URL: https://codereview.chromium.org/1614243005 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@298382 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' service_account_file = 'service-account-chromium-tryserver.json' buildbucket_bucket = 'master.tryserver.chromium.angle'
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' Enable buildbucket builds to Angle tryserver. This is a re-land with a fix of https://codereview.chromium.org/1624703003/ R=nodir@chromium.org BUG=577560 Review URL: https://codereview.chromium.org/1614243005 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@298382 0039d316-1c4b-4281-b951-d872f2087c98# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' service_account_file = 'service-account-chromium-tryserver.json' buildbucket_bucket = 'master.tryserver.chromium.angle'
<commit_before># Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' <commit_msg>Enable buildbucket builds to Angle tryserver. This is a re-land with a fix of https://codereview.chromium.org/1624703003/ R=nodir@chromium.org BUG=577560 Review URL: https://codereview.chromium.org/1614243005 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@298382 0039d316-1c4b-4281-b951-d872f2087c98<commit_after># Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class TryServerANGLE(Master.Master4a): project_name = 'ANGLE Try Server' master_port = 21403 slave_port = 31403 master_port_alt = 41403 buildbot_url = 'http://build.chromium.org/p/tryserver.chromium.angle/' gerrit_host = 'https://chromium-review.googlesource.com' service_account_file = 'service-account-chromium-tryserver.json' buildbucket_bucket = 'master.tryserver.chromium.angle'
8190da382e26998bf8bb7ac6b1670c9e6e29ceba
tests/test_datasources_testing_rc_bugs.py
tests/test_datasources_testing_rc_bugs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) val = self.datasource.parse(fileobj) self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.parse, fileobj) if __name__ == "__main__": unittest.main()
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) self.datasource.update(fileobj) val = self.datasource.get_num_bugs() self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.update, fileobj) if __name__ == "__main__": unittest.main()
Update TestingRCBugs datasource to new API
Update TestingRCBugs datasource to new API Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>
Python
agpl-3.0
lamby/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,lamby/debian-devel-changes-bot
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) val = self.datasource.parse(fileobj) self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.parse, fileobj) if __name__ == "__main__": unittest.main() Update TestingRCBugs datasource to new API Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) self.datasource.update(fileobj) val = self.datasource.get_num_bugs() self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.update, fileobj) if __name__ == "__main__": unittest.main()
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) val = self.datasource.parse(fileobj) self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.parse, fileobj) if __name__ == "__main__": unittest.main() <commit_msg>Update TestingRCBugs datasource to new API Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk><commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) self.datasource.update(fileobj) val = self.datasource.get_num_bugs() self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.update, fileobj) if __name__ == "__main__": unittest.main()
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) val = self.datasource.parse(fileobj) self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.parse, fileobj) if __name__ == "__main__": unittest.main() Update TestingRCBugs datasource to new API Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) self.datasource.update(fileobj) val = self.datasource.get_num_bugs() self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.update, fileobj) if __name__ == "__main__": unittest.main()
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) val = self.datasource.parse(fileobj) self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.parse, fileobj) if __name__ == "__main__": unittest.main() <commit_msg>Update TestingRCBugs datasource to new API Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk><commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from DebianChangesBot import Datasource from DebianChangesBot.datasources import TestingRCBugs class TestDatasourceTestingRCBugs(unittest.TestCase): def setUp(self): self.fixture = os.path.join(os.path.dirname(os.path.abspath(__file__)), \ 'fixtures', 'testing_rc_bugs.html') self.datasource = TestingRCBugs() def testURL(self): """ Check we have a sane URL. """ self.assert_(len(self.datasource.URL) > 5) self.assert_(self.datasource.URL.startswith('http')) self.assert_('dist' in self.datasource.URL) def testInterval(self): """ Check we have a sane update interval. """ self.assert_(self.datasource.INTERVAL > 60) def testParse(self): fileobj = open(self.fixture) self.datasource.update(fileobj) val = self.datasource.get_num_bugs() self.assert_(type(val) is int) self.assertEqual(val, 538) def testParseEmpty(self): fileobj = open('/dev/null') self.assertRaises(Datasource.DataError, self.datasource.update, fileobj) if __name__ == "__main__": unittest.main()
9b53673771b8b185232cffad129036bbe084a169
api.py
api.py
from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs)
from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs)
Fix device-user linking in authenticated resources
Fix device-user linking in authenticated resources
Python
mit
Ian-Foote/django-push-notifications,matthewh/django-push-notifications,Ubiwhere/django-push-notifications,freakboy3742/django-push-notifications,gkirkpatrick/django-push-notifications,hylje/django-push-notifications,AndreasBackx/django-push-notifications,cristiano2lopes/django-push-notifications,jleclanche/django-push-notifications,1vank1n/django-push-notifications,leonmu/django-push-notifications,avichalp/django-push-notifications,Dubrzr/django-push-notifications,Tictrac/django-push-notifications,rmoorman/django-push-notifications,leonsas/django-push-notifications,omritoptix/django-ltg-skeleton,lneoe/django-push-notifications,lukeburden/django-push-notifications,rsalmaso/django-push-notifications,ajatamayo/django-push-notifications,vuchau/django-push-notifications,fsto/django-push-notifications,nnseva/django-push-notifications,IvoPintodaSilva/django-push-notifications,CustomerSupport/django-push-notifications,dilvane/django-push-notifications,Adys/django-push-notifications,gio82/django-push-notifications,omritoptix/django-ltg-skeleton,giserh/django-push-notifications,shigmas/django-push-notifications,vikcena01/django-push-notification,jamaalscarlett/django-push-notifications,azevakin/django-push-notifications,apokinsocha/django-push-notifications,GaleDragon/django-push-notifications
from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) Fix device-user linking in authenticated resources
from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs)
<commit_before>from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) <commit_msg>Fix device-user linking in authenticated resources<commit_after>
from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs)
from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) Fix device-user linking in authenticated resourcesfrom tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs)
<commit_before>from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): bundle.data["user_id"] = bundle.request.user.id return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, **kwargs) <commit_msg>Fix device-user linking in authenticated resources<commit_after>from tastypie.authorization import Authorization from tastypie.authentication import BasicAuthentication from tastypie.fields import ForeignKey from tastypie.resources import ModelResource from .models import APNSDevice, GCMDevice class APNSDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = APNSDevice.objects.all() resource_name = "device/apns" class GCMDeviceResource(ModelResource): class Meta: authorization = Authorization() queryset = GCMDevice.objects.all() resource_name = "device/gcm" class APNSDeviceAuthenticatedResource(APNSDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(APNSDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(APNSDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs) class GCMDeviceAuthenticatedResource(GCMDeviceResource): # user = ForeignKey(UserResource, "user") class Meta(GCMDeviceResource.Meta): authentication = BasicAuthentication() # authorization = SameUserAuthorization() def obj_create(self, bundle, **kwargs): # See https://github.com/toastdriven/django-tastypie/issues/854 return super(GCMDeviceAuthenticatedResource, self).obj_create(bundle, user=bundle.request.user, **kwargs)
0325d4d55e9f42d031edc66fe4dedfefea4c66e2
src/scripts/Main.py
src/scripts/Main.py
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation()
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) elif PA["algorithm"] == "hagedorn_inhomog": from WaveBlocksND import SimulationLoopHagedornInhomogeneous SL = SimulationLoopHagedornInhomogeneous(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation()
Enable inhomogeneous packets in the main simulation runner
Enable inhomogeneous packets in the main simulation runner
Python
bsd-3-clause
WaveBlocks/WaveBlocksND,WaveBlocks/WaveBlocksND
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation() Enable inhomogeneous packets in the main simulation runner
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) elif PA["algorithm"] == "hagedorn_inhomog": from WaveBlocksND import SimulationLoopHagedornInhomogeneous SL = SimulationLoopHagedornInhomogeneous(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation()
<commit_before>"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation() <commit_msg>Enable inhomogeneous packets in the main simulation runner<commit_after>
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) elif PA["algorithm"] == "hagedorn_inhomog": from WaveBlocksND import SimulationLoopHagedornInhomogeneous SL = SimulationLoopHagedornInhomogeneous(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation()
"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation() Enable inhomogeneous packets in the main simulation runner"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) elif PA["algorithm"] == "hagedorn_inhomog": from WaveBlocksND import SimulationLoopHagedornInhomogeneous SL = SimulationLoopHagedornInhomogeneous(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation()
<commit_before>"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation() <commit_msg>Enable inhomogeneous packets in the main simulation runner<commit_after>"""The WaveBlocks Project This file is main script for running simulations with WaveBlocks. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012 R. Bourquin @license: Modified BSD License """ import sys from WaveBlocksND import ParameterLoader # Read the path for the configuration file we use for this simulation. try: parametersfile = sys.argv[1] except IndexError: raise ValueError("No configuration file given!") print("Using configuration from file: " + parametersfile) # Set up the parameter provider singleton PA = ParameterLoader().load_from_file(parametersfile) # Print the parameters that apply for this simulation print(PA) # Decide which simulation loop to use if PA["algorithm"] == "fourier": from WaveBlocksND import SimulationLoopFourier SL = SimulationLoopFourier(PA) elif PA["algorithm"] == "hagedorn": from WaveBlocksND import SimulationLoopHagedorn SL = SimulationLoopHagedorn(PA) elif PA["algorithm"] == "hagedorn_inhomog": from WaveBlocksND import SimulationLoopHagedornInhomogeneous SL = SimulationLoopHagedornInhomogeneous(PA) # TODO: Add new algorithms here else: raise ValueError("Invalid propagator algorithm.") # Initialize and run the simulation SL.prepare_simulation() SL.run_simulation() # End the simulation, close output files etc. SL.end_simulation()
d19e4a358f1f81f72a02c3015fc4a0def2827e19
nibble_aes/find_dist/find_ids.py
nibble_aes/find_dist/find_ids.py
""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].intersection(yss[-2]) == set(): backward_rounds -= 1 rounds = forward_rounds + backward_rounds # or vice versa elif xss[-2].intersection(yss[-1]) == set(): forward_rounds -= 1 rounds = forward_rounds + backward_rounds # if there is no contradiction, skip else: continue if rounds >= 3: print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main()
""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): if forward_rounds < 2: continue with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): if backward_rounds < 2: continue # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].isdisjoint(yss[-2]): backward_rounds -= 1 print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main()
Optimize by using isdisjoint instead of finding intersection.
Optimize by using isdisjoint instead of finding intersection.
Python
mit
wei2912/idc,wei2912/idc,wei2912/aes-idc,wei2912/idc,wei2912/idc,wei2912/aes-idc
""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].intersection(yss[-2]) == set(): backward_rounds -= 1 rounds = forward_rounds + backward_rounds # or vice versa elif xss[-2].intersection(yss[-1]) == set(): forward_rounds -= 1 rounds = forward_rounds + backward_rounds # if there is no contradiction, skip else: continue if rounds >= 3: print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main() Optimize by using isdisjoint instead of finding intersection.
""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): if forward_rounds < 2: continue with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): if backward_rounds < 2: continue # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].isdisjoint(yss[-2]): backward_rounds -= 1 print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main()
<commit_before>""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].intersection(yss[-2]) == set(): backward_rounds -= 1 rounds = forward_rounds + backward_rounds # or vice versa elif xss[-2].intersection(yss[-1]) == set(): forward_rounds -= 1 rounds = forward_rounds + backward_rounds # if there is no contradiction, skip else: continue if rounds >= 3: print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main() <commit_msg>Optimize by using isdisjoint instead of finding intersection.<commit_after>
""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): if forward_rounds < 2: continue with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): if backward_rounds < 2: continue # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].isdisjoint(yss[-2]): backward_rounds -= 1 print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main()
""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].intersection(yss[-2]) == set(): backward_rounds -= 1 rounds = forward_rounds + backward_rounds # or vice versa elif xss[-2].intersection(yss[-1]) == set(): forward_rounds -= 1 rounds = forward_rounds + backward_rounds # if there is no contradiction, skip else: continue if rounds >= 3: print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main() Optimize by using isdisjoint instead of finding intersection.""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): if forward_rounds < 2: continue with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): if backward_rounds < 2: continue # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].isdisjoint(yss[-2]): backward_rounds -= 1 print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main()
<commit_before>""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].intersection(yss[-2]) == set(): backward_rounds -= 1 rounds = forward_rounds + backward_rounds # or vice versa elif xss[-2].intersection(yss[-1]) == set(): forward_rounds -= 1 rounds = forward_rounds + backward_rounds # if there is no contradiction, skip else: continue if rounds >= 3: print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main() <commit_msg>Optimize by using isdisjoint instead of finding intersection.<commit_after>""" Derive a list of impossible differentials. """ import ast import sys def parse(line): i, rounds, xss = ast.literal_eval(line) yss = [set(xs) for xs in xss] return (i, rounds, yss) def main(): if len(sys.argv) != 3: print("usage: ./find_ids.py [forward differentials file] [backward differentials file]", file=sys.stderr) sys.exit(1) ids = [] with open(sys.argv[1]) as f: for i, forward_rounds, xss in map(parse, f): if forward_rounds < 2: continue with open(sys.argv[2]) as g: for j, backward_rounds, yss in map(parse, g): if backward_rounds < 2: continue # truncate first round of backward differential # by comparing last round of forward differential and second last # round of backward differential if xss[-1].isdisjoint(yss[-2]): backward_rounds -= 1 print((i, forward_rounds, backward_rounds, j)) if __name__ == "__main__": main()
f95a42b0a9445a58e68fc83e9b1411bedef67904
wqflask/tests/base/test_general_object.py
wqflask/tests/base/test_general_object.py
import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n")
import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) self.assertEqual(len(test_obj), 0) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") self.assertEqual(len(test_obj), 2) self.assertEqual(getattr(test_obj, "value"), 1) self.assertEqual(test_obj["value"], 1) test_obj["test"] = 1 self.assertEqual(test_obj["test"], 1)
Add more tests for GeneralObject
Add more tests for GeneralObject * wqflask/tests/base/test_general_object.py: test object's magic methods
Python
agpl-3.0
genenetwork/genenetwork2,zsloan/genenetwork2,zsloan/genenetwork2,zsloan/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,zsloan/genenetwork2,genenetwork/genenetwork2
import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") Add more tests for GeneralObject * wqflask/tests/base/test_general_object.py: test object's magic methods
import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) self.assertEqual(len(test_obj), 0) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") self.assertEqual(len(test_obj), 2) self.assertEqual(getattr(test_obj, "value"), 1) self.assertEqual(test_obj["value"], 1) test_obj["test"] = 1 self.assertEqual(test_obj["test"], 1)
<commit_before>import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") <commit_msg>Add more tests for GeneralObject * wqflask/tests/base/test_general_object.py: test object's magic methods<commit_after>
import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) self.assertEqual(len(test_obj), 0) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") self.assertEqual(len(test_obj), 2) self.assertEqual(getattr(test_obj, "value"), 1) self.assertEqual(test_obj["value"], 1) test_obj["test"] = 1 self.assertEqual(test_obj["test"], 1)
import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") Add more tests for GeneralObject * wqflask/tests/base/test_general_object.py: test object's magic methodsimport unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) self.assertEqual(len(test_obj), 0) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") self.assertEqual(len(test_obj), 2) self.assertEqual(getattr(test_obj, "value"), 1) self.assertEqual(test_obj["value"], 1) test_obj["test"] = 1 self.assertEqual(test_obj["test"], 1)
<commit_before>import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") <commit_msg>Add more tests for GeneralObject * wqflask/tests/base/test_general_object.py: test object's magic methods<commit_after>import unittest from base.GeneralObject import GeneralObject class TestGeneralObjectTests(unittest.TestCase): """ Test the GeneralObject base class """ def test_object_contents(self): """Test whether base contents are stored properly""" test_obj = GeneralObject("a", "b", "c") self.assertEqual("abc", ''.join(test_obj.contents)) self.assertEqual(len(test_obj), 0) def test_object_dict(self): """Test whether the base class is printed properly""" test_obj = GeneralObject("a", name="test", value=1) self.assertEqual(str(test_obj), "value = 1\nname = test\n") self.assertEqual( repr(test_obj), "value = 1\nname = test\ncontents = ['a']\n") self.assertEqual(len(test_obj), 2) self.assertEqual(getattr(test_obj, "value"), 1) self.assertEqual(test_obj["value"], 1) test_obj["test"] = 1 self.assertEqual(test_obj["test"], 1)
dc38460e4e8ca70954f34bfffa99170a9ea437cb
scripts/helpers/utils.py
scripts/helpers/utils.py
from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): while time() - initial_time < seconds: return False return True
from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): if time() - initial_time < seconds: return False return True
Change while->if to improve readability
Change while->if to improve readability
Python
mit
richin13/nxt-scripts
from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): while time() - initial_time < seconds: return False return True Change while->if to improve readability
from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): if time() - initial_time < seconds: return False return True
<commit_before>from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): while time() - initial_time < seconds: return False return True <commit_msg>Change while->if to improve readability<commit_after>
from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): if time() - initial_time < seconds: return False return True
from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): while time() - initial_time < seconds: return False return True Change while->if to improve readabilityfrom __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): if time() - initial_time < seconds: return False return True
<commit_before>from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): while time() - initial_time < seconds: return False return True <commit_msg>Change while->if to improve readability<commit_after>from __future__ import division from time import time def normalize(val, _min, _max): return (val - _min) / (_max - _min) def countdown(initial_time, seconds): if time() - initial_time < seconds: return False return True
c062ae638a4c864e978a4adfcd7d8d830b99abc2
opentreemap/treemap/lib/dates.py
opentreemap/treemap/lib/dates.py
from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2
from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 def make_aware(value): if value is None or timezone.is_aware(value): return value else: return timezone.make_aware(value, timezone.utc)
Add function for nullsafe, tzsafe comparison
Add function for nullsafe, tzsafe comparison
Python
agpl-3.0
clever-crow-consulting/otm-core,recklessromeo/otm-core,maurizi/otm-core,recklessromeo/otm-core,maurizi/otm-core,RickMohr/otm-core,RickMohr/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,recklessromeo/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,maurizi/otm-core
from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 Add function for nullsafe, tzsafe comparison
from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 def make_aware(value): if value is None or timezone.is_aware(value): return value else: return timezone.make_aware(value, timezone.utc)
<commit_before>from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 <commit_msg>Add function for nullsafe, tzsafe comparison<commit_after>
from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 def make_aware(value): if value is None or timezone.is_aware(value): return value else: return timezone.make_aware(value, timezone.utc)
from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 Add function for nullsafe, tzsafe comparisonfrom datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 def make_aware(value): if value is None or timezone.is_aware(value): return value else: return timezone.make_aware(value, timezone.utc)
<commit_before>from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 <commit_msg>Add function for nullsafe, tzsafe comparison<commit_after>from datetime import datetime from django.utils import timezone import calendar import pytz DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S' DATE_FORMAT = '%Y-%m-%d' def parse_date_string_with_or_without_time(date_string): try: return datetime.strptime(date_string.strip(), '%Y-%m-%d %H:%M:%S') except ValueError: # If the time is not included, try again with date only return datetime.strptime(date_string.strip(), '%Y-%m-%d') def unix_timestamp(d=None): if d is None: d = timezone.now() return calendar.timegm(d.utctimetuple()) else: return calendar.timegm(d.timetuple()) def datesafe_eq(obj1, obj2): """ If two objects are dates, but don't both have the same timezone awareness status, compare them in a timezone-safe way. Otherwise, compare them with regular equality. """ if isinstance(obj1, datetime) and not timezone.is_aware(obj1): obj1 = timezone.make_aware(obj1, pytz.UTC) if isinstance(obj2, datetime) and not timezone.is_aware(obj2): obj2 = timezone.make_aware(obj2, pytz.UTC) return obj1 == obj2 def make_aware(value): if value is None or timezone.is_aware(value): return value else: return timezone.make_aware(value, timezone.utc)
57bda16a1e948d81884277f35b77c16e50d4870e
scripts/slave/chromium/dart_buildbot_run.py
scripts/slave/chromium/dart_buildbot_run.py
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') # Temporary until 1.6 ships on stable. if builder_name.endswith('-be') or builder_name.endswith("-dev"): script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' else: script = 'src/dartium_tools/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main())
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main())
Switch Dartium buildbot script to stable 1.6
Switch Dartium buildbot script to stable 1.6 BUG= Review URL: https://codereview.chromium.org/504383002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@291655 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') # Temporary until 1.6 ships on stable. if builder_name.endswith('-be') or builder_name.endswith("-dev"): script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' else: script = 'src/dartium_tools/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main()) Switch Dartium buildbot script to stable 1.6 BUG= Review URL: https://codereview.chromium.org/504383002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@291655 0039d316-1c4b-4281-b951-d872f2087c98
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main())
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') # Temporary until 1.6 ships on stable. if builder_name.endswith('-be') or builder_name.endswith("-dev"): script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' else: script = 'src/dartium_tools/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main()) <commit_msg>Switch Dartium buildbot script to stable 1.6 BUG= Review URL: https://codereview.chromium.org/504383002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@291655 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main())
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') # Temporary until 1.6 ships on stable. if builder_name.endswith('-be') or builder_name.endswith("-dev"): script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' else: script = 'src/dartium_tools/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main()) Switch Dartium buildbot script to stable 1.6 BUG= Review URL: https://codereview.chromium.org/504383002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@291655 0039d316-1c4b-4281-b951-d872f2087c98#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main())
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') # Temporary until 1.6 ships on stable. if builder_name.endswith('-be') or builder_name.endswith("-dev"): script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' else: script = 'src/dartium_tools/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main()) <commit_msg>Switch Dartium buildbot script to stable 1.6 BUG= Review URL: https://codereview.chromium.org/504383002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@291655 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation scheme. """ import os import sys from common import chromium_utils def main(): builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='') script = 'src/dart/tools/dartium/buildbot_annotated_steps.py' result = chromium_utils.RunCommand([sys.executable, script]) if result: print 'Running annotated steps % failed' % script return 1 # BIG HACK # Normal ninja clobbering does not work due to symlinks/python on windows # Full clobbering before building does not work since it will destroy # the ninja build files # So we basically clobber at the end here if chromium_utils.IsWindows() and 'full' in builder_name: chromium_utils.RemoveDirectory('src/out') return 0 if __name__ == '__main__': sys.exit(main())
cd71b6b0a94c98966a7750f067eaa2dd044f5fec
spacy/tests/parser/test_parser_pickle.py
spacy/tests/parser/test_parser_pickle.py
import pytest import pickle import cloudpickle import io @pytest.mark.models def test_pickle(EN): file_ = io.BytesIO() cloudpickle.dump(EN.parser, file_) file_.seek(0) loaded = pickle.load(file_)
import pytest import pickle import cloudpickle import io #@pytest.mark.models #def test_pickle(EN): # file_ = io.BytesIO() # cloudpickle.dump(EN.parser, file_) # # file_.seek(0) # # loaded = pickle.load(file_) #
Remove test of parser pickle
Remove test of parser pickle
Python
mit
banglakit/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,raphael0202/spaCy,raphael0202/spaCy,recognai/spaCy,explosion/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,banglakit/spaCy,honnibal/spaCy,honnibal/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,aikramer2/spaCy,banglakit/spaCy,aikramer2/spaCy,aikramer2/spaCy,spacy-io/spaCy,banglakit/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,raphael0202/spaCy,banglakit/spaCy,spacy-io/spaCy,oroszgy/spaCy.hu,explosion/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,recognai/spaCy,recognai/spaCy,oroszgy/spaCy.hu,Gregory-Howard/spaCy,honnibal/spaCy,Gregory-Howard/spaCy,recognai/spaCy,oroszgy/spaCy.hu,explosion/spaCy,raphael0202/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,Gregory-Howard/spaCy,recognai/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer2/spaCy
import pytest import pickle import cloudpickle import io @pytest.mark.models def test_pickle(EN): file_ = io.BytesIO() cloudpickle.dump(EN.parser, file_) file_.seek(0) loaded = pickle.load(file_) Remove test of parser pickle
import pytest import pickle import cloudpickle import io #@pytest.mark.models #def test_pickle(EN): # file_ = io.BytesIO() # cloudpickle.dump(EN.parser, file_) # # file_.seek(0) # # loaded = pickle.load(file_) #
<commit_before>import pytest import pickle import cloudpickle import io @pytest.mark.models def test_pickle(EN): file_ = io.BytesIO() cloudpickle.dump(EN.parser, file_) file_.seek(0) loaded = pickle.load(file_) <commit_msg>Remove test of parser pickle<commit_after>
import pytest import pickle import cloudpickle import io #@pytest.mark.models #def test_pickle(EN): # file_ = io.BytesIO() # cloudpickle.dump(EN.parser, file_) # # file_.seek(0) # # loaded = pickle.load(file_) #
import pytest import pickle import cloudpickle import io @pytest.mark.models def test_pickle(EN): file_ = io.BytesIO() cloudpickle.dump(EN.parser, file_) file_.seek(0) loaded = pickle.load(file_) Remove test of parser pickleimport pytest import pickle import cloudpickle import io #@pytest.mark.models #def test_pickle(EN): # file_ = io.BytesIO() # cloudpickle.dump(EN.parser, file_) # # file_.seek(0) # # loaded = pickle.load(file_) #
<commit_before>import pytest import pickle import cloudpickle import io @pytest.mark.models def test_pickle(EN): file_ = io.BytesIO() cloudpickle.dump(EN.parser, file_) file_.seek(0) loaded = pickle.load(file_) <commit_msg>Remove test of parser pickle<commit_after>import pytest import pickle import cloudpickle import io #@pytest.mark.models #def test_pickle(EN): # file_ = io.BytesIO() # cloudpickle.dump(EN.parser, file_) # # file_.seek(0) # # loaded = pickle.load(file_) #
f3dcb7105049b9dcc8d6a1a97fbfe8968092a533
mesonwrap/inventory.py
mesonwrap/inventory.py
_ORGANIZATION = 'mesonbuild' _RESTRICTED_PROJECTS = [ 'meson', 'meson-ci', 'mesonwrap', '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 = [ '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 mesonbuild.github.io and wrapdb to the list of restricted projects
Add mesonbuild.github.io and wrapdb to the list of restricted projects
Python
apache-2.0
mesonbuild/wrapweb,mesonbuild/wrapweb,mesonbuild/wrapweb
_ORGANIZATION = 'mesonbuild' _RESTRICTED_PROJECTS = [ 'meson', 'meson-ci', 'mesonwrap', '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 mesonbuild.github.io and wrapdb to the list of restricted projects
_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
<commit_before>_ORGANIZATION = 'mesonbuild' _RESTRICTED_PROJECTS = [ 'meson', 'meson-ci', 'mesonwrap', '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 <commit_msg>Add mesonbuild.github.io and wrapdb to the list of restricted projects<commit_after>
_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 = [ 'meson', 'meson-ci', 'mesonwrap', '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 mesonbuild.github.io and wrapdb to the list of restricted projects_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
<commit_before>_ORGANIZATION = 'mesonbuild' _RESTRICTED_PROJECTS = [ 'meson', 'meson-ci', 'mesonwrap', '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 <commit_msg>Add mesonbuild.github.io and wrapdb to the list of restricted projects<commit_after>_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
f48651eb780aa10d2cbe115126a0783c72b76e7e
tsscp/utils.py
tsscp/utils.py
from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound
from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[-A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound
Allow hyphens in page ID
Allow hyphens in page ID
Python
mit
Einbert-Xeride/tsscp,Einbert-Xeride/tsscp
from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound Allow hyphens in page ID
from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[-A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound
<commit_before>from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound <commit_msg>Allow hyphens in page ID<commit_after>
from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[-A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound
from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound Allow hyphens in page IDfrom markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[-A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound
<commit_before>from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound <commit_msg>Allow hyphens in page ID<commit_after>from markdown import markdown import bleach import re from werkzeug.exceptions import NotFound from . import consts as c def md2html(md: str): allowed_tags = ('a', 'abbr', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'pre', 'strong', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'table', 'tr', 'td', 'thead', 'tbody', 'th', 'sub', 'sup', 'del') return bleach.linkify(bleach.clean(markdown(md, output_format='html'), tags=allowed_tags, strip=True)) def check_pid(pid): return _pid_check_re.match(pid) is not None and len(pid) < c.PID_MAX_LENGTH _pid_check_re = re.compile('^[-A-Za-z0-9_]+$') def check_pid_or_404(pid): if not check_pid(pid): raise NotFound
67e16e13b6a4cc505758b3af26e287914ac8f335
demosys/context/__init__.py
demosys/context/__init__.py
import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> 'demosys.context.base.Window': """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window
import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string from demosys.context.base import BaseWindow # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> BaseWindow: """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window
Fix test issue related to pyflakes upgrade
Fix test issue related to pyflakes upgrade
Python
isc
Contraz/demosys-py
import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> 'demosys.context.base.Window': """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window Fix test issue related to pyflakes upgrade
import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string from demosys.context.base import BaseWindow # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> BaseWindow: """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window
<commit_before>import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> 'demosys.context.base.Window': """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window <commit_msg>Fix test issue related to pyflakes upgrade<commit_after>
import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string from demosys.context.base import BaseWindow # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> BaseWindow: """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window
import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> 'demosys.context.base.Window': """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window Fix test issue related to pyflakes upgradeimport moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string from demosys.context.base import BaseWindow # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> BaseWindow: """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window
<commit_before>import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> 'demosys.context.base.Window': """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window <commit_msg>Fix test issue related to pyflakes upgrade<commit_after>import moderngl from demosys.conf import settings from demosys.utils.module_loading import import_string from demosys.context.base import BaseWindow # Window instance shortcut WINDOW = None # noqa def window(raise_on_error=True) -> BaseWindow: """ The window instance we are rendering to :param raise_on_error: Raise an error if the window is not created yet """ if not WINDOW and raise_on_error: raise RuntimeError("Attempting to get window before creation") return WINDOW def ctx() -> moderngl.Context: """ModernGL context""" win = window() if not win.ctx: raise RuntimeError("Attempting to get context before creation") return win.ctx def create_window(): if window(raise_on_error=False): raise RuntimeError("Attempting to create window twice") window_cls_name = settings.WINDOW.get('class', 'demosys.context.pyqt.Window') window_cls = import_string(window_cls_name) new_window = window_cls() new_window.print_context_info() return new_window
ab3cb8fb539d65cb3549d52ec34c7b533a98b2d4
byceps/blueprints/authorization/decorators.py
byceps/blueprints/authorization/decorators.py
# -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator def role_required(role): """Ensure the current user has the given role.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if role not in g.current_user.roles: abort(403) return func(*args, **kwargs) return wrapper return decorator
# -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator
Remove `role_required` decorator as only specific permissions, not roles, should be explicitly required
Remove `role_required` decorator as only specific permissions, not roles, should be explicitly required
Python
bsd-3-clause
homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps
# -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator def role_required(role): """Ensure the current user has the given role.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if role not in g.current_user.roles: abort(403) return func(*args, **kwargs) return wrapper return decorator Remove `role_required` decorator as only specific permissions, not roles, should be explicitly required
# -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator
<commit_before># -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator def role_required(role): """Ensure the current user has the given role.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if role not in g.current_user.roles: abort(403) return func(*args, **kwargs) return wrapper return decorator <commit_msg>Remove `role_required` decorator as only specific permissions, not roles, should be explicitly required<commit_after>
# -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator
# -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator def role_required(role): """Ensure the current user has the given role.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if role not in g.current_user.roles: abort(403) return func(*args, **kwargs) return wrapper return decorator Remove `role_required` decorator as only specific permissions, not roles, should be explicitly required# -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator
<commit_before># -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator def role_required(role): """Ensure the current user has the given role.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if role not in g.current_user.roles: abort(403) return func(*args, **kwargs) return wrapper return decorator <commit_msg>Remove `role_required` decorator as only specific permissions, not roles, should be explicitly required<commit_after># -*- coding: utf-8 -*- """ byceps.blueprints.authorization.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from functools import wraps from flask import abort, g def permission_required(permission): """Ensure the current user has the given permission.""" def decorator(func): @wraps(func) def wrapper(*args, **kwargs): if permission not in g.current_user.permissions: abort(403) return func(*args, **kwargs) return wrapper return decorator
0f62859abe1f6b0bedf4a3512b59f474536e1c78
setup.py
setup.py
from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ )
from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock', 'vcrpy' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ )
Add vcrpy to testing-related dependencies
Add vcrpy to testing-related dependencies
Python
agpl-3.0
ibamacsr/sentinelsat
from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ ) Add vcrpy to testing-related dependencies
from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock', 'vcrpy' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ )
<commit_before>from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ ) <commit_msg>Add vcrpy to testing-related dependencies<commit_after>
from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock', 'vcrpy' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ )
from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ ) Add vcrpy to testing-related dependenciesfrom codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock', 'vcrpy' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ )
<commit_before>from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ ) <commit_msg>Add vcrpy to testing-related dependencies<commit_after>from codecs import open as codecs_open from setuptools import setup, find_packages import sentinelsat # Get the long description from the relevant file with codecs_open('README.rst', encoding='utf-8') as f: long_description = f.read() setup(name='sentinelsat', version=sentinelsat.__version__, description="Utility to search and download Sentinel-1 Imagery", long_description=long_description, classifiers=[ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Scientific/Engineering :: GIS', 'Topic :: Utilities', ], keywords='sentinel, esa, satellite, download, GIS', author="Wille Marcel", author_email='wille@wille.blog.br', url='https://github.com/ibamacsr/sentinelsat', license='GPLv3+', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=open('requirements.txt').read().splitlines(), extras_require={ 'test': [ 'pytest', 'requests-mock', 'vcrpy' ], }, entry_points=""" [console_scripts] sentinel=sentinelsat.scripts.cli:cli """ )
644912b4e4ef533db23b732a36e4dfc373f47540
FEZHAT.py
FEZHAT.py
import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(): # see page 8 return (((3.3 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()
import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(self): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(self): # see page 8 return (((3300 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()
Use mV in temperature calculation
Use mV in temperature calculation
Python
apache-2.0
bechynsky/FEZHATPY
import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(): # see page 8 return (((3.3 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()Use mV in temperature calculation
import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(self): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(self): # see page 8 return (((3300 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()
<commit_before>import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(): # see page 8 return (((3.3 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()<commit_msg>Use mV in temperature calculation<commit_after>
import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(self): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(self): # see page 8 return (((3300 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()
import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(): # see page 8 return (((3.3 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()Use mV in temperature calculationimport ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(self): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(self): # see page 8 return (((3300 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()
<commit_before>import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(): # see page 8 return (((3.3 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()<commit_msg>Use mV in temperature calculation<commit_after>import ADS7830 class FEZHAT: def __init__(self): self._ads = ADS7830.ADS7830(1, 0x48) def get_light(self): return self._ads.read(5) / 255.0 # http://ww1.microchip.com/downloads/en/DeviceDoc/20001942F.pdf def get_temperature(self): # see page 8 return (((3300 / 255) * self._ads.read(4)) - 400) / 19.5 if __name__ == "__main__": fh = FEZHAT() print fh.get_light() print fh.get_temperature()
ed948b9206efb8329d9b0eac1814a9ae4945871a
setup.py
setup.py
from setuptools import setup, find_packages setup( name='ok', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], )
from setuptools import setup, find_packages setup( name='okpy', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], )
Change pip name to okpy, since ok is taken
Change pip name to okpy, since ok is taken
Python
apache-2.0
jordonwii/ok,jordonwii/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,jackzhao-mj/ok,jackzhao-mj/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,Cal-CS-61A-Staff/ok,jackzhao-mj/ok,jackzhao-mj/ok
from setuptools import setup, find_packages setup( name='ok', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], ) Change pip name to okpy, since ok is taken
from setuptools import setup, find_packages setup( name='okpy', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], )
<commit_before>from setuptools import setup, find_packages setup( name='ok', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], ) <commit_msg>Change pip name to okpy, since ok is taken<commit_after>
from setuptools import setup, find_packages setup( name='okpy', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], )
from setuptools import setup, find_packages setup( name='ok', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], ) Change pip name to okpy, since ok is takenfrom setuptools import setup, find_packages setup( name='okpy', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], )
<commit_before>from setuptools import setup, find_packages setup( name='ok', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], ) <commit_msg>Change pip name to okpy, since ok is taken<commit_after>from setuptools import setup, find_packages setup( name='okpy', version='1.0.6', description=('ok.py supports programming projects by running tests, ' 'tracking progress, and assisting in debugging.'), # long_description=long_description, url='https://github.com/Cal-CS-61A-Staff/ok', author='John Denero, Soumya Basu, Stephen Martinis, Sharad Vikram, Albert Wu', # author_email='', license='Apache License, Version 2.0', keywords=['education', 'autograding'], packages=find_packages('client', exclude=['*.tests', '*.tests.*', '*demo_assignments*']), package_dir={'': 'client'}, # install_requires=[], entry_points={ 'console_scripts': [ 'ok=client.__main__:main', # 'ok-publish=client.publish:main', ], }, classifiers=[ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], )
18033898775a0a481542d5e00c8f37d47e38decf
setup.py
setup.py
# -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=False, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, )
# -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=True, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, )
Fix package data to include styles.css
:bug: Fix package data to include styles.css
Python
agpl-3.0
Connexions/cnx-epub,Connexions/cnx-epub,Connexions/cnx-epub
# -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=False, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, ) :bug: Fix package data to include styles.css
# -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=True, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, )
<commit_before># -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=False, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, ) <commit_msg>:bug: Fix package data to include styles.css<commit_after>
# -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=True, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, )
# -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=False, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, ) :bug: Fix package data to include styles.css# -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=True, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, )
<commit_before># -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=False, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, ) <commit_msg>:bug: Fix package data to include styles.css<commit_after># -*- coding: utf-8 -*- import sys from setuptools import setup, find_packages IS_PY3 = sys.version_info > (3,) install_requires = [ 'jinja2', 'lxml', ] tests_require = [ ] extras_require = { 'test': tests_require, } description = "Library for building and paring Connexions' EPUBs." if not IS_PY3: tests_require.append('mock') setup( name='cnx-epub', version='0.8.0', author='Connexions team', author_email='info@cnx.org', url="https://github.com/connexions/cnx-epub", license='AGPL, See also LICENSE.txt', description=description, install_requires=install_requires, tests_require=tests_require, extras_require=extras_require, packages=find_packages(), include_package_data=True, entry_points={ 'console_scripts': [ 'cnx-epub-single_html = cnxepub.scripts.single_html.main:main', ], }, test_suite='cnxepub.tests', zip_safe=False, )
6b32e3a379920557183effdddf977f21e2603159
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Corey Farwell', author_email='corey@educreations.com', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], )
#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Educreations Engineering', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], )
Make the credits appear less selfish
Make the credits appear less selfish Not to mention, I didn't write most of it
Python
mit
educreations/celery-queued-once
#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Corey Farwell', author_email='corey@educreations.com', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], ) Make the credits appear less selfish Not to mention, I didn't write most of it
#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Educreations Engineering', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], )
<commit_before>#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Corey Farwell', author_email='corey@educreations.com', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], ) <commit_msg>Make the credits appear less selfish Not to mention, I didn't write most of it<commit_after>
#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Educreations Engineering', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], )
#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Corey Farwell', author_email='corey@educreations.com', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], ) Make the credits appear less selfish Not to mention, I didn't write most of it#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Educreations Engineering', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], )
<commit_before>#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Corey Farwell', author_email='corey@educreations.com', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], ) <commit_msg>Make the credits appear less selfish Not to mention, I didn't write most of it<commit_after>#!/usr/bin/env python from setuptools import setup setup( name='celery-queued-once', version='0.1', description='Celery base task de-duplicating tasks', author='Educreations Engineering', packages=['queued_once'], install_requires=['celery', 'django >= 1.7'], )
6740467a15a54d4ca0bf0a7e358e2e5c92e04344
setup.py
setup.py
from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', ], zip_safe=False)
from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', 'enum34;python_version<"3.4"', ], zip_safe=False)
Install enum34 if not provided
Install enum34 if not provided
Python
mit
openaps/openomni,openaps/openomni,openaps/openomni
from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', ], zip_safe=False) Install enum34 if not provided
from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', 'enum34;python_version<"3.4"', ], zip_safe=False)
<commit_before>from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', ], zip_safe=False) <commit_msg>Install enum34 if not provided<commit_after>
from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', 'enum34;python_version<"3.4"', ], zip_safe=False)
from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', ], zip_safe=False) Install enum34 if not providedfrom setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', 'enum34;python_version<"3.4"', ], zip_safe=False)
<commit_before>from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', ], zip_safe=False) <commit_msg>Install enum34 if not provided<commit_after>from setuptools import setup, find_packages import re VERSIONFILE = "openomni/_version.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) setup(name='openomni', version=verstr, description='Omnipod Packet Decoding Library', url='http://github.com/openaps/omni', # See https://github.com/openaps/openomni/graphs/contributors for actual # contributors... author='Pete Schwamb', author_email='pete@schwamb.net', scripts=[ 'openomni/bin/decode_omni', 'openomni/bin/omni_listen_rfcat', 'openomni/bin/omni_akimbo', 'openomni/bin/omni_explore', 'openomni/bin/omni_send_rfcat', 'openomni/bin/omni_forloop'], packages=find_packages(), install_requires=[ 'crccheck', 'enum34;python_version<"3.4"', ], zip_safe=False)
168aac03b6d526836ec9768a505e732b41f1eefc
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'django-easy-pjax', 'django-templatetag-handlebars', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
Remove unused modules from the dependency list.
Remove unused modules from the dependency list.
Python
apache-2.0
uw-it-aca/mdot,uw-it-aca/mdot,uw-it-aca/mdot,charlon/mdot,charlon/mdot,uw-it-aca/mdot,charlon/mdot
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'django-easy-pjax', 'django-templatetag-handlebars', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], ) Remove unused modules from the dependency list.
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
<commit_before>import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'django-easy-pjax', 'django-templatetag-handlebars', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], ) <commit_msg>Remove unused modules from the dependency list.<commit_after>
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'django-easy-pjax', 'django-templatetag-handlebars', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], ) Remove unused modules from the dependency list.import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
<commit_before>import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'django-easy-pjax', 'django-templatetag-handlebars', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], ) <commit_msg>Remove unused modules from the dependency list.<commit_after>import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_package_data=True, install_requires=[ 'setuptools', 'django', 'django-compressor', 'django_mobileesp', 'uw-restclients', ], license='Apache License, Version 2.0', description='A Django app to ...', long_description=README, url='http://www.example.com/', author='Your Name', author_email='yourname@example.com', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], )
0751e67d5d7700e7280618ff2249e1573bc72144
setup.py
setup.py
#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read(), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), )
#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst'), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), )
Add History to the description.
Add History to the description.
Python
mit
Lukasa/collectr,Lukasa/collectr
#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read(), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), ) Add History to the description.
#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst'), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), )
<commit_before>#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read(), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), ) <commit_msg>Add History to the description.<commit_after>
#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst'), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), )
#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read(), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), ) Add History to the description.#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst'), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), )
<commit_before>#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read(), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), ) <commit_msg>Add History to the description.<commit_after>#! /usr/bin/env python import sys import os import re try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] in ('submit', 'publish'): os.system('python setup.py sdist upload') sys.exit() __version__ = '' with open('collectr/__init__.py', 'r') as fd: reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') for line in fd: m = reg.match(line) if m: __version__ = m.group(1) break packages = ['collectr'] setup( name='collectr', version=__version__, description='Static file management for everyone.', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst'), author='Cory Benfield', author_email='cory@lukasa.co.uk', url='http://www.lukasa.co.uk/', scripts=['scripts/collect_static'], packages=packages, package_data={'': ['LICENSE']}, package_dir={'collectr': 'collectr'}, include_package_data=True, install_requires=['boto'], license=open('LICENSE').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7' ), )
b74be667803abed58c08a298d5a806692d2fab74
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': setup( name='pytextql', version=get_version(), long_description=__doc__, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] )
#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': with open('README.md', 'rb') as readme: long_description = readme.read() setup( name='pytextql', version=get_version(), long_description=long_description, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] )
Use README.md for the long description.
Use README.md for the long description.
Python
mit
TkTech/pytextql
#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': setup( name='pytextql', version=get_version(), long_description=__doc__, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] ) Use README.md for the long description.
#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': with open('README.md', 'rb') as readme: long_description = readme.read() setup( name='pytextql', version=get_version(), long_description=long_description, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] )
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': setup( name='pytextql', version=get_version(), long_description=__doc__, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] ) <commit_msg>Use README.md for the long description.<commit_after>
#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': with open('README.md', 'rb') as readme: long_description = readme.read() setup( name='pytextql', version=get_version(), long_description=long_description, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] )
#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': setup( name='pytextql', version=get_version(), long_description=__doc__, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] ) Use README.md for the long description.#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': with open('README.md', 'rb') as readme: long_description = readme.read() setup( name='pytextql', version=get_version(), long_description=long_description, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] )
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': setup( name='pytextql', version=get_version(), long_description=__doc__, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] ) <commit_msg>Use README.md for the long description.<commit_after>#!/usr/bin/env python # -*- coding: utf8 -*- import os.path from setuptools import setup, find_packages def get_version(): """ Loads the current module version from version.py and returns it. :returns: module version identifier. :rtype: str """ local_results = {} version_file_path = os.path.join('pytextql', 'version.py') # This is compatible with py3k which removed execfile. with open(version_file_path, 'rb') as fin: # Compiling instead of passing the text straight to exec # associates any errors with the correct file name. code = compile(fin.read(), version_file_path, 'exec') exec(code, {}, local_results) return local_results['__version__'] if __name__ == '__main__': with open('README.md', 'rb') as readme: long_description = readme.read() setup( name='pytextql', version=get_version(), long_description=long_description, packages=find_packages(), include_package_data=True, install_requires=[ 'docopt' ], scripts=[ 'pytextql/pytextql' ] )
1303d1c14f7c3127b8fc87178f268d8b052ef503
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)', 'simplejson' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8', 'simplejson' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) )
#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) )
Remove declaration of dependency on simplejson
Remove declaration of dependency on simplejson
Python
mit
flaviogrossi/sockjs-cyclone
#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)', 'simplejson' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8', 'simplejson' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) ) Remove declaration of dependency on simplejson
#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) )
<commit_before>#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)', 'simplejson' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8', 'simplejson' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) ) <commit_msg>Remove declaration of dependency on simplejson<commit_after>
#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) )
#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)', 'simplejson' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8', 'simplejson' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) ) Remove declaration of dependency on simplejson#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) )
<commit_before>#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)', 'simplejson' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8', 'simplejson' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) ) <commit_msg>Remove declaration of dependency on simplejson<commit_after>#!/usr/bin/env python from distutils.core import setup def readfile(fname): with open(fname) as f: content = f.read() return content setup(name='sockjs-cyclone', version='1.0.2', author='Flavio Grossi', author_email='flaviogrossi@gmail.com', description='SockJS python server for the Cyclone Web Server', license=readfile('LICENSE'), long_description=readfile('README.rst'), keywords=[ 'sockjs', 'cyclone', 'web server', 'websocket' ], url='http://github.com/flaviogrossi/sockjs-cyclone/', packages=[ 'sockjs', 'sockjs.cyclone', 'sockjs.cyclone.transports' ], requires=[ 'twisted (>=12.0)', 'cyclone (>=1.0)' ], install_requires=[ 'twisted>=12.0', 'cyclone>=1.0-rc8' ], classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Framework :: Twisted', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: HTTP Servers', 'Topic :: Software Development :: Libraries :: Python Modules', ) )
d71a39e8721ff3764ac10dd368c9f00501290ea4
setup.py
setup.py
from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4<=4.3.2'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS)
from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS)
Remove restriction on old BeautifulSoup
Remove restriction on old BeautifulSoup
Python
mit
robjohncox/python-html-assert
from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4<=4.3.2'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS) Remove restriction on old BeautifulSoup
from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS)
<commit_before>from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4<=4.3.2'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS) <commit_msg>Remove restriction on old BeautifulSoup<commit_after>
from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS)
from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4<=4.3.2'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS) Remove restriction on old BeautifulSoupfrom setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS)
<commit_before>from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4<=4.3.2'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS) <commit_msg>Remove restriction on old BeautifulSoup<commit_after>from setuptools import find_packages, setup REQUIREMENTS = [ 'beautifulsoup4'] PACKAGES = [ 'pha'] CLASSIFIERS = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Testing', 'Topic :: Utilities'] setup( name='python-html-assert', version='0.2.1.1', packages=find_packages(), install_requires=REQUIREMENTS, author='Robert Cox', author_email='robjohncox@gmail.com', description='partial matching of html using a tree-based specification', license='MIT License', url='https://github.com/robjohncox/python-html-assert', classifiers=CLASSIFIERS)
41c5040795c036bdc64a796f97e2618edda2c534
setup.py
setup.py
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version, packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'License :: OSI Approved :: MIT License' ] )
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url=( 'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version ), packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', ] )
Document Python 2.6, Python 2.7, CPython support. Document beta status.
Document Python 2.6, Python 2.7, CPython support. Document beta status.
Python
mit
bitly/pynsq,goller/pynsq,nsqio/pynsq,jonmorehouse/pynsq,protoss-player/pynsq,jehiah/pynsq,mreiferson/pynsq,protoss-player/pynsq,virtuald/pynsq,mreiferson/pynsq,bitly/pynsq,jonmorehouse/pynsq,virtuald/pynsq
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version, packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'License :: OSI Approved :: MIT License' ] ) Document Python 2.6, Python 2.7, CPython support. Document beta status.
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url=( 'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version ), packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', ] )
<commit_before>from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version, packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'License :: OSI Approved :: MIT License' ] ) <commit_msg>Document Python 2.6, Python 2.7, CPython support. Document beta status.<commit_after>
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url=( 'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version ), packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', ] )
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version, packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'License :: OSI Approved :: MIT License' ] ) Document Python 2.6, Python 2.7, CPython support. Document beta status.from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url=( 'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version ), packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', ] )
<commit_before>from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version, packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'License :: OSI Approved :: MIT License' ] ) <commit_msg>Document Python 2.6, Python 2.7, CPython support. Document beta status.<commit_after>from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) # also update in nsq/version.py version = '0.6.5' setup( name='pynsq', version=version, description='official Python client library for NSQ', keywords='python nsq', author='Matt Reiferson', author_email='snakes@gmail.com', url='http://github.com/bitly/pynsq', download_url=( 'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version ), packages=['nsq'], requires=['tornado'], include_package_data=True, zip_safe=False, tests_require=['pytest', 'mock', 'tornado'], cmdclass={'test': PyTest}, classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: Implementation :: CPython', ] )
ed0e0db19c8bf14d5e58507234ad16497df7e79e
setup.py
setup.py
#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='ego.io', author='openego development group', description='ego input/output repository', packages=find_packages() )
#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='egoio', author='openego development group', description='ego input/output repository', packages=find_packages() )
Change name to make import feasible
Change name to make import feasible
Python
agpl-3.0
openego/ego.io,openego/ego.io
#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='ego.io', author='openego development group', description='ego input/output repository', packages=find_packages() )Change name to make import feasible
#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='egoio', author='openego development group', description='ego input/output repository', packages=find_packages() )
<commit_before>#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='ego.io', author='openego development group', description='ego input/output repository', packages=find_packages() )<commit_msg>Change name to make import feasible<commit_after>
#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='egoio', author='openego development group', description='ego input/output repository', packages=find_packages() )
#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='ego.io', author='openego development group', description='ego input/output repository', packages=find_packages() )Change name to make import feasible#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='egoio', author='openego development group', description='ego input/output repository', packages=find_packages() )
<commit_before>#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='ego.io', author='openego development group', description='ego input/output repository', packages=find_packages() )<commit_msg>Change name to make import feasible<commit_after>#! /usr/bin/env python # coding: utf-8 from setuptools import find_packages, setup setup(name='egoio', author='openego development group', description='ego input/output repository', packages=find_packages() )
6461a9205fa7bdafadba6e23129f3989a07c7683
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license=open('LICENSE.md').read(), description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) )
try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license="MIT License", description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) )
Change license info to show name of license, not license text.
Change license info to show name of license, not license text.
Python
mit
Floship/python-magento,DanielOaks/python-magento,voberoi/python-magento,bernieke/python-magento
try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license=open('LICENSE.md').read(), description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) ) Change license info to show name of license, not license text.
try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license="MIT License", description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) )
<commit_before>try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license=open('LICENSE.md').read(), description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) ) <commit_msg>Change license info to show name of license, not license text.<commit_after>
try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license="MIT License", description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) )
try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license=open('LICENSE.md').read(), description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) ) Change license info to show name of license, not license text.try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license="MIT License", description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) )
<commit_before>try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license=open('LICENSE.md').read(), description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) ) <commit_msg>Change license info to show name of license, not license text.<commit_after>try: from setuptools import setup except ImportError: from distutils.core import setup packages = ['magento'] requires = [] setup( name='python-magento', version='0.2.1', author='Vikram Oberoi', author_email='voberoi@gmail.com', packages=['magento'], install_requires=requires, entry_points={ 'console_scripts': [ 'magento-ipython-shell = magento.magento_ipython_shell:main' ] }, url='https://github.com/voberoi/python-magento', license="MIT License", description='A Python wrapper to Magento\'s XML-RPC API.', long_description=open('README.rst').read(), classifiers=( 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ) )
0d0201bc4f6c5164effd755300b98b8f86f1c541
setup.py
setup.py
from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], )
from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, setup_requires='numpy', install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], )
Deal with GPys numpy dependency
Deal with GPys numpy dependency
Python
mit
befelix/SafeOpt,befelix/SafeOpt
from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], ) Deal with GPys numpy dependency
from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, setup_requires='numpy', install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], )
<commit_before>from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], ) <commit_msg>Deal with GPys numpy dependency<commit_after>
from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, setup_requires='numpy', install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], )
from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], ) Deal with GPys numpy dependencyfrom setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, setup_requires='numpy', install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], )
<commit_before>from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], ) <commit_msg>Deal with GPys numpy dependency<commit_after>from setuptools import setup from os import path current_dir = path.abspath(path.dirname(__file__)) with open(path.join(current_dir, 'README.md'), 'r') as f: long_description = f.read() with open(path.join(current_dir, 'requirements.txt'), 'r') as f: install_requires = f.read().split('\n') setup( name='safeopt', version='0.1.1', author='Felix Berkenkamp', author_email='befelix@inf.ethz.ch', packages=['safeopt'], url='https://github.com/befelix/SafeOpt', license='MIT', description='Safe Bayesian optimization', long_description=long_description, setup_requires='numpy', install_requires=install_requires, keywords='Bayesian optimization, Safety', classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5'], )
ba4fe093399aa94ccfbf6d4b287f3230851df3fd
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5,<=1.6.2', 'django-easysettings', ], test_suite='tests.main', )
from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5', 'django-easysettings', ], test_suite='tests.main', )
Remove upper limit on Django version
Remove upper limit on Django version
Python
bsd-3-clause
mjschultz/django-password-policies,tarak/django-password-policies,mjschultz/django-password-policies,tarak/django-password-policies
from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5,<=1.6.2', 'django-easysettings', ], test_suite='tests.main', ) Remove upper limit on Django version
from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5', 'django-easysettings', ], test_suite='tests.main', )
<commit_before>from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5,<=1.6.2', 'django-easysettings', ], test_suite='tests.main', ) <commit_msg>Remove upper limit on Django version<commit_after>
from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5', 'django-easysettings', ], test_suite='tests.main', )
from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5,<=1.6.2', 'django-easysettings', ], test_suite='tests.main', ) Remove upper limit on Django versionfrom setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5', 'django-easysettings', ], test_suite='tests.main', )
<commit_before>from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5,<=1.6.2', 'django-easysettings', ], test_suite='tests.main', ) <commit_msg>Remove upper limit on Django version<commit_after>from setuptools import setup, find_packages setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A Django application to implent password policies.', long_description="""\ django-password-policies is an application for the Django framework that provides unicode-aware password policies on password changes and resets and a mechanism to force password changes. """, author='Tarak Blah', author_email='halbkarat@gmail.com', url='https://github.com/tarak/django-password-policies', include_package_data=True, packages=find_packages(), zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities' ], install_requires=['django>=1.5', 'django-easysettings', ], test_suite='tests.main', )
3dc525e109d5de1aacaf21c8ea1cdc1b627e206d
setup.py
setup.py
from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', install_requires = ['pytest==2.7.2'], keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], )
from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', download_url = 'https://github.com/shamrt/LCBOAPI/archive/v0.1.3.tar.gz', keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], )
Remove package requirements (for testing only); add download URL
Remove package requirements (for testing only); add download URL
Python
mit
shamrt/LCBOAPI
from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', install_requires = ['pytest==2.7.2'], keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], ) Remove package requirements (for testing only); add download URL
from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', download_url = 'https://github.com/shamrt/LCBOAPI/archive/v0.1.3.tar.gz', keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], )
<commit_before>from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', install_requires = ['pytest==2.7.2'], keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], ) <commit_msg>Remove package requirements (for testing only); add download URL<commit_after>
from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', download_url = 'https://github.com/shamrt/LCBOAPI/archive/v0.1.3.tar.gz', keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], )
from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', install_requires = ['pytest==2.7.2'], keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], ) Remove package requirements (for testing only); add download URLfrom distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', download_url = 'https://github.com/shamrt/LCBOAPI/archive/v0.1.3.tar.gz', keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], )
<commit_before>from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', install_requires = ['pytest==2.7.2'], keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], ) <commit_msg>Remove package requirements (for testing only); add download URL<commit_after>from distutils.core import setup long_description = open('README.rst').read() setup( name = 'lcboapi', packages = ['lcboapi'], version = '0.1.3', description = 'Python wrapper for the unofficial LCBO API', long_description = long_description, author = 'Shane Martin', author_email = 'dev.sh@nemart.in', license='MIT License', url = 'https://github.com/shamrt/LCBOAPI', download_url = 'https://github.com/shamrt/LCBOAPI/archive/v0.1.3.tar.gz', keywords = ['api', 'lcbo'], platforms = ['any'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', ], )
8da4e9015df3e0e8ca03c0261c05970294451421
setup.py
setup.py
# -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] })
# -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages # Dumb bug https://groups.google.com/forum/#!msg/nose-users/fnJ-kAUbYHQ/ngz3qjdnrioJ import multiprocessing setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] })
Work around a dumb nose bug
Work around a dumb nose bug
Python
bsd-3-clause
ieure/yar
# -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] }) Work around a dumb nose bug
# -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages # Dumb bug https://groups.google.com/forum/#!msg/nose-users/fnJ-kAUbYHQ/ngz3qjdnrioJ import multiprocessing setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] })
<commit_before># -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] }) <commit_msg>Work around a dumb nose bug<commit_after>
# -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages # Dumb bug https://groups.google.com/forum/#!msg/nose-users/fnJ-kAUbYHQ/ngz3qjdnrioJ import multiprocessing setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] })
# -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] }) Work around a dumb nose bug# -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages # Dumb bug https://groups.google.com/forum/#!msg/nose-users/fnJ-kAUbYHQ/ngz3qjdnrioJ import multiprocessing setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] })
<commit_before># -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] }) <commit_msg>Work around a dumb nose bug<commit_after># -*- coding: utf-8 -*- # # © 2014 Ian Eure # Author: Ian Eure # from setuptools import setup, find_packages # Dumb bug https://groups.google.com/forum/#!msg/nose-users/fnJ-kAUbYHQ/ngz3qjdnrioJ import multiprocessing setup(name="yar", version="0.0.2", packages=find_packages(), tests_require=['nose'], install_requires=["pyserial==2.7"], test_suite="nose.collector", entry_points = { 'console_scripts': [ 'yar = yar.cli:main' ] })
59a08fff34f095f601ced76cd7b2e27665824146
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='webracer', version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=['LICENSE', 'README.rst'], )
#!/usr/bin/env python from distutils.core import setup import os.path PACKAGE = "webracer" setup(name=PACKAGE, version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=[(os.path.join('share', 'doc', PACKAGE), ('LICENSE', 'README.rst'))], )
Put license and readme into share/doc/webracer rather than installation root
Put license and readme into share/doc/webracer rather than installation root
Python
bsd-2-clause
p/webracer
#!/usr/bin/env python from distutils.core import setup setup(name='webracer', version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=['LICENSE', 'README.rst'], ) Put license and readme into share/doc/webracer rather than installation root
#!/usr/bin/env python from distutils.core import setup import os.path PACKAGE = "webracer" setup(name=PACKAGE, version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=[(os.path.join('share', 'doc', PACKAGE), ('LICENSE', 'README.rst'))], )
<commit_before>#!/usr/bin/env python from distutils.core import setup setup(name='webracer', version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=['LICENSE', 'README.rst'], ) <commit_msg>Put license and readme into share/doc/webracer rather than installation root<commit_after>
#!/usr/bin/env python from distutils.core import setup import os.path PACKAGE = "webracer" setup(name=PACKAGE, version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=[(os.path.join('share', 'doc', PACKAGE), ('LICENSE', 'README.rst'))], )
#!/usr/bin/env python from distutils.core import setup setup(name='webracer', version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=['LICENSE', 'README.rst'], ) Put license and readme into share/doc/webracer rather than installation root#!/usr/bin/env python from distutils.core import setup import os.path PACKAGE = "webracer" setup(name=PACKAGE, version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=[(os.path.join('share', 'doc', PACKAGE), ('LICENSE', 'README.rst'))], )
<commit_before>#!/usr/bin/env python from distutils.core import setup setup(name='webracer', version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=['LICENSE', 'README.rst'], ) <commit_msg>Put license and readme into share/doc/webracer rather than installation root<commit_after>#!/usr/bin/env python from distutils.core import setup import os.path PACKAGE = "webracer" setup(name=PACKAGE, version='0.2.0', description='Comprehensive web application testing library', author='Oleg Pudeyev', author_email='oleg@bsdpower.com', url='http://github.com/p/webracer', packages=['webracer', 'webracer.utils'], data_files=[(os.path.join('share', 'doc', PACKAGE), ('LICENSE', 'README.rst'))], )
f823467e4ead01c774c0c8c177d23b0b89b2d5b0
setup.py
setup.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, json, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ] )
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, toml, json, json5, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ] )
Add json5 and toml to supported formats, add Python 3.5 to supported Python versions
Add json5 and toml to supported formats, add Python 3.5 to supported Python versions
Python
bsd-3-clause
bkabrda/anymarkup-core
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, json, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ] ) Add json5 and toml to supported formats, add Python 3.5 to supported Python versions
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, toml, json, json5, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ] )
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, json, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ] ) <commit_msg>Add json5 and toml to supported formats, add Python 3.5 to supported Python versions<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, toml, json, json5, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ] )
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, json, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ] ) Add json5 and toml to supported formats, add Python 3.5 to supported Python versions#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, toml, json, json5, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ] )
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, json, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ] ) <commit_msg>Add json5 and toml to supported formats, add Python 3.5 to supported Python versions<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='anymarkup-core', version='0.6.2', description='Core library for anymarkup', long_description=''.join(open('README.rst').readlines()), keywords='xml, yaml, toml, json, json5, ini', author='Slavek Kabrda', author_email='slavek.kabrda@gmail.com', url='https://github.com/bkabrda/anymarkup-core', license='BSD', packages=['anymarkup_core'], install_requires=open('requirements.txt').read().splitlines(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ] )
5fa6b78a9f0ac668d0ad8a0544bbe9f0784a5a19
setup.py
setup.py
from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-kickass-templatetags/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-templatetag-sugar/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
Update the URL for the move.
Update the URL for the move.
Python
bsd-3-clause
alex/django-templatetag-sugar,IRI-Research/django-templatetag-sugar
from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-kickass-templatetags/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] ) Update the URL for the move.
from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-templatetag-sugar/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
<commit_before>from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-kickass-templatetags/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] ) <commit_msg>Update the URL for the move.<commit_after>
from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-templatetag-sugar/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-kickass-templatetags/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] ) Update the URL for the move.from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-templatetag-sugar/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
<commit_before>from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-kickass-templatetags/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] ) <commit_msg>Update the URL for the move.<commit_after>from distutils.core import setup setup( name = "django-templatetag-sugar", version = __import__("templatetag_sugar").__version__, author = "Alex Gaynor", author_email = "alex.gaynor@gmail.com", description = "A library to make Django's template tags sweet.", long_description = open("README").read(), license = "BSD", url = "http://github.com/alex/django-templatetag-sugar/", packages = [ "templatetag_sugar", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
2dd974791de682fe80d7da98e81add9addd1033b
setup.py
setup.py
from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<4.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', )
from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<5.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', )
Update pyyaml requirement from <4.2,>=3.12 to >=3.12,<5.2
Update pyyaml requirement from <4.2,>=3.12 to >=3.12,<5.2 Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/3.12...5.1) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
Python
apache-2.0
zooniverse/panoptes-cli
from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<4.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', ) Update pyyaml requirement from <4.2,>=3.12 to >=3.12,<5.2 Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/3.12...5.1) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>
from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<5.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', )
<commit_before>from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<4.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', ) <commit_msg>Update pyyaml requirement from <4.2,>=3.12 to >=3.12,<5.2 Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/3.12...5.1) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com><commit_after>
from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<5.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', )
from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<4.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', ) Update pyyaml requirement from <4.2,>=3.12 to >=3.12,<5.2 Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/3.12...5.1) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com>from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<5.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', )
<commit_before>from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<4.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', ) <commit_msg>Update pyyaml requirement from <4.2,>=3.12 to >=3.12,<5.2 Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/3.12...5.1) Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@dependabot.com><commit_after>from setuptools import setup, find_packages setup( name='panoptescli', version='1.0.2', url='https://github.com/zooniverse/panoptes-cli', author='Adam McMaster', author_email='adam@zooniverse.org', description=( 'A command-line client for Panoptes, the API behind the Zooniverse' ), packages=find_packages(), include_package_data=True, install_requires=[ 'Click>=6.7,<6.8', 'PyYAML>=3.12,<5.2', 'panoptes-client>=1.0,<2.0', ], entry_points=''' [console_scripts] panoptes=panoptes_cli.scripts.panoptes:cli ''', )
0d5beefe5a03754d540abb7710ccb4415b9abedf
setup.py
setup.py
from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.10' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )
from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.11' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )
Set a timeout of 5 seconds
Set a timeout of 5 seconds
Python
mit
scragg0x/FFXI-Scraper
from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.10' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )Set a timeout of 5 seconds
from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.11' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )
<commit_before>from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.10' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )<commit_msg>Set a timeout of 5 seconds<commit_after>
from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.11' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )
from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.10' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )Set a timeout of 5 secondsfrom setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.11' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )
<commit_before>from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.10' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )<commit_msg>Set a timeout of 5 seconds<commit_after>from setuptools import setup, find_packages DESCRIPTION = "FFXI Linkshell Community Scraper" with open('README.md') as f: LONG_DESCRIPTION = f.read() with open('requirements.txt') as f: required = f.read().splitlines() VERSION = '0.1.11' CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ] setup(name='ffxiscraper', version=VERSION, packages=find_packages(), install_requires=required, scripts=['lscom'], author='Stanislav Vishnevskiy', author_email='vishnevskiy@gmail.com', maintainer='Matthew Scragg', maintainer_email='scragg@gmail.com', url='https://github.com/scragg0x/FFXI-Scraper', license='MIT', include_package_data=True, description=DESCRIPTION, long_description=LONG_DESCRIPTION, platforms=['any'], classifiers=CLASSIFIERS, #test_suite='tests', )
0370554fccdd5a2f6d6fefe86e82ba3a4857ecbb
setup.py
setup.py
from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.1", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', py_modules=['subredis'], install_requires=['elasticsearch>=1.6.0,<5.1'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] )
from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.2", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', install_requires=['elasticsearch>=1.6.0,<2.3'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] )
Revert dependencies for ES client
Revert dependencies for ES client
Python
apache-2.0
o19s/elyzer
from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.1", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', py_modules=['subredis'], install_requires=['elasticsearch>=1.6.0,<5.1'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] ) Revert dependencies for ES client
from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.2", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', install_requires=['elasticsearch>=1.6.0,<2.3'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] )
<commit_before>from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.1", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', py_modules=['subredis'], install_requires=['elasticsearch>=1.6.0,<5.1'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] ) <commit_msg>Revert dependencies for ES client<commit_after>
from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.2", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', install_requires=['elasticsearch>=1.6.0,<2.3'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] )
from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.1", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', py_modules=['subredis'], install_requires=['elasticsearch>=1.6.0,<5.1'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] ) Revert dependencies for ES clientfrom setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.2", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', install_requires=['elasticsearch>=1.6.0,<2.3'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] )
<commit_before>from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.1", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', py_modules=['subredis'], install_requires=['elasticsearch>=1.6.0,<5.1'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] ) <commit_msg>Revert dependencies for ES client<commit_after>from setuptools import setup try: from pypandoc import convert read_md = lambda f: convert(f, 'rst') except ImportError: print("warning: pypandoc module not found, could not convert Markdown to RST") read_md = lambda f: open(f, 'r').read() setup( name="elyzer", entry_points={ 'console_scripts': [ 'elyzer=elyzer.__main__:main' ] }, packages=['elyzer'], version="0.2.2", description="Step-by-Step Debug Elasticsearch Analyzers", long_description=read_md('README.md'), license="Apache", author="Doug Turnbull", author_email="dturnbull@o19s.com", url='https://github.com/o19s/elyzer', install_requires=['elasticsearch>=1.6.0,<2.3'], keywords=["elasticsearch", "database"], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Utilities' ] )
fbb675f33933c2dd06f9853b042aea9613a0d602
setup.py
setup.py
import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, )
import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) README = open(os.path.join(_here, 'README.txt'), 'r').read() setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", author_email='brian@vanguardistas.net', long_description=README, namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, )
Add contact information and readme in long description.
Add contact information and readme in long description.
Python
bsd-3-clause
jinty/van.contactology
import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, ) Add contact information and readme in long description.
import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) README = open(os.path.join(_here, 'README.txt'), 'r').read() setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", author_email='brian@vanguardistas.net', long_description=README, namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, )
<commit_before>import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, ) <commit_msg>Add contact information and readme in long description.<commit_after>
import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) README = open(os.path.join(_here, 'README.txt'), 'r').read() setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", author_email='brian@vanguardistas.net', long_description=README, namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, )
import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, ) Add contact information and readme in long description.import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) README = open(os.path.join(_here, 'README.txt'), 'r').read() setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", author_email='brian@vanguardistas.net', long_description=README, namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, )
<commit_before>import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, ) <commit_msg>Add contact information and readme in long description.<commit_after>import os import re from setuptools import setup, find_packages _here = os.path.dirname(__file__) _init = os.path.join(_here, 'van', 'contactology', '__init__.py') _init = open(_init, 'r').read() VERSION = re.search(r'^__version__ = "(.*)"', _init, re.MULTILINE).group(1) README = open(os.path.join(_here, 'README.txt'), 'r').read() setup(name="van.contactology", version=VERSION, packages=find_packages(), description="Contactology API for Twisted", author_email='brian@vanguardistas.net', long_description=README, namespace_packages=["van"], install_requires=[ 'pyOpenSSL', 'setuptools', 'Twisted', 'simplejson', ], test_suite="van.contactology.tests", tests_require=['mock'], include_package_data=True, zip_safe=False, )
d19472be5e3a920c41c33b52a4a43078cedcc26b
setup.py
setup.py
import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Programming Language :: Python', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
Update classifiers to show off supported python versions
Update classifiers to show off supported python versions
Python
apache-2.0
cloudify-cosmo/repex
import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Programming Language :: Python', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) Update classifiers to show off supported python versions
import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
<commit_before>import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Programming Language :: Python', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) <commit_msg>Update classifiers to show off supported python versions<commit_after>
import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Programming Language :: Python', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) Update classifiers to show off supported python versionsimport os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
<commit_before>import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Programming Language :: Python', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) <commit_msg>Update classifiers to show off supported python versions<commit_after>import os import codecs from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) def read(*parts): # intentionally *not* adding an encoding option to open return codecs.open(os.path.join(here, *parts), 'r').read() setup( name='repex', version="1.0.0", url='https://github.com/cloudify-cosmo/repex', author='Gigaspaces', author_email='cosmo-admin@gigaspaces.com', license='LICENSE', platforms='All', description='Replace Regular Expressions in files', long_description=read('README.rst'), py_modules=['repex'], entry_points={'console_scripts': ['rpx = repex:main']}, install_requires=[ "pyyaml==3.10", "click==6.6", ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Natural Language :: English', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Operating System :: Microsoft', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
fdb4a9acdc6f3df9912f76fa170508a71b35a2db
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', 'requests>=2.0.1', 'BeautifulSoup>=3.2.1', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', )
#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', )
Remove dependencies that Sentry has
Remove dependencies that Sentry has
Python
bsd-2-clause
bogdal/sentry-youtrack,bogdal/sentry-youtrack,bogdal/sentry-youtrack,bogdal/sentry-youtrack
#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', 'requests>=2.0.1', 'BeautifulSoup>=3.2.1', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', ) Remove dependencies that Sentry has
#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', )
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', 'requests>=2.0.1', 'BeautifulSoup>=3.2.1', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', ) <commit_msg>Remove dependencies that Sentry has<commit_after>
#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', )
#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', 'requests>=2.0.1', 'BeautifulSoup>=3.2.1', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', ) Remove dependencies that Sentry has#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', )
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', 'requests>=2.0.1', 'BeautifulSoup>=3.2.1', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', ) <commit_msg>Remove dependencies that Sentry has<commit_after>#!/usr/bin/env python from setuptools import setup, find_packages from sentry_youtrack import VERSION import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') install_requires = [ 'sentry>=6.1.0', ] setup( name='sentry-youtrack', version=VERSION, author='Adam Bogdal', author_email='adam@bogdal.pl', url='http://github.com/bogdal/sentry-youtrack', description='A Sentry extension which integrates with YouTrack', long_description=open('README.rst').read(), license='BSD', packages=find_packages(), install_requires=install_requires, include_package_data=True, zip_safe=False, entry_points={ 'sentry.apps': [ 'sentry_youtrack = sentry_youtrack', ], 'sentry.plugins': [ 'sentry_youtrack = sentry_youtrack.plugin:YouTrackPlugin' ], }, classifiers=[ 'Framework :: Django', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Programming Language :: Python', 'License :: OSI Approved :: BSD License', ], test_suite='sentry_youtrack.tests', )
1ca70dee87fbcbbbd6c267013c7be5f39999a6d9
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='BSD 2-clause (see LICENSE file)', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], )
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='2-clause BSD License', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], )
Use official OSI name in the license metadata
Use official OSI name in the license metadata This makes it easier for automatic license checkers to verify the license of this package. The license file is included in MANIFEST.in as is standard practice.
Python
bsd-2-clause
JohannesBuchner/imagehash,JohannesBuchner/imagehash
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='BSD 2-clause (see LICENSE file)', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], ) Use official OSI name in the license metadata This makes it easier for automatic license checkers to verify the license of this package. The license file is included in MANIFEST.in as is standard practice.
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='2-clause BSD License', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], )
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='BSD 2-clause (see LICENSE file)', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], ) <commit_msg>Use official OSI name in the license metadata This makes it easier for automatic license checkers to verify the license of this package. The license file is included in MANIFEST.in as is standard practice.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='2-clause BSD License', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], )
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='BSD 2-clause (see LICENSE file)', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], ) Use official OSI name in the license metadata This makes it easier for automatic license checkers to verify the license of this package. The license file is included in MANIFEST.in as is standard practice.#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='2-clause BSD License', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], )
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='BSD 2-clause (see LICENSE file)', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], ) <commit_msg>Use official OSI name in the license metadata This makes it easier for automatic license checkers to verify the license of this package. The license file is included in MANIFEST.in as is standard practice.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except: from distutils.core import setup long_description = "" with open('README.rst') as f: long_description = f.read() setup( name='ImageHash', version='4.2.1', author='Johannes Buchner', author_email='buchner.johannes@gmx.at', py_modules=['imagehash'], data_files=[('images', ['tests/data/imagehash.png'])], scripts=['find_similar_images.py'], url='https://github.com/JohannesBuchner/imagehash', license='2-clause BSD License', description='Image Hashing library', long_description=long_description, long_description_content_type='text/x-rst', install_requires=[ "six", "numpy", "scipy", # for phash "pillow", # or PIL "PyWavelets", # for whash ], test_suite='tests', tests_require=['pytest>=3'], )
85ccd327d085bc7822b53e9eec952cdbbf9caa12
setup.py
setup.py
from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), )
from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), include_package_data=True, )
Include data in release package
Include data in release package Closes #3
Python
mit
pydanny/django-tagging-ext
from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), ) Include data in release package Closes #3
from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), include_package_data=True, )
<commit_before>from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), ) <commit_msg>Include data in release package Closes #3<commit_after>
from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), include_package_data=True, )
from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), ) Include data in release package Closes #3from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), include_package_data=True, )
<commit_before>from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), ) <commit_msg>Include data in release package Closes #3<commit_after>from setuptools import setup, find_packages version = '0.3.2' setup( name='django-tagging-ext', version=version, description="Adds in new features to supplement django-tagging", long_description=open("README.rst").read(), classifiers=[ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Framework :: Django", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities", ], keywords='django,pinax', author='Daniel Greenfeld', author_email='pydanny@gmail.com', url='http://github.com/pydanny/django-tagging-ext', license='MIT', packages=find_packages(), include_package_data=True, )
7fbaf4f8b6a2a034f3fcac3e70c19712ecc77de4
setup.py
setup.py
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted>=13.1.0', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
Update Twisted requirement to add a minimum version.
Update Twisted requirement to add a minimum version.
Python
mit
jerith/txTwitter
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) Update Twisted requirement to add a minimum version.
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted>=13.1.0', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
<commit_before>import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) <commit_msg>Update Twisted requirement to add a minimum version.<commit_after>
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted>=13.1.0', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) Update Twisted requirement to add a minimum version.import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted>=13.1.0', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
<commit_before>import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], ) <commit_msg>Update Twisted requirement to add a minimum version.<commit_after>import os.path from setuptools import setup, find_packages def readme(): path = os.path.join(os.path.dirname(__file__), 'README.rst') return open(path, 'r').read() setup( name="txTwitter", version="0.1.1a", url='https://github.com/jerith/txTwitter', license='MIT', description="A Twisted-based client library for Twitter's API.", long_description=readme(), author='Jeremy Thurgood', author_email='firxen@gmail.com', packages=find_packages(), include_package_data=True, install_requires=['Twisted>=13.1.0', 'oauthlib', 'pyOpenSSL'], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Twisted', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
985df357ec039bcb28f6f260e64e9838204506f6
tasks.py
tasks.py
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) copytree(docs_build, target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www)
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) # TODO: make it easier to yank out this config val from the docs coll copytree('sites/docs/_build', target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www)
Fix dumb bug in release task
Fix dumb bug in release task
Python
lgpl-2.1
reaperhulk/paramiko,jaraco/paramiko,mirrorcoder/paramiko,dorianpula/paramiko,paramiko/paramiko,redixin/paramiko,SebastianDeiss/paramiko,ameily/paramiko
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) copytree(docs_build, target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www) Fix dumb bug in release task
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) # TODO: make it easier to yank out this config val from the docs coll copytree('sites/docs/_build', target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www)
<commit_before>from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) copytree(docs_build, target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www) <commit_msg>Fix dumb bug in release task<commit_after>
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) # TODO: make it easier to yank out this config val from the docs coll copytree('sites/docs/_build', target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www)
from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) copytree(docs_build, target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www) Fix dumb bug in release taskfrom os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) # TODO: make it easier to yank out this config val from the docs coll copytree('sites/docs/_build', target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www)
<commit_before>from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) copytree(docs_build, target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www) <commit_msg>Fix dumb bug in release task<commit_after>from os import mkdir from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task from invocations.docs import docs, www from invocations.packaging import publish # Until we move to spec-based testing @task def test(ctx, coverage=False): runner = "python" if coverage: runner = "coverage run --source=paramiko" flags = "--verbose" ctx.run("{0} test.py {1}".format(runner, flags), pty=True) @task def coverage(ctx): ctx.run("coverage run --source=paramiko test.py --verbose") # Until we stop bundling docs w/ releases. Need to discover use cases first. @task def release(ctx): # Build docs first. Use terribad workaround pending invoke #146 ctx.run("inv docs") # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) # TODO: make it easier to yank out this config val from the docs coll copytree('sites/docs/_build', target) # Publish publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") ns = Collection(test, coverage, release, docs, www)
3d09d6e5a8717c4dee9422b9d84a66319a9bdc01
tests.py
tests.py
import json import unittest from pyunio import pyunio import urllib pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urllib.urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main()
import json import unittest import sys if sys.version_info[0] == 2: from urllib import urlencode else: from urllib.parse import urlencode from pyunio import pyunio pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main()
Fix unittest failure in python 3.x.
Fix unittest failure in python 3.x.
Python
mit
citruspi/PyUnio
import json import unittest from pyunio import pyunio import urllib pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urllib.urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main() Fix unittest failure in python 3.x.
import json import unittest import sys if sys.version_info[0] == 2: from urllib import urlencode else: from urllib.parse import urlencode from pyunio import pyunio pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main()
<commit_before>import json import unittest from pyunio import pyunio import urllib pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urllib.urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main() <commit_msg>Fix unittest failure in python 3.x.<commit_after>
import json import unittest import sys if sys.version_info[0] == 2: from urllib import urlencode else: from urllib.parse import urlencode from pyunio import pyunio pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main()
import json import unittest from pyunio import pyunio import urllib pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urllib.urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main() Fix unittest failure in python 3.x.import json import unittest import sys if sys.version_info[0] == 2: from urllib import urlencode else: from urllib.parse import urlencode from pyunio import pyunio pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main()
<commit_before>import json import unittest from pyunio import pyunio import urllib pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urllib.urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main() <commit_msg>Fix unittest failure in python 3.x.<commit_after>import json import unittest import sys if sys.version_info[0] == 2: from urllib import urlencode else: from urllib.parse import urlencode from pyunio import pyunio pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } } class pyuniotTest(unittest.TestCase): def test_get(self): response = json.loads(pyunio.get('get', params_get).text) self.assertEqual(response['args']['name'], 'James Bond') def test_post(self): response = json.loads(pyunio.post('post', params_body).text) self.assertEqual(response['form']['name'],'James Bond') def test_put(self): response = json.loads(pyunio.put('put', params_body).text) self.assertEqual(response['form']['name'], 'James Bond') def test_delete(self): response = json.loads(pyunio.delete('delete', params_body).text) self.assertEqual(response['data'], urlencode({'name':'James Bond'})) if __name__ == '__main__': unittest.main()
d8d18b50c88e5099942cdb1545863585a8f141a6
top40.py
top40.py
#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts()
#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', type=click.IntRange(1, 40, clamp=True), default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts()
Implement range of possible values with clamping if values are outside range
Implement range of possible values with clamping if values are outside range
Python
mit
kevgathuku/top40,andela-kndungu/top40
#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts() Implement range of possible values with clamping if values are outside range
#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', type=click.IntRange(1, 40, clamp=True), default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts()
<commit_before>#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts() <commit_msg>Implement range of possible values with clamping if values are outside range<commit_after>
#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', type=click.IntRange(1, 40, clamp=True), default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts()
#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts() Implement range of possible values with clamping if values are outside range#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', type=click.IntRange(1, 40, clamp=True), default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts()
<commit_before>#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts() <commit_msg>Implement range of possible values with clamping if values are outside range<commit_after>#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests import requests_cache # Cache the API calls and expire after 12 hours requests_cache.install_cache(expire_after=43200) url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', type=click.IntRange(1, 40, clamp=True), default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 chart.""" response = requests.get(url).json() data = response['entries'][:count] for index, element in enumerate(data, start=1): click.echo( '{}. {} - {}'.format( index, element['title'], element['artist'].encode('utf-8', 'replace'))) if __name__ == '__main__': get_charts()
b8906e596193bcdc22d5cdd6b4ce57347e262621
fancypages/defaults.py
fancypages/defaults.py
########## INSTALLED APPS FANCYPAGES_REQUIRED_APPS = ( 'rest_framework', 'model_utils', 'south', 'compressor', 'twitter_tag', 'sorl.thumbnail', ) FANCYPAGES_APPS = ( 'fancypages', 'fancypages.api', 'fancypages.assets', 'fancypages.dashboard', ) ########## END INSTALLED APPS ########## COMPRESSOR SETTINGS # Compressor and pre-compiler settings for django-compressor COMPRESS_ENABLED = True COMPRESS_OFFLINE = False COMPRESS_OUTPUT_DIR = 'cache' COMPRESS_PRECOMPILERS = ( ('text/less', 'lessc {infile} {outfile}'), ) COMPRESS_JS_FILTERS = [ 'compressor.filters.jsmin.JSMinFilter', 'compressor.filters.template.TemplateFilter', ] ########## END COMPRESSOR SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS
########## FANCYPAGES SETTINGS FP_HOMEPAGE_NAME = 'Home' FP_DEFAULT_TEMPLATE = 'fancypages/pages/page.html' ########## END FANCYPAGES SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS
Clean up default FP settings
Clean up default FP settings
Python
bsd-3-clause
socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages
########## INSTALLED APPS FANCYPAGES_REQUIRED_APPS = ( 'rest_framework', 'model_utils', 'south', 'compressor', 'twitter_tag', 'sorl.thumbnail', ) FANCYPAGES_APPS = ( 'fancypages', 'fancypages.api', 'fancypages.assets', 'fancypages.dashboard', ) ########## END INSTALLED APPS ########## COMPRESSOR SETTINGS # Compressor and pre-compiler settings for django-compressor COMPRESS_ENABLED = True COMPRESS_OFFLINE = False COMPRESS_OUTPUT_DIR = 'cache' COMPRESS_PRECOMPILERS = ( ('text/less', 'lessc {infile} {outfile}'), ) COMPRESS_JS_FILTERS = [ 'compressor.filters.jsmin.JSMinFilter', 'compressor.filters.template.TemplateFilter', ] ########## END COMPRESSOR SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS Clean up default FP settings
########## FANCYPAGES SETTINGS FP_HOMEPAGE_NAME = 'Home' FP_DEFAULT_TEMPLATE = 'fancypages/pages/page.html' ########## END FANCYPAGES SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS
<commit_before>########## INSTALLED APPS FANCYPAGES_REQUIRED_APPS = ( 'rest_framework', 'model_utils', 'south', 'compressor', 'twitter_tag', 'sorl.thumbnail', ) FANCYPAGES_APPS = ( 'fancypages', 'fancypages.api', 'fancypages.assets', 'fancypages.dashboard', ) ########## END INSTALLED APPS ########## COMPRESSOR SETTINGS # Compressor and pre-compiler settings for django-compressor COMPRESS_ENABLED = True COMPRESS_OFFLINE = False COMPRESS_OUTPUT_DIR = 'cache' COMPRESS_PRECOMPILERS = ( ('text/less', 'lessc {infile} {outfile}'), ) COMPRESS_JS_FILTERS = [ 'compressor.filters.jsmin.JSMinFilter', 'compressor.filters.template.TemplateFilter', ] ########## END COMPRESSOR SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS <commit_msg>Clean up default FP settings<commit_after>
########## FANCYPAGES SETTINGS FP_HOMEPAGE_NAME = 'Home' FP_DEFAULT_TEMPLATE = 'fancypages/pages/page.html' ########## END FANCYPAGES SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS
########## INSTALLED APPS FANCYPAGES_REQUIRED_APPS = ( 'rest_framework', 'model_utils', 'south', 'compressor', 'twitter_tag', 'sorl.thumbnail', ) FANCYPAGES_APPS = ( 'fancypages', 'fancypages.api', 'fancypages.assets', 'fancypages.dashboard', ) ########## END INSTALLED APPS ########## COMPRESSOR SETTINGS # Compressor and pre-compiler settings for django-compressor COMPRESS_ENABLED = True COMPRESS_OFFLINE = False COMPRESS_OUTPUT_DIR = 'cache' COMPRESS_PRECOMPILERS = ( ('text/less', 'lessc {infile} {outfile}'), ) COMPRESS_JS_FILTERS = [ 'compressor.filters.jsmin.JSMinFilter', 'compressor.filters.template.TemplateFilter', ] ########## END COMPRESSOR SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS Clean up default FP settings########## FANCYPAGES SETTINGS FP_HOMEPAGE_NAME = 'Home' FP_DEFAULT_TEMPLATE = 'fancypages/pages/page.html' ########## END FANCYPAGES SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS
<commit_before>########## INSTALLED APPS FANCYPAGES_REQUIRED_APPS = ( 'rest_framework', 'model_utils', 'south', 'compressor', 'twitter_tag', 'sorl.thumbnail', ) FANCYPAGES_APPS = ( 'fancypages', 'fancypages.api', 'fancypages.assets', 'fancypages.dashboard', ) ########## END INSTALLED APPS ########## COMPRESSOR SETTINGS # Compressor and pre-compiler settings for django-compressor COMPRESS_ENABLED = True COMPRESS_OFFLINE = False COMPRESS_OUTPUT_DIR = 'cache' COMPRESS_PRECOMPILERS = ( ('text/less', 'lessc {infile} {outfile}'), ) COMPRESS_JS_FILTERS = [ 'compressor.filters.jsmin.JSMinFilter', 'compressor.filters.template.TemplateFilter', ] ########## END COMPRESSOR SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS <commit_msg>Clean up default FP settings<commit_after>########## FANCYPAGES SETTINGS FP_HOMEPAGE_NAME = 'Home' FP_DEFAULT_TEMPLATE = 'fancypages/pages/page.html' ########## END FANCYPAGES SETTINGS ########## TWITTER TAG SETTINGS TWITTER_OAUTH_TOKEN = '' TWITTER_OAUTH_SECRET = '' TWITTER_CONSUMER_KEY = '' TWITTER_CONSUMER_SECRET = '' ########## END TWITTER TAG SETTINGS
d2b0aba3e13246193f37758e23f4d26b90552508
social_auth/middleware.py
social_auth/middleware.py
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.AUTH_BACKEND.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL
Correct access of backend name from AuthException
Correct access of backend name from AuthException
Python
bsd-3-clause
omab/django-social-auth,duoduo369/django-social-auth,MjAbuz/django-social-auth,beswarm/django-social-auth,getsentry/django-social-auth,omab/django-social-auth,lovehhf/django-social-auth,sk7/django-social-auth,WW-Digital/django-social-auth,qas612820704/django-social-auth,caktus/django-social-auth,gustavoam/django-social-auth,mayankcu/Django-social,vuchau/django-social-auth,caktus/django-social-auth,limdauto/django-social-auth,vuchau/django-social-auth,VishvajitP/django-social-auth,qas612820704/django-social-auth,dongguangming/django-social-auth,VishvajitP/django-social-auth,adw0rd/django-social-auth,MjAbuz/django-social-auth,dongguangming/django-social-auth,gustavoam/django-social-auth,krvss/django-social-auth,lovehhf/django-social-auth,michael-borisov/django-social-auth,michael-borisov/django-social-auth,vxvinh1511/django-social-auth,beswarm/django-social-auth,limdauto/django-social-auth,vxvinh1511/django-social-auth
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.AUTH_BACKEND.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL Correct access of backend name from AuthException
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL
<commit_before># -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.AUTH_BACKEND.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL <commit_msg>Correct access of backend name from AuthException<commit_after>
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.AUTH_BACKEND.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL Correct access of backend name from AuthException# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL
<commit_before># -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.AUTH_BACKEND.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL <commit_msg>Correct access of backend name from AuthException<commit_after># -*- coding: utf-8 -*- from django.conf import settings from django.contrib import messages from django.shortcuts import redirect from social_auth.backends.exceptions import AuthException class SocialAuthExceptionMiddleware(object): """Middleware that handles Social Auth AuthExceptions by providing the user with a message, logging an error, and redirecting to some next location. By default, the exception message itself is sent to the user and they are redirected to the location specified in the LOGIN_ERROR_URL setting. This middleware can be extended by overriding the get_message or get_redirect_uri methods, which each accept request and exception. """ def process_exception(self, request, exception): if isinstance(exception, AuthException): backend_name = exception.backend.name message = self.get_message(request, exception) messages.error(request, message, extra_tags=u'social-auth {0}'.format(backend_name)) url = self.get_redirect_uri(request, exception) return redirect(url) def get_message(self, request, exception): return unicode(exception) def get_redirect_uri(self, request, exception): return settings.LOGIN_ERROR_URL
e608f1caad945e45a815d8ff37aa12bee41219ca
swf/__init__.py
swf/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 26) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version))
#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 27) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version))
Update : bump version 0.1.27
Update : bump version 0.1.27
Python
mit
botify-labs/python-simple-workflow,botify-labs/python-simple-workflow
#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 26) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version)) Update : bump version 0.1.27
#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 27) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version))
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 26) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version)) <commit_msg>Update : bump version 0.1.27<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 27) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version))
#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 26) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version)) Update : bump version 0.1.27#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 27) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version))
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 26) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version)) <commit_msg>Update : bump version 0.1.27<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- version = (0, 1, 27) __title__ = "python-simple-workflow" __author__ = "Oleiade" __license__ = "MIT" __version__ = '.'.join(map(str, version))
e6af345239f2778a2245d9f8be54bf754224aafd
tests/helper.py
tests/helper.py
def mock_api(path, file_path): from httmock import urlmatch, response @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock
def mock_api(path, file_path, query = None, data = None): from httmock import urlmatch, response import json @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): assert query is None or url.query == query assert data is None or json.loads(request.body) == data from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock
Add assertion for query and data of request
Add assertion for query and data of request
Python
mit
yamaneko1212/webpay-python
def mock_api(path, file_path): from httmock import urlmatch, response @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock Add assertion for query and data of request
def mock_api(path, file_path, query = None, data = None): from httmock import urlmatch, response import json @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): assert query is None or url.query == query assert data is None or json.loads(request.body) == data from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock
<commit_before>def mock_api(path, file_path): from httmock import urlmatch, response @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock <commit_msg>Add assertion for query and data of request<commit_after>
def mock_api(path, file_path, query = None, data = None): from httmock import urlmatch, response import json @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): assert query is None or url.query == query assert data is None or json.loads(request.body) == data from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock
def mock_api(path, file_path): from httmock import urlmatch, response @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock Add assertion for query and data of requestdef mock_api(path, file_path, query = None, data = None): from httmock import urlmatch, response import json @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): assert query is None or url.query == query assert data is None or json.loads(request.body) == data from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock
<commit_before>def mock_api(path, file_path): from httmock import urlmatch, response @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock <commit_msg>Add assertion for query and data of request<commit_after>def mock_api(path, file_path, query = None, data = None): from httmock import urlmatch, response import json @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path) def webpay_api_mock(url, request): assert query is None or url.query == query assert data is None or json.loads(request.body) == data from os import path import codecs dump = path.dirname(path.abspath(__file__)) + '/mock/' + file_path file = codecs.open(dump, 'r', 'utf-8') lines = file.readlines() file.close status = 0 headers = {} body = '' body_started = False for i in range(len(lines)): line = lines[i] if i == 0: status = int(line.split(' ')[1]) elif body_started: body += line elif (line.strip() == ''): body_started = True else: key, value = line.split(':', 1) headers[key] = value.strip() return response(status, content = body.encode('utf-8'), headers = headers, request = request) return webpay_api_mock
05c4545c9165b7942a33956f055a320385fa5750
plugins/Tools/RotateTool/RotateToolHandle.py
plugins/Tools/RotateTool/RotateToolHandle.py
from UM.Scene.ToolHandle import ToolHandle from UM.Mesh.MeshData import MeshData from UM.Mesh.MeshBuilder import MeshBuilder from UM.Math.Vector import Vector class RotateToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) mb = MeshBuilder() mb.addArc( radius = 20, axis = Vector.Unit_X, color = ToolHandle.XAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Y, color = ToolHandle.YAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Z, color = ToolHandle.ZAxisColor ) self.setLineMesh(mb.getData())
Implement proper rotation tool handles
Implement proper rotation tool handles
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
Implement proper rotation tool handles
from UM.Scene.ToolHandle import ToolHandle from UM.Mesh.MeshData import MeshData from UM.Mesh.MeshBuilder import MeshBuilder from UM.Math.Vector import Vector class RotateToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) mb = MeshBuilder() mb.addArc( radius = 20, axis = Vector.Unit_X, color = ToolHandle.XAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Y, color = ToolHandle.YAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Z, color = ToolHandle.ZAxisColor ) self.setLineMesh(mb.getData())
<commit_before> <commit_msg>Implement proper rotation tool handles<commit_after>
from UM.Scene.ToolHandle import ToolHandle from UM.Mesh.MeshData import MeshData from UM.Mesh.MeshBuilder import MeshBuilder from UM.Math.Vector import Vector class RotateToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) mb = MeshBuilder() mb.addArc( radius = 20, axis = Vector.Unit_X, color = ToolHandle.XAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Y, color = ToolHandle.YAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Z, color = ToolHandle.ZAxisColor ) self.setLineMesh(mb.getData())
Implement proper rotation tool handlesfrom UM.Scene.ToolHandle import ToolHandle from UM.Mesh.MeshData import MeshData from UM.Mesh.MeshBuilder import MeshBuilder from UM.Math.Vector import Vector class RotateToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) mb = MeshBuilder() mb.addArc( radius = 20, axis = Vector.Unit_X, color = ToolHandle.XAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Y, color = ToolHandle.YAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Z, color = ToolHandle.ZAxisColor ) self.setLineMesh(mb.getData())
<commit_before> <commit_msg>Implement proper rotation tool handles<commit_after>from UM.Scene.ToolHandle import ToolHandle from UM.Mesh.MeshData import MeshData from UM.Mesh.MeshBuilder import MeshBuilder from UM.Math.Vector import Vector class RotateToolHandle(ToolHandle): def __init__(self, parent = None): super().__init__(parent) mb = MeshBuilder() mb.addArc( radius = 20, axis = Vector.Unit_X, color = ToolHandle.XAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Y, color = ToolHandle.YAxisColor ) mb.addArc( radius = 20, axis = Vector.Unit_Z, color = ToolHandle.ZAxisColor ) self.setLineMesh(mb.getData())
3afee3ae9bc791b0b3ae084f4e53950ec1e32f48
apps/news/models.py
apps/news/models.py
from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) datetime = models.DateTimeField() projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title
from datetime import datetime as dt from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): class Meta: ordering = ('-date_and_time',) title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) date_and_time = models.DateTimeField(default=dt.now()) projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title
Change field name from datetime to date_and_time for avoid problems with datetime python's module
Change field name from datetime to date_and_time for avoid problems with datetime python's module
Python
mit
nsi-iff/nsi_site,nsi-iff/nsi_site,nsi-iff/nsi_site
from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) datetime = models.DateTimeField() projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title Change field name from datetime to date_and_time for avoid problems with datetime python's module
from datetime import datetime as dt from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): class Meta: ordering = ('-date_and_time',) title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) date_and_time = models.DateTimeField(default=dt.now()) projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title
<commit_before>from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) datetime = models.DateTimeField() projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title <commit_msg>Change field name from datetime to date_and_time for avoid problems with datetime python's module<commit_after>
from datetime import datetime as dt from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): class Meta: ordering = ('-date_and_time',) title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) date_and_time = models.DateTimeField(default=dt.now()) projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title
from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) datetime = models.DateTimeField() projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title Change field name from datetime to date_and_time for avoid problems with datetime python's modulefrom datetime import datetime as dt from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): class Meta: ordering = ('-date_and_time',) title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) date_and_time = models.DateTimeField(default=dt.now()) projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title
<commit_before>from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) datetime = models.DateTimeField() projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title <commit_msg>Change field name from datetime to date_and_time for avoid problems with datetime python's module<commit_after>from datetime import datetime as dt from django.db import models from django.contrib.auth.models import User from thumbs import ImageWithThumbsField from apps.projects.models import Project class News(models.Model): class Meta: ordering = ('-date_and_time',) title = models.CharField(max_length=200) summary = models.CharField(max_length=200, null=True, blank=True) body = models.TextField() image = ImageWithThumbsField(null=True, blank=True, upload_to='images/news', sizes=((300, 300), (90, 90), )) author = models.ForeignKey(User) date_and_time = models.DateTimeField(default=dt.now()) projects_relateds = models.ManyToManyField(Project, null=True, blank=True) class Meta: verbose_name_plural = 'News' def __unicode__(self): return self.title
0eb7e39c726ced0e802de925c7ce3b3ec35c61d9
src/billing/factories.py
src/billing/factories.py
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123} class BillingOrder(factory.DjangoModelFactory): billing_id = BillingFactory().id order_id = OrderFactory()
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123}
Remove a BillingOrder factory class that wasn't use
Remove a BillingOrder factory class that wasn't use There was a problem with this class... but since I couldn't find code using it, I simply deleted it.
Python
agpl-3.0
savoirfairelinux/santropol-feast,madmath/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,savoirfairelinux/sous-chef,madmath/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef,savoirfairelinux/sous-chef
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123} class BillingOrder(factory.DjangoModelFactory): billing_id = BillingFactory().id order_id = OrderFactory() Remove a BillingOrder factory class that wasn't use There was a problem with this class... but since I couldn't find code using it, I simply deleted it.
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123}
<commit_before>import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123} class BillingOrder(factory.DjangoModelFactory): billing_id = BillingFactory().id order_id = OrderFactory() <commit_msg>Remove a BillingOrder factory class that wasn't use There was a problem with this class... but since I couldn't find code using it, I simply deleted it.<commit_after>
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123}
import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123} class BillingOrder(factory.DjangoModelFactory): billing_id = BillingFactory().id order_id = OrderFactory() Remove a BillingOrder factory class that wasn't use There was a problem with this class... but since I couldn't find code using it, I simply deleted it.import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123}
<commit_before>import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123} class BillingOrder(factory.DjangoModelFactory): billing_id = BillingFactory().id order_id = OrderFactory() <commit_msg>Remove a BillingOrder factory class that wasn't use There was a problem with this class... but since I couldn't find code using it, I simply deleted it.<commit_after>import factory import random from billing.models import Billing, OrderBilling from member.factories import ClientFactory from order.factories import OrderFactory class BillingFactory(factory.DjangoModelFactory): class Meta: model = Billing client = factory.SubFactory(ClientFactory) total_amount = random.randrange(1, stop=75, step=1) billing_month = random.randrange(1, stop=12, step=1) billing_year = random.randrange(2016, stop=2020, step=1) detail = {"123": 123}
ce7e9b95a9faef242b66e9c551861986f311cdee
guardian/management/commands/clean_orphan_obj_perms.py
guardian/management/commands/clean_orphan_obj_perms.py
from __future__ import unicode_literals from django.core.management.base import NoArgsCommand from guardian.utils import clean_orphan_obj_perms class Command(NoArgsCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle_noargs(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed)
from __future__ import unicode_literals from django.core.management.base import BaseCommand from guardian.utils import clean_orphan_obj_perms class Command(BaseCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed)
Drop django.core.management.base.NoArgsCommand (django 1.10 compat)
Drop django.core.management.base.NoArgsCommand (django 1.10 compat) See https://github.com/django/django/blob/stable/1.9.x/django/core/management/base.py#L574-L578
Python
bsd-2-clause
rmgorman/django-guardian,lukaszb/django-guardian,benkonrath/django-guardian,rmgorman/django-guardian,lukaszb/django-guardian,lukaszb/django-guardian,benkonrath/django-guardian,rmgorman/django-guardian,benkonrath/django-guardian
from __future__ import unicode_literals from django.core.management.base import NoArgsCommand from guardian.utils import clean_orphan_obj_perms class Command(NoArgsCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle_noargs(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed) Drop django.core.management.base.NoArgsCommand (django 1.10 compat) See https://github.com/django/django/blob/stable/1.9.x/django/core/management/base.py#L574-L578
from __future__ import unicode_literals from django.core.management.base import BaseCommand from guardian.utils import clean_orphan_obj_perms class Command(BaseCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed)
<commit_before>from __future__ import unicode_literals from django.core.management.base import NoArgsCommand from guardian.utils import clean_orphan_obj_perms class Command(NoArgsCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle_noargs(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed) <commit_msg>Drop django.core.management.base.NoArgsCommand (django 1.10 compat) See https://github.com/django/django/blob/stable/1.9.x/django/core/management/base.py#L574-L578<commit_after>
from __future__ import unicode_literals from django.core.management.base import BaseCommand from guardian.utils import clean_orphan_obj_perms class Command(BaseCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed)
from __future__ import unicode_literals from django.core.management.base import NoArgsCommand from guardian.utils import clean_orphan_obj_perms class Command(NoArgsCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle_noargs(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed) Drop django.core.management.base.NoArgsCommand (django 1.10 compat) See https://github.com/django/django/blob/stable/1.9.x/django/core/management/base.py#L574-L578from __future__ import unicode_literals from django.core.management.base import BaseCommand from guardian.utils import clean_orphan_obj_perms class Command(BaseCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed)
<commit_before>from __future__ import unicode_literals from django.core.management.base import NoArgsCommand from guardian.utils import clean_orphan_obj_perms class Command(NoArgsCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle_noargs(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed) <commit_msg>Drop django.core.management.base.NoArgsCommand (django 1.10 compat) See https://github.com/django/django/blob/stable/1.9.x/django/core/management/base.py#L574-L578<commit_after>from __future__ import unicode_literals from django.core.management.base import BaseCommand from guardian.utils import clean_orphan_obj_perms class Command(BaseCommand): """ clean_orphan_obj_perms command is a tiny wrapper around :func:`guardian.utils.clean_orphan_obj_perms`. Usage:: $ python manage.py clean_orphan_obj_perms Removed 11 object permission entries with no targets """ help = "Removes object permissions with not existing targets" def handle(self, **options): removed = clean_orphan_obj_perms() if options['verbosity'] > 0: print("Removed %d object permission entries with no targets" % removed)
2404e11c06418cc72b1a486d7d62d9d719cfe263
regression/tests/studio/test_studio_login.py
regression/tests/studio/test_studio_login.py
""" End to end tests for Studio Login """ import os from flaky import flaky from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) @flaky # TODO: See https://openedx.atlassian.net/browse/LT-65 def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page()
""" End to end tests for Studio Login """ import os from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page()
Fix flaky logout on FF 45
Fix flaky logout on FF 45
Python
agpl-3.0
edx/edx-e2e-tests,edx/edx-e2e-tests
""" End to end tests for Studio Login """ import os from flaky import flaky from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) @flaky # TODO: See https://openedx.atlassian.net/browse/LT-65 def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page() Fix flaky logout on FF 45
""" End to end tests for Studio Login """ import os from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page()
<commit_before>""" End to end tests for Studio Login """ import os from flaky import flaky from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) @flaky # TODO: See https://openedx.atlassian.net/browse/LT-65 def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page() <commit_msg>Fix flaky logout on FF 45<commit_after>
""" End to end tests for Studio Login """ import os from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page()
""" End to end tests for Studio Login """ import os from flaky import flaky from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) @flaky # TODO: See https://openedx.atlassian.net/browse/LT-65 def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page() Fix flaky logout on FF 45""" End to end tests for Studio Login """ import os from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page()
<commit_before>""" End to end tests for Studio Login """ import os from flaky import flaky from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) @flaky # TODO: See https://openedx.atlassian.net/browse/LT-65 def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page() <commit_msg>Fix flaky logout on FF 45<commit_after>""" End to end tests for Studio Login """ import os from bok_choy.web_app_test import WebAppTest from regression.pages.studio.studio_home import DashboardPageExtended from regression.pages.studio.login_studio import StudioLogin from regression.pages.studio.logout_studio import StudioLogout class StudioUserLogin(WebAppTest): """ Test for logging in and out to Studio """ DEMO_COURSE_USER = os.environ.get('USER_LOGIN_EMAIL') DEMO_COURSE_PASSWORD = os.environ.get('USER_LOGIN_PASSWORD') def setUp(self): """ Initialize the page object """ super(StudioUserLogin, self).setUp() self.studio_login_page = StudioLogin(self.browser) self.studio_home_page = DashboardPageExtended(self.browser) self.studio_logout_page = StudioLogout(self.browser) def test_studio_login_logout(self): """ Verifies that user can login and logout successfully """ self.studio_login_page.visit() self.studio_login_page.login(self.DEMO_COURSE_USER, self.DEMO_COURSE_PASSWORD) self.studio_home_page.wait_for_page() self.studio_home_page.click_logout_button() self.studio_logout_page.wait_for_page()
359a80897decd64a0d997005dc7cb731fc294133
setuptools/tests/test_build_ext.py
setuptools/tests/test_build_ext.py
"""build_ext tests """ import unittest import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExtTest(unittest.TestCase): def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted
"""build_ext tests """ import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExt: def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted
Use pytest for test discovery in build_ext
Use pytest for test discovery in build_ext
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
"""build_ext tests """ import unittest import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExtTest(unittest.TestCase): def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted Use pytest for test discovery in build_ext
"""build_ext tests """ import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExt: def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted
<commit_before>"""build_ext tests """ import unittest import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExtTest(unittest.TestCase): def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted <commit_msg>Use pytest for test discovery in build_ext<commit_after>
"""build_ext tests """ import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExt: def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted
"""build_ext tests """ import unittest import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExtTest(unittest.TestCase): def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted Use pytest for test discovery in build_ext"""build_ext tests """ import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExt: def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted
<commit_before>"""build_ext tests """ import unittest import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExtTest(unittest.TestCase): def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted <commit_msg>Use pytest for test discovery in build_ext<commit_after>"""build_ext tests """ import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExt: def test_get_ext_filename(self): """ Setuptools needs to give back the same result as distutils, even if the fullname is not in ext_map. """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted
e1b5ba70938decbebdc2c4115f2b27b1b8f45ecf
python/mms/__init__.py
python/mms/__init__.py
try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import matplotlib except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot
try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import os import matplotlib if not os.getenv('DISPLAY', False): matplotlib.use('Agg') except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot
Support offscreen matplotlib plots in mms module
Support offscreen matplotlib plots in mms module (refs #13181)
Python
lgpl-2.1
lindsayad/moose,lindsayad/moose,andrsd/moose,jessecarterMOOSE/moose,harterj/moose,bwspenc/moose,permcody/moose,sapitts/moose,SudiptaBiswas/moose,dschwen/moose,sapitts/moose,lindsayad/moose,jessecarterMOOSE/moose,permcody/moose,SudiptaBiswas/moose,milljm/moose,lindsayad/moose,idaholab/moose,jessecarterMOOSE/moose,idaholab/moose,laagesen/moose,andrsd/moose,laagesen/moose,bwspenc/moose,permcody/moose,bwspenc/moose,jessecarterMOOSE/moose,laagesen/moose,andrsd/moose,YaqiWang/moose,laagesen/moose,sapitts/moose,permcody/moose,nuclear-wizard/moose,bwspenc/moose,sapitts/moose,milljm/moose,lindsayad/moose,nuclear-wizard/moose,nuclear-wizard/moose,harterj/moose,YaqiWang/moose,andrsd/moose,harterj/moose,dschwen/moose,andrsd/moose,sapitts/moose,SudiptaBiswas/moose,SudiptaBiswas/moose,milljm/moose,dschwen/moose,harterj/moose,jessecarterMOOSE/moose,dschwen/moose,idaholab/moose,milljm/moose,nuclear-wizard/moose,harterj/moose,bwspenc/moose,laagesen/moose,idaholab/moose,idaholab/moose,YaqiWang/moose,milljm/moose,dschwen/moose,SudiptaBiswas/moose,YaqiWang/moose
try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import matplotlib except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot Support offscreen matplotlib plots in mms module (refs #13181)
try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import os import matplotlib if not os.getenv('DISPLAY', False): matplotlib.use('Agg') except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot
<commit_before>try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import matplotlib except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot <commit_msg>Support offscreen matplotlib plots in mms module (refs #13181)<commit_after>
try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import os import matplotlib if not os.getenv('DISPLAY', False): matplotlib.use('Agg') except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot
try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import matplotlib except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot Support offscreen matplotlib plots in mms module (refs #13181)try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import os import matplotlib if not os.getenv('DISPLAY', False): matplotlib.use('Agg') except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot
<commit_before>try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import matplotlib except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot <commit_msg>Support offscreen matplotlib plots in mms module (refs #13181)<commit_after>try: import sympy except ImportError: print("The 'mms' package requires sympy, it can be installed by running " \ "`pip install sympy --user`.") else: from fparser import FParserPrinter, fparser, print_fparser, build_hit, print_hit from moosefunction import MooseFunctionPrinter, moosefunction, print_moose from evaluate import evaluate from runner import run_spatial, run_temporal try: import os import matplotlib if not os.getenv('DISPLAY', False): matplotlib.use('Agg') except ImportError: print("The 'mms' package requires matplotlib, it can be installed by running " \ "`pip install matplotlib --user`.") else: from ConvergencePlot import ConvergencePlot
59366a538564d8b1a756054b4c24c5d5a5fc2ae3
frigg/decorators.py
frigg/decorators.py
# -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden return _wrapped_view
# -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden() return _wrapped_view
Fix typo in token decorator
Fix typo in token decorator
Python
mit
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
# -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden return _wrapped_view Fix typo in token decorator
# -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden() return _wrapped_view
<commit_before># -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden return _wrapped_view <commit_msg>Fix typo in token decorator<commit_after>
# -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden() return _wrapped_view
# -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden return _wrapped_view Fix typo in token decorator# -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden() return _wrapped_view
<commit_before># -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden return _wrapped_view <commit_msg>Fix typo in token decorator<commit_after># -*- coding: utf8 -*- from functools import wraps from django.conf import settings from django.http import HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt def token_required(view_func): @csrf_exempt @wraps(view_func) def _wrapped_view(request, *args, **kwargs): token = request.META.get('HTTP_FRIGG_WORKER_TOKEN') if token: if token in getattr(settings, 'FRIGG_WORKER_TOKENS', []): return view_func(request, *args, **kwargs) return HttpResponseForbidden() return _wrapped_view
8f9615ebd7ae4802b1e44d6b8243aafb785a7fa3
pamqp/__init__.py
pamqp/__init__.py
"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ '1.0.1' from header import ProtocolHeader from header import ContentHeader import body import codec import frame import specification
"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ = '1.0.1' from pamqp.header import ProtocolHeader from pamqp.header import ContentHeader from pamqp import body from pamqp import codec from pamqp import frame from pamqp import specification
Use absolute imports and fix the version string
Use absolute imports and fix the version string
Python
bsd-3-clause
gmr/pamqp
"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ '1.0.1' from header import ProtocolHeader from header import ContentHeader import body import codec import frame import specification Use absolute imports and fix the version string
"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ = '1.0.1' from pamqp.header import ProtocolHeader from pamqp.header import ContentHeader from pamqp import body from pamqp import codec from pamqp import frame from pamqp import specification
<commit_before>"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ '1.0.1' from header import ProtocolHeader from header import ContentHeader import body import codec import frame import specification <commit_msg>Use absolute imports and fix the version string<commit_after>
"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ = '1.0.1' from pamqp.header import ProtocolHeader from pamqp.header import ContentHeader from pamqp import body from pamqp import codec from pamqp import frame from pamqp import specification
"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ '1.0.1' from header import ProtocolHeader from header import ContentHeader import body import codec import frame import specification Use absolute imports and fix the version string"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ = '1.0.1' from pamqp.header import ProtocolHeader from pamqp.header import ContentHeader from pamqp import body from pamqp import codec from pamqp import frame from pamqp import specification
<commit_before>"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ '1.0.1' from header import ProtocolHeader from header import ContentHeader import body import codec import frame import specification <commit_msg>Use absolute imports and fix the version string<commit_after>"""AMQP Specifications and Classes""" __author__ = 'Gavin M. Roy' __email__ = 'gavinmroy@gmail.com' __since__ = '2011-09-23' __version__ = '1.0.1' from pamqp.header import ProtocolHeader from pamqp.header import ContentHeader from pamqp import body from pamqp import codec from pamqp import frame from pamqp import specification
e40f3cfe77b09d63bce504dcce957bee7788028a
zadarapy/vpsa/__init__.py
zadarapy/vpsa/__init__.py
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class VPSAInterfaceTypes(Enum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class BaseEnum(Enum): @classmethod def list(cls): return list(map(lambda c: c.value, cls)) class VPSAInterfaceTypes(BaseEnum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'
Create Base class for enum
Create Base class for enum Change-Id: Ia0de5c1c99cabcab38d1a64949b50e916fadd8b8
Python
apache-2.0
zadarastorage/zadarapy
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class VPSAInterfaceTypes(Enum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'Create Base class for enum Change-Id: Ia0de5c1c99cabcab38d1a64949b50e916fadd8b8
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class BaseEnum(Enum): @classmethod def list(cls): return list(map(lambda c: c.value, cls)) class VPSAInterfaceTypes(BaseEnum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'
<commit_before># Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class VPSAInterfaceTypes(Enum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'<commit_msg>Create Base class for enum Change-Id: Ia0de5c1c99cabcab38d1a64949b50e916fadd8b8<commit_after>
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class BaseEnum(Enum): @classmethod def list(cls): return list(map(lambda c: c.value, cls)) class VPSAInterfaceTypes(BaseEnum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class VPSAInterfaceTypes(Enum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'Create Base class for enum Change-Id: Ia0de5c1c99cabcab38d1a64949b50e916fadd8b8# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class BaseEnum(Enum): @classmethod def list(cls): return list(map(lambda c: c.value, cls)) class VPSAInterfaceTypes(BaseEnum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'
<commit_before># Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class VPSAInterfaceTypes(Enum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'<commit_msg>Create Base class for enum Change-Id: Ia0de5c1c99cabcab38d1a64949b50e916fadd8b8<commit_after># Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from enum import Enum ERROR_MSG = 'The API server returned an error: "The request has been submitted' class BaseEnum(Enum): @classmethod def list(cls): return list(map(lambda c: c.value, cls)) class VPSAInterfaceTypes(BaseEnum): FE = 'fe' PUBLIC = 'public' VNI_PREFIX = 'vni-'
07ab8c8bebdb712131cb0ccc4893f81b33d261cd
hackarena/player.py
hackarena/player.py
# -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, }
# -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): # TODO: set different MAX_HP based on class self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): # TODO: set different HP based on class self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, }
Add todo for hp stuff
Add todo for hp stuff
Python
mit
verekia/hackarena,verekia/hackarena,verekia/hackarena,verekia/hackarena
# -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, } Add todo for hp stuff
# -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): # TODO: set different MAX_HP based on class self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): # TODO: set different HP based on class self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, }
<commit_before># -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, } <commit_msg>Add todo for hp stuff<commit_after>
# -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): # TODO: set different MAX_HP based on class self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): # TODO: set different HP based on class self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, }
# -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, } Add todo for hp stuff# -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): # TODO: set different MAX_HP based on class self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): # TODO: set different HP based on class self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, }
<commit_before># -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, } <commit_msg>Add todo for hp stuff<commit_after># -*- coding: utf-8 -*- import hackarena.constants from hackarena.constants import Classes from hackarena.constants import Spell from hackarena.game_objects import BaseGameObject AVAILABLE_SPELLS = { Classes.TANK: [Spell.TANK_ATTACK, Spell.TANK_AOE], Classes.MAGE: [Spell.MAGE_DIRECT_DAMAGE, Spell.MAGE_AOE], Classes.HEALER: [Spell.HEALER_DIRECT_DAMAGE, Spell.HEALER_HEAL], Classes.HQ: [], } MAX_HP = 130 class Player(BaseGameObject): def __init__( self, username, character_class, team, hp=MAX_HP, last_death=0, ): # TODO: set different MAX_HP based on class self.MAX_HP = MAX_HP self.username = username self.character_class = character_class self.available_spells = AVAILABLE_SPELLS[character_class] self.spell_cast_times = dict((spell, 0) for spell in self.available_spells) self.team = team self.reset() self.last_death = last_death def reset(self): # TODO: set different HP based on class self.hp = MAX_HP self.position = { 'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2, 'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2, }
28fe6a0a1e5e5d8781854aad4f22d368d3d73b12
ld37/common/utils/libutils.py
ld37/common/utils/libutils.py
import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r1_center_x - r2_center_x)**2 y_squared = (r1_center_y - r2_center_y)**2 math.sqrt(x_squared + y_squared)
import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r2_center_x - r1_center_x)**2 y_squared = (r2_center_y - r1_center_y)**2 return math.sqrt(x_squared + y_squared)
Update distance formula to be more standard
Update distance formula to be more standard
Python
mit
Daihiro/ldjam37,maximx1/ldjam37
import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r1_center_x - r2_center_x)**2 y_squared = (r1_center_y - r2_center_y)**2 math.sqrt(x_squared + y_squared) Update distance formula to be more standard
import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r2_center_x - r1_center_x)**2 y_squared = (r2_center_y - r1_center_y)**2 return math.sqrt(x_squared + y_squared)
<commit_before>import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r1_center_x - r2_center_x)**2 y_squared = (r1_center_y - r2_center_y)**2 math.sqrt(x_squared + y_squared) <commit_msg>Update distance formula to be more standard<commit_after>
import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r2_center_x - r1_center_x)**2 y_squared = (r2_center_y - r1_center_y)**2 return math.sqrt(x_squared + y_squared)
import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r1_center_x - r2_center_x)**2 y_squared = (r1_center_y - r2_center_y)**2 math.sqrt(x_squared + y_squared) Update distance formula to be more standardimport math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r2_center_x - r1_center_x)**2 y_squared = (r2_center_y - r1_center_y)**2 return math.sqrt(x_squared + y_squared)
<commit_before>import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r1_center_x - r2_center_x)**2 y_squared = (r1_center_y - r2_center_y)**2 math.sqrt(x_squared + y_squared) <commit_msg>Update distance formula to be more standard<commit_after>import math def update_image_rect(image, rect): image_rect = image.get_rect() image_rect.x = rect.x image_rect.y = rect.y def distance_between_rects(rect1, rect2): (r1_center_x, r1_center_y) = rect1.center (r2_center_x, r2_center_y) = rect2.center x_squared = (r2_center_x - r1_center_x)**2 y_squared = (r2_center_y - r1_center_y)**2 return math.sqrt(x_squared + y_squared)
b635aa57758f667a989039d8874111e5497a7ab7
smithers/smithers/conf/server.py
smithers/smithers/conf/server.py
from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 1 # basically off
from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 500
Set country minimum vote filter back to 500.
Set country minimum vote filter back to 500.
Python
mpl-2.0
mozilla/mrburns,mozilla/mrburns,mozilla/mrburns
from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 1 # basically off Set country minimum vote filter back to 500.
from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 500
<commit_before>from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 1 # basically off <commit_msg>Set country minimum vote filter back to 500.<commit_after>
from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 500
from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 1 # basically off Set country minimum vote filter back to 500.from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 500
<commit_before>from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 1 # basically off <commit_msg>Set country minimum vote filter back to 500.<commit_after>from os import getenv GEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb' STATSD_HOST = 'graphite1.private.phx1.mozilla.com' STATSD_PORT = 8125 STATSD_PREFIX = 'glow-workers-{}'.format(getenv('DJANGO_SERVER_ENV')) COUNTRY_MIN_SHARE = 500
244da6a4ffa5ff8de80d18baceedcf947ef6b68e
tensorflow/python/tf2.py
tensorflow/python/tf2.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR") is not None
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR", "0") != "0"
Make TF2_BEHAVIOR=0 disable TF2 behavior.
Make TF2_BEHAVIOR=0 disable TF2 behavior. Prior to this change, the mere presence of a TF2_BEHAVIOR environment variable would enable TF2 behavior. With this, setting that environment variable to "0" will disable it. PiperOrigin-RevId: 223804383
Python
apache-2.0
freedomtan/tensorflow,kevin-coder/tensorflow-fork,aldian/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,renyi533/tensorflow,ghchinoy/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,hfp/tensorflow-xsmm,alsrgv/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,theflofly/tensorflow,renyi533/tensorflow,aam-at/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,asimshankar/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,arborh/tensorflow,gautam1858/tensorflow,kevin-coder/tensorflow-fork,sarvex/tensorflow,ageron/tensorflow,ageron/tensorflow,kevin-coder/tensorflow-fork,chemelnucfin/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,renyi533/tensorflow,xzturn/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,cxxgtxy/tensorflow,frreiss/tensorflow-fred,jbedorf/tensorflow,xzturn/tensorflow,xzturn/tensorflow,yongtang/tensorflow,jhseu/tensorflow,hfp/tensorflow-xsmm,apark263/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,asimshankar/tensorflow,Intel-Corporation/tensorflow,ageron/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,chemelnucfin/tensorflow,xzturn/tensorflow,annarev/tensorflow,sarvex/tensorflow,annarev/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,theflofly/tensorflow,xzturn/tensorflow,DavidNorman/tensorflow,asimshankar/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,asimshankar/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ghchinoy/tensorflow,renyi533/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,chemelnucfin/tensorflow,Bismarrck/tensorflow,ppwwyyxx/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,yongtang/tensorflow,renyi533/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,jhseu/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,hfp/tensorflow-xsmm,adit-chandra/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,paolodedios/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,paolodedios/tensorflow,jbedorf/tensorflow,kevin-coder/tensorflow-fork,cxxgtxy/tensorflow,alsrgv/tensorflow,aam-at/tensorflow,theflofly/tensorflow,xzturn/tensorflow,jendap/tensorflow,gunan/tensorflow,annarev/tensorflow,jhseu/tensorflow,hfp/tensorflow-xsmm,paolodedios/tensorflow,freedomtan/tensorflow,arborh/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,ageron/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,theflofly/tensorflow,xzturn/tensorflow,Intel-Corporation/tensorflow,alsrgv/tensorflow,DavidNorman/tensorflow,chemelnucfin/tensorflow,aldian/tensorflow,DavidNorman/tensorflow,hfp/tensorflow-xsmm,DavidNorman/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,aam-at/tensorflow,aam-at/tensorflow,jendap/tensorflow,jhseu/tensorflow,jbedorf/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,apark263/tensorflow,alsrgv/tensorflow,sarvex/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,freedomtan/tensorflow,Bismarrck/tensorflow,gautam1858/tensorflow,arborh/tensorflow,hfp/tensorflow-xsmm,gautam1858/tensorflow,arborh/tensorflow,theflofly/tensorflow,gautam1858/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,aam-at/tensorflow,chemelnucfin/tensorflow,jhseu/tensorflow,apark263/tensorflow,Intel-tensorflow/tensorflow,apark263/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,asimshankar/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,yongtang/tensorflow,ageron/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,petewarden/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,alsrgv/tensorflow,renyi533/tensorflow,jbedorf/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,Bismarrck/tensorflow,aam-at/tensorflow,sarvex/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ghchinoy/tensorflow,jendap/tensorflow,ppwwyyxx/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,aldian/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,ageron/tensorflow,Bismarrck/tensorflow,Bismarrck/tensorflow,kevin-coder/tensorflow-fork,Intel-Corporation/tensorflow,tensorflow/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,hfp/tensorflow-xsmm,Bismarrck/tensorflow,theflofly/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,gunan/tensorflow,asimshankar/tensorflow,jendap/tensorflow,aldian/tensorflow,Bismarrck/tensorflow,ghchinoy/tensorflow,alsrgv/tensorflow,jendap/tensorflow,ageron/tensorflow,gautam1858/tensorflow,ghchinoy/tensorflow,alsrgv/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,asimshankar/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Bismarrck/tensorflow,chemelnucfin/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,petewarden/tensorflow,jendap/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ageron/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,chemelnucfin/tensorflow,apark263/tensorflow,ppwwyyxx/tensorflow,theflofly/tensorflow,sarvex/tensorflow,ppwwyyxx/tensorflow,annarev/tensorflow,renyi533/tensorflow,jhseu/tensorflow,yongtang/tensorflow,petewarden/tensorflow,adit-chandra/tensorflow,ppwwyyxx/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,jbedorf/tensorflow,jendap/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,ghchinoy/tensorflow,adit-chandra/tensorflow,Intel-Corporation/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,DavidNorman/tensorflow,jbedorf/tensorflow,karllessard/tensorflow,jbedorf/tensorflow,kevin-coder/tensorflow-fork,tensorflow/tensorflow-pywrap_saved_model,kevin-coder/tensorflow-fork,paolodedios/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jendap/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,jbedorf/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,jbedorf/tensorflow,xzturn/tensorflow,adit-chandra/tensorflow,jendap/tensorflow,hfp/tensorflow-xsmm,davidzchen/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,aam-at/tensorflow,annarev/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,Intel-tensorflow/tensorflow,apark263/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,aldian/tensorflow,apark263/tensorflow,ghchinoy/tensorflow,gunan/tensorflow,asimshankar/tensorflow,chemelnucfin/tensorflow,renyi533/tensorflow,karllessard/tensorflow,sarvex/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,theflofly/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,apark263/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,jbedorf/tensorflow,gunan/tensorflow,jbedorf/tensorflow,hfp/tensorflow-xsmm,Bismarrck/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,kevin-coder/tensorflow-fork,Intel-tensorflow/tensorflow,jbedorf/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,apark263/tensorflow,jhseu/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,asimshankar/tensorflow,arborh/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,renyi533/tensorflow,arborh/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ageron/tensorflow,annarev/tensorflow,yongtang/tensorflow,cxxgtxy/tensorflow,apark263/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,apark263/tensorflow,theflofly/tensorflow,kevin-coder/tensorflow-fork,Intel-tensorflow/tensorflow,paolodedios/tensorflow,jendap/tensorflow,Intel-tensorflow/tensorflow,ageron/tensorflow,aldian/tensorflow,ppwwyyxx/tensorflow,DavidNorman/tensorflow,jendap/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ppwwyyxx/tensorflow,sarvex/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,asimshankar/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,kevin-coder/tensorflow-fork,alsrgv/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,ghchinoy/tensorflow,paolodedios/tensorflow,asimshankar/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,kevin-coder/tensorflow-fork,ageron/tensorflow,ghchinoy/tensorflow,DavidNorman/tensorflow,annarev/tensorflow,karllessard/tensorflow,ageron/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,DavidNorman/tensorflow,Bismarrck/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,theflofly/tensorflow,alsrgv/tensorflow,yongtang/tensorflow,ghchinoy/tensorflow,theflofly/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,DavidNorman/tensorflow,theflofly/tensorflow,arborh/tensorflow
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR") is not None Make TF2_BEHAVIOR=0 disable TF2 behavior. Prior to this change, the mere presence of a TF2_BEHAVIOR environment variable would enable TF2 behavior. With this, setting that environment variable to "0" will disable it. PiperOrigin-RevId: 223804383
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR", "0") != "0"
<commit_before># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR") is not None <commit_msg>Make TF2_BEHAVIOR=0 disable TF2 behavior. Prior to this change, the mere presence of a TF2_BEHAVIOR environment variable would enable TF2 behavior. With this, setting that environment variable to "0" will disable it. PiperOrigin-RevId: 223804383<commit_after>
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR", "0") != "0"
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR") is not None Make TF2_BEHAVIOR=0 disable TF2 behavior. Prior to this change, the mere presence of a TF2_BEHAVIOR environment variable would enable TF2 behavior. With this, setting that environment variable to "0" will disable it. PiperOrigin-RevId: 223804383# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR", "0") != "0"
<commit_before># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR") is not None <commit_msg>Make TF2_BEHAVIOR=0 disable TF2 behavior. Prior to this change, the mere presence of a TF2_BEHAVIOR environment variable would enable TF2 behavior. With this, setting that environment variable to "0" will disable it. PiperOrigin-RevId: 223804383<commit_after># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tools to help with the TensorFlow 2.0 transition. This module is meant for TensorFlow internal implementation, not for users of the TensorFlow library. For that see tf.compat instead. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os _force_enable = False def enable(): """Enables v2 behaviors.""" global _force_enable _force_enable = True def disable(): """Disables v2 behaviors (TF2_BEHAVIOR env variable is still respected).""" global _force_enable _force_enable = False def enabled(): """Returns True iff TensorFlow 2.0 behavior should be enabled.""" return _force_enable or os.getenv("TF2_BEHAVIOR", "0") != "0"
1a3db115de722a24780009683f36011e036e9086
tests/test_completion.py
tests/test_completion.py
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text bash_completion_path.write_text(text)
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text assert "completion installed in" in result.stdout assert "Completion will take effect once you restart the terminal." in result.stdout
Update completion tests, checking for printed message
:white_check_mark: Update completion tests, checking for printed message
Python
mit
tiangolo/typer,tiangolo/typer
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text bash_completion_path.write_text(text) :white_check_mark: Update completion tests, checking for printed message
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text assert "completion installed in" in result.stdout assert "Completion will take effect once you restart the terminal." in result.stdout
<commit_before>import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text bash_completion_path.write_text(text) <commit_msg>:white_check_mark: Update completion tests, checking for printed message<commit_after>
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text assert "completion installed in" in result.stdout assert "Completion will take effect once you restart the terminal." in result.stdout
import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text bash_completion_path.write_text(text) :white_check_mark: Update completion tests, checking for printed messageimport os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text assert "completion installed in" in result.stdout assert "Completion will take effect once you restart the terminal." in result.stdout
<commit_before>import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text bash_completion_path.write_text(text) <commit_msg>:white_check_mark: Update completion tests, checking for printed message<commit_after>import os import subprocess import sys from pathlib import Path import typer from typer.testing import CliRunner from first_steps import tutorial001 as mod runner = CliRunner() app = typer.Typer() app.command()(mod.main) def test_show_completion(): result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --show-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in result.stdout def test_install_completion(): bash_completion_path: Path = Path.home() / ".bash_completion" text = "" if bash_completion_path.is_file(): text = bash_completion_path.read_text() result = subprocess.run( [ "bash", "-c", f"{sys.executable} -m coverage run {mod.__file__} --install-completion", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8", env={**os.environ, "SHELL": "/bin/bash"}, ) new_text = bash_completion_path.read_text() bash_completion_path.write_text(text) assert "_TUTORIAL001.PY_COMPLETE=complete-bash" in new_text assert "completion installed in" in result.stdout assert "Completion will take effect once you restart the terminal." in result.stdout
363184f27bfb6c181448486f0c3e9d6d5d6a21dc
core/utils.py
core/utils.py
import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return True elif ("active" in status or "is running" in status): return False def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info
import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return False elif ("active" in status or "is running" in status): return True def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info
Fix : bug in fail2ban status.
Fix : bug in fail2ban status.
Python
mit
nocternology/fail2dash,nocternology/fail2dash
import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return True elif ("active" in status or "is running" in status): return False def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info Fix : bug in fail2ban status.
import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return False elif ("active" in status or "is running" in status): return True def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info
<commit_before>import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return True elif ("active" in status or "is running" in status): return False def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info <commit_msg>Fix : bug in fail2ban status.<commit_after>
import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return False elif ("active" in status or "is running" in status): return True def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info
import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return True elif ("active" in status or "is running" in status): return False def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info Fix : bug in fail2ban status.import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return False elif ("active" in status or "is running" in status): return True def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info
<commit_before>import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return True elif ("active" in status or "is running" in status): return False def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info <commit_msg>Fix : bug in fail2ban status.<commit_after>import socket import os def getHostname(): """ Returns the current host hostname """ return socket.gethostname() def fail2banStatus(): """ Returns the status of fail2ban for init and systemd """ f = os.popen('service fail2ban status') status = f.read() if ("inactive" in status or "not running" in status): return False elif ("active" in status or "is running" in status): return True def gatherHostInfo(): """ Tidy up the host information in a nice list for template rendering """ info = {} info['active'] = fail2banStatus() info['hostname'] = getHostname() return info
481571daf8e89fb98424e1a068c64c7c1a6209fb
py3-test/tests.py
py3-test/tests.py
# -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) future = Future() @ee.on('event') async def event_handler(): future.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) future.cancel() timeout = create_timeout(loop=loop) @future.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(future, timeout))
# -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) should_call = Future(loop=loop) @ee.on('event') async def event_handler(): should_call.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) if not should_call.done(): raise Exception('should_call timed out!') return should_call.cancel() timeout = create_timeout(loop=loop) @should_call.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(should_call, timeout))
Rename should_call future in test, raise exception on timeout
Rename should_call future in test, raise exception on timeout
Python
mit
jfhbrook/pyee
# -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) future = Future() @ee.on('event') async def event_handler(): future.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) future.cancel() timeout = create_timeout(loop=loop) @future.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(future, timeout)) Rename should_call future in test, raise exception on timeout
# -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) should_call = Future(loop=loop) @ee.on('event') async def event_handler(): should_call.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) if not should_call.done(): raise Exception('should_call timed out!') return should_call.cancel() timeout = create_timeout(loop=loop) @should_call.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(should_call, timeout))
<commit_before># -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) future = Future() @ee.on('event') async def event_handler(): future.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) future.cancel() timeout = create_timeout(loop=loop) @future.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(future, timeout)) <commit_msg>Rename should_call future in test, raise exception on timeout<commit_after>
# -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) should_call = Future(loop=loop) @ee.on('event') async def event_handler(): should_call.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) if not should_call.done(): raise Exception('should_call timed out!') return should_call.cancel() timeout = create_timeout(loop=loop) @should_call.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(should_call, timeout))
# -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) future = Future() @ee.on('event') async def event_handler(): future.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) future.cancel() timeout = create_timeout(loop=loop) @future.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(future, timeout)) Rename should_call future in test, raise exception on timeout# -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) should_call = Future(loop=loop) @ee.on('event') async def event_handler(): should_call.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) if not should_call.done(): raise Exception('should_call timed out!') return should_call.cancel() timeout = create_timeout(loop=loop) @should_call.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(should_call, timeout))
<commit_before># -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) future = Future() @ee.on('event') async def event_handler(): future.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) future.cancel() timeout = create_timeout(loop=loop) @future.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(future, timeout)) <commit_msg>Rename should_call future in test, raise exception on timeout<commit_after># -*- coding: utf-8 -*- import nose.tools as nt from asyncio import Future, gather, get_event_loop, sleep from pyee import EventEmitter def test_async_emit(): """Test that event_emitters can handle wrapping coroutines """ loop = get_event_loop() ee = EventEmitter(loop=loop) should_call = Future(loop=loop) @ee.on('event') async def event_handler(): should_call.set_result(True) async def create_timeout(loop=loop): await sleep(1, loop=loop) if not should_call.done(): raise Exception('should_call timed out!') return should_call.cancel() timeout = create_timeout(loop=loop) @should_call.add_done_callback def _done(result): nt.assert_true(result) ee.emit('event') loop.run_until_complete(gather(should_call, timeout))
ad2ad7df04f9b6824a1e37505253fc513b851a06
abusehelper/contrib/accesslogbot/configuration.py
abusehelper/contrib/accesslogbot/configuration.py
service_room = "FIXME.lobby" accesslog_room = "FIXME.accesslog" combined_room = "FIXME.combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10
service_room = "FIXME.lobby" accesslog_room = service_room + ".accesslog" combined_room = service_room + ".combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10
Put all the rooms under lobby, so it will be easier to configure.
Put all the rooms under lobby, so it will be easier to configure.
Python
mit
abusesa/abusehelper
service_room = "FIXME.lobby" accesslog_room = "FIXME.accesslog" combined_room = "FIXME.combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10 Put all the rooms under lobby, so it will be easier to configure.
service_room = "FIXME.lobby" accesslog_room = service_room + ".accesslog" combined_room = service_room + ".combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10
<commit_before>service_room = "FIXME.lobby" accesslog_room = "FIXME.accesslog" combined_room = "FIXME.combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10 <commit_msg>Put all the rooms under lobby, so it will be easier to configure.<commit_after>
service_room = "FIXME.lobby" accesslog_room = service_room + ".accesslog" combined_room = service_room + ".combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10
service_room = "FIXME.lobby" accesslog_room = "FIXME.accesslog" combined_room = "FIXME.combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10 Put all the rooms under lobby, so it will be easier to configure.service_room = "FIXME.lobby" accesslog_room = service_room + ".accesslog" combined_room = service_room + ".combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10
<commit_before>service_room = "FIXME.lobby" accesslog_room = "FIXME.accesslog" combined_room = "FIXME.combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10 <commit_msg>Put all the rooms under lobby, so it will be easier to configure.<commit_after>service_room = "FIXME.lobby" accesslog_room = service_room + ".accesslog" combined_room = service_room + ".combined" path = "" xmpp_jid = "" xmpp_password = "FIXME" xmpp_ignore_cert = True xmpp_extra_ca_certs = None xmpp_rate_limit = 10
e7149a488eaa85baecacfdf78a5d190b51dc46d7
tests/test_upgrade.py
tests/test_upgrade.py
import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) # runs the unit tests if __name__ == '__main__': unittest.main()
import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) self.assertNotEqual(get_current_version(version_file), '0.11.0') # runs the unit tests if __name__ == '__main__': unittest.main()
Add not equals test for version function
Add not equals test for version function
Python
mit
roramirez/qpanel,skazancev/qpanel,roramirez/qpanel,skazancev/qpanel,roramirez/qpanel,skazancev/qpanel,skazancev/qpanel,roramirez/qpanel
import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) # runs the unit tests if __name__ == '__main__': unittest.main() Add not equals test for version function
import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) self.assertNotEqual(get_current_version(version_file), '0.11.0') # runs the unit tests if __name__ == '__main__': unittest.main()
<commit_before>import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) # runs the unit tests if __name__ == '__main__': unittest.main() <commit_msg>Add not equals test for version function<commit_after>
import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) self.assertNotEqual(get_current_version(version_file), '0.11.0') # runs the unit tests if __name__ == '__main__': unittest.main()
import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) # runs the unit tests if __name__ == '__main__': unittest.main() Add not equals test for version functionimport shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) self.assertNotEqual(get_current_version(version_file), '0.11.0') # runs the unit tests if __name__ == '__main__': unittest.main()
<commit_before>import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) # runs the unit tests if __name__ == '__main__': unittest.main() <commit_msg>Add not equals test for version function<commit_after>import shutil import tempfile from os import path import unittest from libs.qpanel.upgrader import __first_line as firstline, get_current_version class UpgradeTestClass(unittest.TestCase): def setUp(self): # Create a temporary directory self.test_dir = tempfile.mkdtemp() def tearDown(self): # Remove the directory after the test shutil.rmtree(self.test_dir) def test_first_line(self): content = 'a\n\b\t\b' self.assertEqual(firstline(content), 'a') self.assertNotEqual(firstline(content), 'ab') def test_version(self): version = '0.10' version_file = path.join(self.test_dir, 'VERSION') f = open(version_file, 'w') f.write(version) f.close() self.assertEqual(get_current_version(version_file), version) self.assertNotEqual(get_current_version(version_file), '0.11.0') # runs the unit tests if __name__ == '__main__': unittest.main()
2deb924aaa78329d11c40d487788dc027dbb07a0
dojo/views.py
dojo/views.py
import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, })
import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history.qs, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, })
Fix qs error in history
Fix qs error in history
Python
bsd-3-clause
grendel513/django-DefectDojo,OWASP/django-DefectDojo,OWASP/django-DefectDojo,grendel513/django-DefectDojo,OWASP/django-DefectDojo,OWASP/django-DefectDojo,rackerlabs/django-DefectDojo,yan99uic/django-DefectDojo,grendel513/django-DefectDojo,yan99uic/django-DefectDojo,rackerlabs/django-DefectDojo,yan99uic/django-DefectDojo,OWASP/django-DefectDojo,rackerlabs/django-DefectDojo,yan99uic/django-DefectDojo,grendel513/django-DefectDojo,rackerlabs/django-DefectDojo
import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, }) Fix qs error in history
import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history.qs, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, })
<commit_before>import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, }) <commit_msg>Fix qs error in history<commit_after>
import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history.qs, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, })
import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, }) Fix qs error in historyimport logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history.qs, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, })
<commit_before>import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, }) <commit_msg>Fix qs error in history<commit_after>import logging from django.conf import settings from django.http import Http404 from django.shortcuts import render from pytz import timezone from dojo.filters import LogEntryFilter from dojo.utils import get_page_items, add_breadcrumb localtz = timezone(settings.TIME_ZONE) logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s [%(name)s:%(lineno)d] %(message)s', datefmt='%d/%b/%Y %H:%M:%S', filename=settings.DOJO_ROOT + '/../django_app.log', ) logger = logging.getLogger(__name__) def action_history(request, cid, oid): from django.contrib.contenttypes.models import ContentType from auditlog.models import LogEntry try: ct = ContentType.objects.get_for_id(cid) obj = ct.get_object_for_this_type(pk=oid) except KeyError: raise Http404() history = LogEntry.objects.filter(content_type=ct, object_pk=obj.id).order_by('-timestamp') history = LogEntryFilter(request.GET, queryset=history) paged_history = get_page_items(request, history.qs, 25) add_breadcrumb(parent=obj, title="Action History", top_level=False, request=request) return render(request, 'dojo/action_history.html', {"history": paged_history, "filtered": history, "obj": obj, })
95421d1b71d2f5847bcea439cde79af2a984eda6
src/sentry/api/endpoints/project_releases.py
src/sentry/api/endpoints/project_releases.py
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ).order_by('-date_added') return self.paginate( request=request, queryset=queryset, # TODO(dcramer): we want to sort by date_added order_by='-id', on_results=lambda x: serialize(x, request.user), )
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ) return self.paginate( request=request, queryset=queryset, order_by='-id', on_results=lambda x: serialize(x, request.user), )
Maintain project release sort order
Maintain project release sort order
Python
bsd-3-clause
zenefits/sentry,ewdurbin/sentry,fotinakis/sentry,wong2/sentry,alexm92/sentry,gencer/sentry,Natim/sentry,1tush/sentry,hongliang5623/sentry,daevaorn/sentry,BuildingLink/sentry,daevaorn/sentry,ngonzalvez/sentry,zenefits/sentry,JamesMura/sentry,ngonzalvez/sentry,pauloschilling/sentry,argonemyth/sentry,wong2/sentry,JamesMura/sentry,jokey2k/sentry,Kryz/sentry,gg7/sentry,kevinlondon/sentry,mvaled/sentry,TedaLIEz/sentry,daevaorn/sentry,Kryz/sentry,gencer/sentry,korealerts1/sentry,korealerts1/sentry,hongliang5623/sentry,jokey2k/sentry,gencer/sentry,wujuguang/sentry,imankulov/sentry,pauloschilling/sentry,drcapulet/sentry,JackDanger/sentry,kevinastone/sentry,JamesMura/sentry,nicholasserra/sentry,jean/sentry,jokey2k/sentry,alexm92/sentry,beeftornado/sentry,looker/sentry,BayanGroup/sentry,fuziontech/sentry,imankulov/sentry,gg7/sentry,drcapulet/sentry,BuildingLink/sentry,felixbuenemann/sentry,JTCunning/sentry,mvaled/sentry,mitsuhiko/sentry,llonchj/sentry,ifduyue/sentry,ifduyue/sentry,vperron/sentry,Natim/sentry,daevaorn/sentry,ifduyue/sentry,looker/sentry,BayanGroup/sentry,felixbuenemann/sentry,ewdurbin/sentry,1tush/sentry,zenefits/sentry,songyi199111/sentry,BuildingLink/sentry,fotinakis/sentry,TedaLIEz/sentry,vperron/sentry,JackDanger/sentry,llonchj/sentry,mvaled/sentry,wujuguang/sentry,gg7/sentry,1tush/sentry,nicholasserra/sentry,songyi199111/sentry,argonemyth/sentry,kevinlondon/sentry,hongliang5623/sentry,boneyao/sentry,wong2/sentry,BayanGroup/sentry,jean/sentry,BuildingLink/sentry,gencer/sentry,mvaled/sentry,boneyao/sentry,fuziontech/sentry,Natim/sentry,drcapulet/sentry,felixbuenemann/sentry,ifduyue/sentry,ngonzalvez/sentry,TedaLIEz/sentry,kevinastone/sentry,nicholasserra/sentry,boneyao/sentry,kevinlondon/sentry,alexm92/sentry,mvaled/sentry,beeftornado/sentry,JamesMura/sentry,wujuguang/sentry,JTCunning/sentry,fotinakis/sentry,zenefits/sentry,JTCunning/sentry,Kryz/sentry,pauloschilling/sentry,BuildingLink/sentry,looker/sentry,fotinakis/sentry,zenefits/sentry,imankulov/sentry,fuziontech/sentry,looker/sentry,vperron/sentry,looker/sentry,JackDanger/sentry,songyi199111/sentry,gencer/sentry,mvaled/sentry,beeftornado/sentry,jean/sentry,ifduyue/sentry,kevinastone/sentry,llonchj/sentry,jean/sentry,ewdurbin/sentry,mitsuhiko/sentry,jean/sentry,argonemyth/sentry,korealerts1/sentry,JamesMura/sentry
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ).order_by('-date_added') return self.paginate( request=request, queryset=queryset, # TODO(dcramer): we want to sort by date_added order_by='-id', on_results=lambda x: serialize(x, request.user), ) Maintain project release sort order
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ) return self.paginate( request=request, queryset=queryset, order_by='-id', on_results=lambda x: serialize(x, request.user), )
<commit_before>from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ).order_by('-date_added') return self.paginate( request=request, queryset=queryset, # TODO(dcramer): we want to sort by date_added order_by='-id', on_results=lambda x: serialize(x, request.user), ) <commit_msg>Maintain project release sort order<commit_after>
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ) return self.paginate( request=request, queryset=queryset, order_by='-id', on_results=lambda x: serialize(x, request.user), )
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ).order_by('-date_added') return self.paginate( request=request, queryset=queryset, # TODO(dcramer): we want to sort by date_added order_by='-id', on_results=lambda x: serialize(x, request.user), ) Maintain project release sort orderfrom __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ) return self.paginate( request=request, queryset=queryset, order_by='-id', on_results=lambda x: serialize(x, request.user), )
<commit_before>from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ).order_by('-date_added') return self.paginate( request=request, queryset=queryset, # TODO(dcramer): we want to sort by date_added order_by='-id', on_results=lambda x: serialize(x, request.user), ) <commit_msg>Maintain project release sort order<commit_after>from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.serializers import serialize from sentry.models import Release class ProjectReleasesEndpoint(ProjectEndpoint): doc_section = DocSection.RELEASES def get(self, request, project): """ List a project's releases Retrieve a list of releases for a given project. {method} {path} """ queryset = Release.objects.filter( project=project, ) return self.paginate( request=request, queryset=queryset, order_by='-id', on_results=lambda x: serialize(x, request.user), )
6d663d1d0172b716e0dccc1f617b5a09b2905b67
script/upload-windows-pdb.py
script/upload-windows-pdb.py
#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main())
#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') files = [f.lower() for f in files] upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main())
Use lowercase for symbol paths
Use lowercase for symbol paths
Python
mit
wolfflow/electron,shockone/electron,ianscrivener/electron,oiledCode/electron,christian-bromann/electron,fffej/electron,darwin/electron,digideskio/electron,jannishuebl/electron,darwin/electron,lrlna/electron,faizalpribadi/electron,lzpfmh/electron,rsvip/electron,mubassirhayat/electron,bwiggs/electron,jiaz/electron,gstack/infinium-shell,bobwol/electron,meowlab/electron,egoist/electron,simongregory/electron,vHanda/electron,felixrieseberg/electron,nekuz0r/electron,wolfflow/electron,rreimann/electron,fritx/electron,destan/electron,vaginessa/electron,michaelchiche/electron,stevemao/electron,John-Lin/electron,JussMee15/electron,jlhbaseball15/electron,rhencke/electron,stevemao/electron,brave/electron,fomojola/electron,thompsonemerson/electron,gamedevsam/electron,shiftkey/electron,Neron-X5/electron,fritx/electron,bruce/electron,voidbridge/electron,BionicClick/electron,lzpfmh/electron,howmuchcomputer/electron,RIAEvangelist/electron,Gerhut/electron,howmuchcomputer/electron,tinydew4/electron,maxogden/atom-shell,seanchas116/electron,joaomoreno/atom-shell,destan/electron,mattdesl/electron,iftekeriba/electron,brave/muon,the-ress/electron,bright-sparks/electron,christian-bromann/electron,rprichard/electron,darwin/electron,jonatasfreitasv/electron,adamjgray/electron,ankitaggarwal011/electron,wan-qy/electron,medixdev/electron,rsvip/electron,bbondy/electron,nagyistoce/electron-atom-shell,medixdev/electron,mhkeller/electron,eriser/electron,deed02392/electron,rhencke/electron,seanchas116/electron,dkfiresky/electron,jsutcodes/electron,pombredanne/electron,astoilkov/electron,MaxGraey/electron,deepak1556/atom-shell,simonfork/electron,gbn972/electron,greyhwndz/electron,edulan/electron,roadev/electron,robinvandernoord/electron,kazupon/electron,rajatsingla28/electron,howmuchcomputer/electron,meowlab/electron,tomashanacek/electron,chriskdon/electron,evgenyzinoviev/electron,joneit/electron,gabriel/electron,jiaz/electron,arturts/electron,greyhwndz/electron,edulan/electron,micalan/electron,kazupon/electron,d-salas/electron,eric-seekas/electron,thompsonemerson/electron,RobertJGabriel/electron,vaginessa/electron,electron/electron,iftekeriba/electron,natgolov/electron,xfstudio/electron,ervinb/electron,xfstudio/electron,xiruibing/electron,arturts/electron,renaesop/electron,roadev/electron,fffej/electron,thomsonreuters/electron,coderhaoxin/electron,twolfson/electron,evgenyzinoviev/electron,RobertJGabriel/electron,fomojola/electron,jsutcodes/electron,nagyistoce/electron-atom-shell,leftstick/electron,noikiy/electron,BionicClick/electron,LadyNaggaga/electron,gstack/infinium-shell,yalexx/electron,webmechanicx/electron,rajatsingla28/electron,greyhwndz/electron,webmechanicx/electron,carsonmcdonald/electron,bwiggs/electron,vaginessa/electron,jtburke/electron,beni55/electron,eriser/electron,JesselJohn/electron,jtburke/electron,jaanus/electron,Andrey-Pavlov/electron,robinvandernoord/electron,kokdemo/electron,tincan24/electron,miniak/electron,rajatsingla28/electron,noikiy/electron,nicobot/electron,setzer777/electron,gabriel/electron,zhakui/electron,jonatasfreitasv/electron,synaptek/electron,subblue/electron,kokdemo/electron,Evercoder/electron,aecca/electron,neutrous/electron,ianscrivener/electron,stevekinney/electron,adcentury/electron,Floato/electron,deepak1556/atom-shell,bbondy/electron,nicobot/electron,bitemyapp/electron,jacksondc/electron,jannishuebl/electron,mhkeller/electron,anko/electron,RIAEvangelist/electron,SufianHassan/electron,eric-seekas/electron,mattotodd/electron,LadyNaggaga/electron,shaundunne/electron,vHanda/electron,pombredanne/electron,chrisswk/electron,DivyaKMenon/electron,stevekinney/electron,nicholasess/electron,Evercoder/electron,bright-sparks/electron,GoooIce/electron,zhakui/electron,trankmichael/electron,yan-foto/electron,jjz/electron,kikong/electron,gabrielPeart/electron,renaesop/electron,leolujuyi/electron,eric-seekas/electron,farmisen/electron,sircharleswatson/electron,tinydew4/electron,natgolov/electron,kikong/electron,pirafrank/electron,carsonmcdonald/electron,jjz/electron,fffej/electron,adamjgray/electron,leethomas/electron,leolujuyi/electron,chriskdon/electron,meowlab/electron,Evercoder/electron,maxogden/atom-shell,yan-foto/electron,jlord/electron,stevekinney/electron,jiaz/electron,cos2004/electron,pandoraui/electron,GoooIce/electron,thingsinjars/electron,shockone/electron,electron/electron,digideskio/electron,sky7sea/electron,farmisen/electron,bpasero/electron,gbn972/electron,nekuz0r/electron,kenmozi/electron,voidbridge/electron,aaron-goshine/electron,aliib/electron,faizalpribadi/electron,beni55/electron,adamjgray/electron,wan-qy/electron,neutrous/electron,the-ress/electron,shockone/electron,shockone/electron,pandoraui/electron,bbondy/electron,miniak/electron,shockone/electron,bitemyapp/electron,systembugtj/electron,neutrous/electron,yalexx/electron,tylergibson/electron,gabriel/electron,felixrieseberg/electron,egoist/electron,shaundunne/electron,Rokt33r/electron,gamedevsam/electron,mhkeller/electron,preco21/electron,soulteary/electron,robinvandernoord/electron,DivyaKMenon/electron,gabrielPeart/electron,bright-sparks/electron,mrwizard82d1/electron,yan-foto/electron,renaesop/electron,the-ress/electron,subblue/electron,tinydew4/electron,bwiggs/electron,chrisswk/electron,jhen0409/electron,lzpfmh/electron,brave/muon,trankmichael/electron,RobertJGabriel/electron,renaesop/electron,roadev/electron,tonyganch/electron,baiwyc119/electron,stevemao/electron,jonatasfreitasv/electron,mubassirhayat/electron,arturts/electron,pandoraui/electron,nekuz0r/electron,vipulroxx/electron,jhen0409/electron,jhen0409/electron,xiruibing/electron,adcentury/electron,fomojola/electron,coderhaoxin/electron,joneit/electron,dahal/electron,nicobot/electron,bwiggs/electron,aaron-goshine/electron,howmuchcomputer/electron,bpasero/electron,cos2004/electron,deed02392/electron,fireball-x/atom-shell,dahal/electron,jtburke/electron,tomashanacek/electron,bobwol/electron,farmisen/electron,evgenyzinoviev/electron,Zagorakiss/electron,greyhwndz/electron,shaundunne/electron,Faiz7412/electron,howmuchcomputer/electron,RIAEvangelist/electron,takashi/electron,davazp/electron,jsutcodes/electron,bobwol/electron,aaron-goshine/electron,aaron-goshine/electron,mirrh/electron,michaelchiche/electron,BionicClick/electron,baiwyc119/electron,arturts/electron,medixdev/electron,matiasinsaurralde/electron,bpasero/electron,MaxWhere/electron,shennushi/electron,aliib/electron,natgolov/electron,kcrt/electron,jiaz/electron,adcentury/electron,xiruibing/electron,chriskdon/electron,Ivshti/electron,mrwizard82d1/electron,jjz/electron,leftstick/electron,twolfson/electron,brave/muon,micalan/electron,jaanus/electron,nekuz0r/electron,micalan/electron,tincan24/electron,shockone/electron,fabien-d/electron,twolfson/electron,kcrt/electron,trankmichael/electron,LadyNaggaga/electron,LadyNaggaga/electron,Zagorakiss/electron,egoist/electron,hokein/atom-shell,JesselJohn/electron,ianscrivener/electron,voidbridge/electron,davazp/electron,saronwei/electron,MaxWhere/electron,rreimann/electron,maxogden/atom-shell,shennushi/electron,tincan24/electron,jsutcodes/electron,takashi/electron,adamjgray/electron,vHanda/electron,sshiting/electron,LadyNaggaga/electron,zhakui/electron,MaxGraey/electron,ianscrivener/electron,GoooIce/electron,jsutcodes/electron,jaanus/electron,chriskdon/electron,Gerhut/electron,wolfflow/electron,MaxWhere/electron,John-Lin/electron,deed02392/electron,mrwizard82d1/electron,abhishekgahlot/electron,etiktin/electron,brave/electron,thingsinjars/electron,mjaniszew/electron,rreimann/electron,John-Lin/electron,kenmozi/electron,arturts/electron,cos2004/electron,d-salas/electron,BionicClick/electron,biblerule/UMCTelnetHub,jonatasfreitasv/electron,Neron-X5/electron,Evercoder/electron,kikong/electron,thompsonemerson/electron,jonatasfreitasv/electron,jannishuebl/electron,shennushi/electron,eric-seekas/electron,bwiggs/electron,dkfiresky/electron,jlord/electron,Neron-X5/electron,icattlecoder/electron,Zagorakiss/electron,tincan24/electron,joneit/electron,kostia/electron,pombredanne/electron,Rokt33r/electron,matiasinsaurralde/electron,jlhbaseball15/electron,dahal/electron,systembugtj/electron,tinydew4/electron,gstack/infinium-shell,bruce/electron,BionicClick/electron,gamedevsam/electron,bpasero/electron,bitemyapp/electron,micalan/electron,dongjoon-hyun/electron,twolfson/electron,aecca/electron,timruffles/electron,subblue/electron,nekuz0r/electron,minggo/electron,jtburke/electron,rsvip/electron,zhakui/electron,bbondy/electron,preco21/electron,brenca/electron,vaginessa/electron,leolujuyi/electron,cqqccqc/electron,jannishuebl/electron,jlord/electron,jcblw/electron,zhakui/electron,rhencke/electron,meowlab/electron,MaxGraey/electron,trigrass2/electron,thompsonemerson/electron,RIAEvangelist/electron,Andrey-Pavlov/electron,mattdesl/electron,bpasero/electron,soulteary/electron,shiftkey/electron,rreimann/electron,jlhbaseball15/electron,benweissmann/electron,trigrass2/electron,chrisswk/electron,tonyganch/electron,LadyNaggaga/electron,meowlab/electron,roadev/electron,tomashanacek/electron,pombredanne/electron,seanchas116/electron,rprichard/electron,thingsinjars/electron,Rokt33r/electron,MaxGraey/electron,takashi/electron,jtburke/electron,cqqccqc/electron,Jonekee/electron,Jacobichou/electron,sky7sea/electron,wan-qy/electron,voidbridge/electron,maxogden/atom-shell,dkfiresky/electron,DivyaKMenon/electron,simongregory/electron,Jacobichou/electron,lrlna/electron,sshiting/electron,gerhardberger/electron,yalexx/electron,gerhardberger/electron,coderhaoxin/electron,vipulroxx/electron,Ivshti/electron,micalan/electron,trigrass2/electron,evgenyzinoviev/electron,leethomas/electron,astoilkov/electron,cqqccqc/electron,systembugtj/electron,Floato/electron,gerhardberger/electron,tylergibson/electron,cqqccqc/electron,synaptek/electron,tincan24/electron,rreimann/electron,iftekeriba/electron,preco21/electron,gbn972/electron,mjaniszew/electron,joaomoreno/atom-shell,gabriel/electron,vipulroxx/electron,kazupon/electron,Zagorakiss/electron,gamedevsam/electron,tincan24/electron,mubassirhayat/electron,electron/electron,deed02392/electron,bwiggs/electron,carsonmcdonald/electron,systembugtj/electron,ervinb/electron,posix4e/electron,synaptek/electron,aecca/electron,Jacobichou/electron,preco21/electron,yalexx/electron,bruce/electron,etiktin/electron,Andrey-Pavlov/electron,sshiting/electron,felixrieseberg/electron,rprichard/electron,fabien-d/electron,GoooIce/electron,adamjgray/electron,maxogden/atom-shell,vaginessa/electron,wan-qy/electron,nicholasess/electron,dkfiresky/electron,fabien-d/electron,beni55/electron,takashi/electron,deed02392/electron,stevekinney/electron,gabriel/electron,michaelchiche/electron,saronwei/electron,mjaniszew/electron,voidbridge/electron,Faiz7412/electron,carsonmcdonald/electron,Faiz7412/electron,baiwyc119/electron,posix4e/electron,adamjgray/electron,vipulroxx/electron,the-ress/electron,anko/electron,etiktin/electron,seanchas116/electron,MaxWhere/electron,aichingm/electron,RIAEvangelist/electron,Jacobichou/electron,jaanus/electron,nicobot/electron,xfstudio/electron,hokein/atom-shell,coderhaoxin/electron,neutrous/electron,SufianHassan/electron,Rokt33r/electron,RobertJGabriel/electron,tylergibson/electron,lzpfmh/electron,ankitaggarwal011/electron,joaomoreno/atom-shell,medixdev/electron,Floato/electron,mjaniszew/electron,jonatasfreitasv/electron,gamedevsam/electron,stevekinney/electron,gerhardberger/electron,jcblw/electron,timruffles/electron,shiftkey/electron,noikiy/electron,yalexx/electron,cqqccqc/electron,Gerhut/electron,tonyganch/electron,IonicaBizauKitchen/electron,joaomoreno/atom-shell,ervinb/electron,bitemyapp/electron,noikiy/electron,yan-foto/electron,smczk/electron,ankitaggarwal011/electron,trankmichael/electron,stevekinney/electron,Gerhut/electron,mirrh/electron,John-Lin/electron,mirrh/electron,xfstudio/electron,pandoraui/electron,sircharleswatson/electron,mattotodd/electron,JussMee15/electron,gabrielPeart/electron,natgolov/electron,tomashanacek/electron,cos2004/electron,abhishekgahlot/electron,hokein/atom-shell,astoilkov/electron,jannishuebl/electron,baiwyc119/electron,webmechanicx/electron,baiwyc119/electron,setzer777/electron,jacksondc/electron,farmisen/electron,posix4e/electron,soulteary/electron,natgolov/electron,anko/electron,the-ress/electron,nagyistoce/electron-atom-shell,joneit/electron,ianscrivener/electron,eric-seekas/electron,ervinb/electron,fabien-d/electron,aichingm/electron,bbondy/electron,michaelchiche/electron,Gerhut/electron,mhkeller/electron,preco21/electron,vaginessa/electron,dkfiresky/electron,simonfork/electron,setzer777/electron,systembugtj/electron,thomsonreuters/electron,d-salas/electron,trigrass2/electron,xiruibing/electron,kostia/electron,felixrieseberg/electron,cos2004/electron,tinydew4/electron,biblerule/UMCTelnetHub,minggo/electron,Zagorakiss/electron,carsonmcdonald/electron,stevemao/electron,JesselJohn/electron,timruffles/electron,synaptek/electron,jlhbaseball15/electron,Jonekee/electron,bruce/electron,fomojola/electron,eric-seekas/electron,fireball-x/atom-shell,greyhwndz/electron,jacksondc/electron,matiasinsaurralde/electron,saronwei/electron,kazupon/electron,rajatsingla28/electron,brenca/electron,dongjoon-hyun/electron,IonicaBizauKitchen/electron,arusakov/electron,nekuz0r/electron,kazupon/electron,thomsonreuters/electron,mattdesl/electron,simonfork/electron,smczk/electron,nicholasess/electron,Neron-X5/electron,eriser/electron,GoooIce/electron,bright-sparks/electron,faizalpribadi/electron,bitemyapp/electron,mjaniszew/electron,eriser/electron,soulteary/electron,synaptek/electron,gabrielPeart/electron,simonfork/electron,mirrh/electron,mhkeller/electron,nicholasess/electron,fritx/electron,howmuchcomputer/electron,tonyganch/electron,posix4e/electron,kenmozi/electron,xfstudio/electron,JussMee15/electron,Jonekee/electron,aecca/electron,sircharleswatson/electron,icattlecoder/electron,jiaz/electron,renaesop/electron,rreimann/electron,Andrey-Pavlov/electron,thomsonreuters/electron,rhencke/electron,simongregory/electron,RobertJGabriel/electron,simonfork/electron,Andrey-Pavlov/electron,nagyistoce/electron-atom-shell,wan-qy/electron,pombredanne/electron,thingsinjars/electron,evgenyzinoviev/electron,lrlna/electron,setzer777/electron,benweissmann/electron,robinvandernoord/electron,aliib/electron,Andrey-Pavlov/electron,darwin/electron,shiftkey/electron,twolfson/electron,benweissmann/electron,shiftkey/electron,DivyaKMenon/electron,smczk/electron,wan-qy/electron,egoist/electron,pirafrank/electron,jcblw/electron,tinydew4/electron,leethomas/electron,evgenyzinoviev/electron,Jonekee/electron,jjz/electron,vipulroxx/electron,chrisswk/electron,minggo/electron,miniak/electron,RobertJGabriel/electron,fabien-d/electron,biblerule/UMCTelnetHub,kikong/electron,neutrous/electron,mirrh/electron,JussMee15/electron,dongjoon-hyun/electron,seanchas116/electron,minggo/electron,wolfflow/electron,aliib/electron,xiruibing/electron,jcblw/electron,adcentury/electron,rsvip/electron,oiledCode/electron,MaxWhere/electron,Neron-X5/electron,rajatsingla28/electron,faizalpribadi/electron,digideskio/electron,xiruibing/electron,DivyaKMenon/electron,Rokt33r/electron,bright-sparks/electron,GoooIce/electron,Neron-X5/electron,electron/electron,brave/electron,deed02392/electron,vHanda/electron,destan/electron,DivyaKMenon/electron,jlhbaseball15/electron,sky7sea/electron,fffej/electron,oiledCode/electron,jiaz/electron,jlord/electron,brave/muon,kostia/electron,bruce/electron,setzer777/electron,mjaniszew/electron,sircharleswatson/electron,saronwei/electron,zhakui/electron,deepak1556/atom-shell,dahal/electron,ervinb/electron,John-Lin/electron,chrisswk/electron,jjz/electron,jacksondc/electron,d-salas/electron,destan/electron,soulteary/electron,Ivshti/electron,nicholasess/electron,baiwyc119/electron,edulan/electron,natgolov/electron,posix4e/electron,leftstick/electron,bright-sparks/electron,farmisen/electron,beni55/electron,jjz/electron,yalexx/electron,Jacobichou/electron,fffej/electron,leethomas/electron,gbn972/electron,matiasinsaurralde/electron,Ivshti/electron,bobwol/electron,Floato/electron,IonicaBizauKitchen/electron,stevemao/electron,fireball-x/atom-shell,pirafrank/electron,SufianHassan/electron,etiktin/electron,JesselJohn/electron,vHanda/electron,icattlecoder/electron,gamedevsam/electron,stevemao/electron,biblerule/UMCTelnetHub,destan/electron,shaundunne/electron,anko/electron,shennushi/electron,fritx/electron,kostia/electron,faizalpribadi/electron,anko/electron,meowlab/electron,biblerule/UMCTelnetHub,seanchas116/electron,jacksondc/electron,leolujuyi/electron,robinvandernoord/electron,MaxWhere/electron,IonicaBizauKitchen/electron,shennushi/electron,simongregory/electron,Faiz7412/electron,rhencke/electron,miniak/electron,mrwizard82d1/electron,kokdemo/electron,michaelchiche/electron,faizalpribadi/electron,greyhwndz/electron,electron/electron,mattotodd/electron,fomojola/electron,arusakov/electron,arusakov/electron,JesselJohn/electron,nicobot/electron,bpasero/electron,kokdemo/electron,SufianHassan/electron,jlord/electron,roadev/electron,christian-bromann/electron,sky7sea/electron,IonicaBizauKitchen/electron,trigrass2/electron,adcentury/electron,adcentury/electron,minggo/electron,rajatsingla28/electron,bitemyapp/electron,sshiting/electron,thomsonreuters/electron,iftekeriba/electron,mattdesl/electron,gerhardberger/electron,the-ress/electron,ankitaggarwal011/electron,rprichard/electron,SufianHassan/electron,Zagorakiss/electron,leolujuyi/electron,benweissmann/electron,Ivshti/electron,thompsonemerson/electron,wolfflow/electron,gerhardberger/electron,hokein/atom-shell,fffej/electron,BionicClick/electron,coderhaoxin/electron,chriskdon/electron,destan/electron,abhishekgahlot/electron,lrlna/electron,smczk/electron,kenmozi/electron,micalan/electron,kcrt/electron,kcrt/electron,trankmichael/electron,simongregory/electron,pirafrank/electron,jcblw/electron,medixdev/electron,aliib/electron,digideskio/electron,kcrt/electron,oiledCode/electron,pombredanne/electron,jaanus/electron,aaron-goshine/electron,christian-bromann/electron,jlhbaseball15/electron,icattlecoder/electron,jannishuebl/electron,abhishekgahlot/electron,gabrielPeart/electron,bobwol/electron,davazp/electron,mrwizard82d1/electron,joneit/electron,miniak/electron,brenca/electron,darwin/electron,icattlecoder/electron,brave/electron,sky7sea/electron,smczk/electron,synaptek/electron,eriser/electron,Evercoder/electron,abhishekgahlot/electron,shennushi/electron,davazp/electron,tonyganch/electron,shiftkey/electron,RIAEvangelist/electron,coderhaoxin/electron,fritx/electron,aecca/electron,MaxGraey/electron,kostia/electron,lrlna/electron,tomashanacek/electron,oiledCode/electron,jaanus/electron,lzpfmh/electron,gabrielPeart/electron,yan-foto/electron,dongjoon-hyun/electron,medixdev/electron,arturts/electron,felixrieseberg/electron,nagyistoce/electron-atom-shell,beni55/electron,jacksondc/electron,kenmozi/electron,miniak/electron,tylergibson/electron,kikong/electron,gbn972/electron,fritx/electron,Jonekee/electron,felixrieseberg/electron,simonfork/electron,thingsinjars/electron,smczk/electron,deepak1556/atom-shell,kokdemo/electron,dongjoon-hyun/electron,neutrous/electron,davazp/electron,Jacobichou/electron,d-salas/electron,matiasinsaurralde/electron,systembugtj/electron,JesselJohn/electron,mrwizard82d1/electron,Gerhut/electron,dongjoon-hyun/electron,IonicaBizauKitchen/electron,lrlna/electron,brenca/electron,biblerule/UMCTelnetHub,saronwei/electron,dahal/electron,rsvip/electron,iftekeriba/electron,trankmichael/electron,benweissmann/electron,michaelchiche/electron,bruce/electron,setzer777/electron,SufianHassan/electron,etiktin/electron,the-ress/electron,mattdesl/electron,electron/electron,noikiy/electron,lzpfmh/electron,Faiz7412/electron,brave/electron,Jonekee/electron,gerhardberger/electron,mattotodd/electron,fomojola/electron,cqqccqc/electron,mattdesl/electron,arusakov/electron,deepak1556/atom-shell,xfstudio/electron,kcrt/electron,soulteary/electron,farmisen/electron,brenca/electron,robinvandernoord/electron,fireball-x/atom-shell,gstack/infinium-shell,mirrh/electron,ankitaggarwal011/electron,roadev/electron,christian-bromann/electron,bpasero/electron,egoist/electron,egoist/electron,timruffles/electron,tomashanacek/electron,webmechanicx/electron,gbn972/electron,subblue/electron,bbondy/electron,joneit/electron,icattlecoder/electron,jcblw/electron,tylergibson/electron,aaron-goshine/electron,webmechanicx/electron,sshiting/electron,anko/electron,thomsonreuters/electron,gstack/infinium-shell,d-salas/electron,brenca/electron,Floato/electron,aecca/electron,pandoraui/electron,thompsonemerson/electron,iftekeriba/electron,mubassirhayat/electron,subblue/electron,simongregory/electron,tonyganch/electron,leethomas/electron,leftstick/electron,sshiting/electron,takashi/electron,noikiy/electron,joaomoreno/atom-shell,thingsinjars/electron,pirafrank/electron,JussMee15/electron,vHanda/electron,JussMee15/electron,yan-foto/electron,kokdemo/electron,jhen0409/electron,arusakov/electron,christian-bromann/electron,edulan/electron,ianscrivener/electron,mhkeller/electron,tylergibson/electron,pandoraui/electron,arusakov/electron,beni55/electron,shaundunne/electron,dkfiresky/electron,carsonmcdonald/electron,bobwol/electron,renaesop/electron,timruffles/electron,Floato/electron,ankitaggarwal011/electron,wolfflow/electron,oiledCode/electron,aichingm/electron,posix4e/electron,twolfson/electron,kenmozi/electron,mattotodd/electron,etiktin/electron,jtburke/electron,sky7sea/electron,davazp/electron,chriskdon/electron,leolujuyi/electron,eriser/electron,nicobot/electron,brave/muon,Rokt33r/electron,leftstick/electron,brave/electron,digideskio/electron,edulan/electron,mattotodd/electron,gabriel/electron,webmechanicx/electron,kostia/electron,dahal/electron,joaomoreno/atom-shell,edulan/electron,benweissmann/electron,pirafrank/electron,mubassirhayat/electron,aliib/electron,sircharleswatson/electron,vipulroxx/electron,rhencke/electron,aichingm/electron,shaundunne/electron,jhen0409/electron,Evercoder/electron,John-Lin/electron,astoilkov/electron,brave/muon,cos2004/electron,abhishekgahlot/electron,preco21/electron,digideskio/electron,matiasinsaurralde/electron,trigrass2/electron,nicholasess/electron,astoilkov/electron,jhen0409/electron,hokein/atom-shell,leethomas/electron,minggo/electron,fireball-x/atom-shell,astoilkov/electron,leftstick/electron,voidbridge/electron,jsutcodes/electron,subblue/electron,kazupon/electron,aichingm/electron,sircharleswatson/electron,ervinb/electron,takashi/electron,saronwei/electron,electron/electron,aichingm/electron
#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main()) Use lowercase for symbol paths
#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') files = [f.lower() for f in files] upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main())
<commit_before>#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main()) <commit_msg>Use lowercase for symbol paths<commit_after>
#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') files = [f.lower() for f in files] upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main())
#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main()) Use lowercase for symbol paths#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') files = [f.lower() for f in files] upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main())
<commit_before>#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main()) <commit_msg>Use lowercase for symbol paths<commit_after>#!/usr/bin/env python import os import glob from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SYMBOLS_DIR = 'dist\\symbols' PDB_LIST = [ 'out\\Release\\atom.exe.pdb', 'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb', ] def main(): os.chdir(SOURCE_ROOT) rm_rf(SYMBOLS_DIR) safe_mkdir(SYMBOLS_DIR) for pdb in PDB_LIST: run_symstore(pdb, SYMBOLS_DIR, 'AtomShell') bucket, access_key, secret_key = s3_config() files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb') files = [f.lower() for f in files] upload_symbols(bucket, access_key, secret_key, files) def run_symstore(pdb, dest, product): execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) def upload_symbols(bucket, access_key, secret_key, files): s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files) if __name__ == '__main__': import sys sys.exit(main())
46be6053526da38ad9f8fdf40ebb870cd64ae88e
nefertari_sqla/serializers.py
nefertari_sqla/serializers.py
import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoder(_JSONEncoder): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(elasticsearch.serializer.JSONSerializer): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc())
import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoderMixin(object): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) return super(JSONEncoderMixin, self).default(obj) class JSONEncoder(JSONEncoderMixin, _JSONEncoder): def default(self, obj): if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(JSONEncoderMixin, elasticsearch.serializer.JSONSerializer): def default(self, obj): try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc())
Refactor encoders to have base class
Refactor encoders to have base class
Python
apache-2.0
ramses-tech/nefertari-sqla,geniusproject/nefertari-sqla,brandicted/nefertari-sqla,oleduc/nefertari-sqla
import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoder(_JSONEncoder): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(elasticsearch.serializer.JSONSerializer): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc()) Refactor encoders to have base class
import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoderMixin(object): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) return super(JSONEncoderMixin, self).default(obj) class JSONEncoder(JSONEncoderMixin, _JSONEncoder): def default(self, obj): if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(JSONEncoderMixin, elasticsearch.serializer.JSONSerializer): def default(self, obj): try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc())
<commit_before>import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoder(_JSONEncoder): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(elasticsearch.serializer.JSONSerializer): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc()) <commit_msg>Refactor encoders to have base class<commit_after>
import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoderMixin(object): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) return super(JSONEncoderMixin, self).default(obj) class JSONEncoder(JSONEncoderMixin, _JSONEncoder): def default(self, obj): if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(JSONEncoderMixin, elasticsearch.serializer.JSONSerializer): def default(self, obj): try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc())
import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoder(_JSONEncoder): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(elasticsearch.serializer.JSONSerializer): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc()) Refactor encoders to have base classimport datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoderMixin(object): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) return super(JSONEncoderMixin, self).default(obj) class JSONEncoder(JSONEncoderMixin, _JSONEncoder): def default(self, obj): if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(JSONEncoderMixin, elasticsearch.serializer.JSONSerializer): def default(self, obj): try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc())
<commit_before>import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoder(_JSONEncoder): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(elasticsearch.serializer.JSONSerializer): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc()) <commit_msg>Refactor encoders to have base class<commit_after>import datetime import decimal import logging import elasticsearch from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoderMixin(object): def default(self, obj): if isinstance(obj, (datetime.datetime, datetime.date)): return obj.strftime("%Y-%m-%dT%H:%M:%SZ") # iso if isinstance(obj, datetime.time): return obj.strftime('%H:%M:%S') if isinstance(obj, datetime.timedelta): return obj.seconds if isinstance(obj, decimal.Decimal): return float(obj) return super(JSONEncoderMixin, self).default(obj) class JSONEncoder(JSONEncoderMixin, _JSONEncoder): def default(self, obj): if hasattr(obj, 'to_dict'): # If it got to this point, it means its a nested object. # Outter objects would have been handled with DataProxy. return obj.to_dict(__nested=True) return super(JSONEncoder, self).default(obj) class ESJSONSerializer(JSONEncoderMixin, elasticsearch.serializer.JSONSerializer): def default(self, obj): try: return super(ESJSONSerializer, self).default(obj) except: import traceback log.error(traceback.format_exc())
bcca20cecbc664422f72359ba4fba7d55e833b32
swampdragon/connections/sockjs_connection.py
swampdragon/connections/sockjs_connection.py
from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session)
from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): channels = [] def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session)
Include channel list in connection
Include channel list in connection
Python
bsd-3-clause
sahlinet/swampdragon,denizs/swampdragon,michael-k/swampdragon,seclinch/swampdragon,Manuel4131/swampdragon,aexeagmbh/swampdragon,Manuel4131/swampdragon,d9pouces/swampdragon,aexeagmbh/swampdragon,michael-k/swampdragon,d9pouces/swampdragon,boris-savic/swampdragon,boris-savic/swampdragon,jonashagstedt/swampdragon,jonashagstedt/swampdragon,faulkner/swampdragon,faulkner/swampdragon,aexeagmbh/swampdragon,Manuel4131/swampdragon,michael-k/swampdragon,d9pouces/swampdragon,denizs/swampdragon,sahlinet/swampdragon,bastianh/swampdragon,h-hirokawa/swampdragon,bastianh/swampdragon,seclinch/swampdragon,faulkner/swampdragon,bastianh/swampdragon,h-hirokawa/swampdragon,sahlinet/swampdragon,seclinch/swampdragon,jonashagstedt/swampdragon,denizs/swampdragon,boris-savic/swampdragon
from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session) Include channel list in connection
from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): channels = [] def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session)
<commit_before>from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session) <commit_msg>Include channel list in connection<commit_after>
from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): channels = [] def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session)
from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session) Include channel list in connectionfrom sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): channels = [] def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session)
<commit_before>from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session) <commit_msg>Include channel list in connection<commit_after>from sockjs.tornado import SockJSConnection from ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider from .. import route_handler import json pub_sub = RedisPubSubProvider() class ConnectionMixin(object): def to_json(self, data): if isinstance(data, dict): return data try: data = json.loads(data.replace("'", '"')) return data except: return json.dumps({'message': data}) def to_string(self, data): if isinstance(data, dict): return json.dumps(data).replace("'", '"') return data class SubscriberConnection(ConnectionMixin, SockJSConnection): channels = [] def __init__(self, session): super(SubscriberConnection, self).__init__(session) def on_open(self, request): self.pub_sub = pub_sub def on_close(self): self.pub_sub.close(self) def on_message(self, data): try: data = self.to_json(data) handler = route_handler.get_route_handler(data['route']) handler(self).handle(data) except Exception as e: self.abort_connection() raise e def abort_connection(self): self.close() def send(self, message, binary=False): super(SubscriberConnection, self).send(message, binary) def broadcast(self, clients, message): super(SubscriberConnection, self).broadcast(clients, message) class DjangoSubscriberConnection(SubscriberConnection): def __init__(self, session): super(DjangoSubscriberConnection, self).__init__(session)
cd90cf68f0f98f569bc8c2e1739e866eb0630893
test/test_dbserver_bdb.py
test/test_dbserver_bdb.py
#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBDB(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main()
#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBerkeley(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main()
Change BDB test to match naming scheme
DBServer: Change BDB test to match naming scheme
Python
bsd-3-clause
blindsighttf2/Astron,ketoo/Astron,pizcogirl/Astron,blindsighttf2/Astron,blindsighttf2/Astron,pizcogirl/Astron,pizcogirl/Astron,blindsighttf2/Astron,ketoo/Astron,ketoo/Astron,ketoo/Astron,pizcogirl/Astron
#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBDB(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main() DBServer: Change BDB test to match naming scheme
#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBerkeley(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main()
<commit_before>#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBDB(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main() <commit_msg>DBServer: Change BDB test to match naming scheme<commit_after>
#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBerkeley(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main()
#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBDB(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main() DBServer: Change BDB test to match naming scheme#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBerkeley(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main()
<commit_before>#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBDB(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main() <commit_msg>DBServer: Change BDB test to match naming scheme<commit_after>#!/usr/bin/env python2 import unittest from socket import * from common import * from testdc import * from test_dbserver import DatabaseBaseTests CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 general: dc_files: - %r roles: - type: database control: 777 generate: min: 1000000 max: 1001000 storage: type: bdb filename: main_database.db """ % test_dc class TestDatabaseServerBerkeley(unittest.TestCase, DatabaseBaseTests): @classmethod def setUpClass(cls): cls.daemon = Daemon(CONFIG) cls.daemon.start() sock = socket(AF_INET, SOCK_STREAM) sock.connect(('127.0.0.1', 57123)) cls.conn = MDConnection(sock) if __name__ == '__main__': unittest.main()
946212f26ff72ea89cb549dfd759572975a6b8ad
grammpy_transforms/EpsilonRulesRemove/findTerminalsRewritedToEps.py
grammpy_transforms/EpsilonRulesRemove/findTerminalsRewritedToEps.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: raise NotImplementedError()
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar, EPSILON def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: rewritable = {EPSILON} while True: working = rewritable.copy() for rule in grammar.rules(): allRewritable = True for symbol in rule.right: if symbol not in rewritable: allRewritable = False if allRewritable: working.add(rule.fromSymbol) if working == rewritable: break rewritable = working rewritable.remove(EPSILON) return [i for i in rewritable]
Implement finding of nonterminals rewritable to epsilon
Implement finding of nonterminals rewritable to epsilon
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: raise NotImplementedError() Implement finding of nonterminals rewritable to epsilon
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar, EPSILON def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: rewritable = {EPSILON} while True: working = rewritable.copy() for rule in grammar.rules(): allRewritable = True for symbol in rule.right: if symbol not in rewritable: allRewritable = False if allRewritable: working.add(rule.fromSymbol) if working == rewritable: break rewritable = working rewritable.remove(EPSILON) return [i for i in rewritable]
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: raise NotImplementedError() <commit_msg>Implement finding of nonterminals rewritable to epsilon<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar, EPSILON def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: rewritable = {EPSILON} while True: working = rewritable.copy() for rule in grammar.rules(): allRewritable = True for symbol in rule.right: if symbol not in rewritable: allRewritable = False if allRewritable: working.add(rule.fromSymbol) if working == rewritable: break rewritable = working rewritable.remove(EPSILON) return [i for i in rewritable]
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: raise NotImplementedError() Implement finding of nonterminals rewritable to epsilon#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar, EPSILON def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: rewritable = {EPSILON} while True: working = rewritable.copy() for rule in grammar.rules(): allRewritable = True for symbol in rule.right: if symbol not in rewritable: allRewritable = False if allRewritable: working.add(rule.fromSymbol) if working == rewritable: break rewritable = working rewritable.remove(EPSILON) return [i for i in rewritable]
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: raise NotImplementedError() <commit_msg>Implement finding of nonterminals rewritable to epsilon<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 15:42 :Licence GNUv3 Part of grammpy-transforms """ from grammpy import Grammar, EPSILON def find_terminals_rewritable_to_epsilon(grammar: Grammar) -> list: rewritable = {EPSILON} while True: working = rewritable.copy() for rule in grammar.rules(): allRewritable = True for symbol in rule.right: if symbol not in rewritable: allRewritable = False if allRewritable: working.add(rule.fromSymbol) if working == rewritable: break rewritable = working rewritable.remove(EPSILON) return [i for i in rewritable]
0aa7830b3d841d9851521c14b8754f9101bc9a96
demo/views.py
demo/views.py
from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query try: # Wagtail >= 1.1 from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion except ImportError: # Wagtail < 1.1 from wagtail.wagtailsearch.models import EditorsPick as SearchPromotion def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, })
from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, })
Remove check for Wagtail 1.1
Remove check for Wagtail 1.1
Python
bsd-3-clause
torchbox/wagtaildemo,torchbox/wagtaildemo,torchbox/wagtaildemo,torchbox/wagtaildemo
from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query try: # Wagtail >= 1.1 from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion except ImportError: # Wagtail < 1.1 from wagtail.wagtailsearch.models import EditorsPick as SearchPromotion def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, }) Remove check for Wagtail 1.1
from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, })
<commit_before>from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query try: # Wagtail >= 1.1 from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion except ImportError: # Wagtail < 1.1 from wagtail.wagtailsearch.models import EditorsPick as SearchPromotion def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, }) <commit_msg>Remove check for Wagtail 1.1<commit_after>
from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, })
from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query try: # Wagtail >= 1.1 from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion except ImportError: # Wagtail < 1.1 from wagtail.wagtailsearch.models import EditorsPick as SearchPromotion def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, }) Remove check for Wagtail 1.1from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, })
<commit_before>from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query try: # Wagtail >= 1.1 from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion except ImportError: # Wagtail < 1.1 from wagtail.wagtailsearch.models import EditorsPick as SearchPromotion def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, }) <commit_msg>Remove check for Wagtail 1.1<commit_after>from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from wagtail.contrib.wagtailsearchpromotions.models import SearchPromotion from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query def search(request): # Search search_query = request.GET.get('query', None) if search_query: search_results = Page.objects.live().search(search_query) query = Query.get(search_query) # Record hit query.add_hit() # Get search picks search_picks = query.editors_picks.all() else: search_results = Page.objects.none() search_picks = SearchPromotion.objects.none() # Pagination page = request.GET.get('page', 1) paginator = Paginator(search_results, 10) try: search_results = paginator.page(page) except PageNotAnInteger: search_results = paginator.page(1) except EmptyPage: search_results = paginator.page(paginator.num_pages) return render(request, 'demo/search_results.html', { 'search_query': search_query, 'search_results': search_results, 'search_picks': search_picks, })
ff3a7ad122af4cc1cdfa0b882b2d1d7366d640f2
tests/unit/test_secret.py
tests/unit/test_secret.py
# Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
# Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) def test_unicode_issues(self): msg = u'Unicode string' box = libnacl.secret.SecretBox() # Encrypting a unicode string (in py2) should # probable assert, but instead it encryptes zeros, # perhaps the high bytes in UCS-16? ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
Add failing test for unicode string encryption
Add failing test for unicode string encryption
Python
apache-2.0
coinkite/libnacl
# Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) Add failing test for unicode string encryption
# Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) def test_unicode_issues(self): msg = u'Unicode string' box = libnacl.secret.SecretBox() # Encrypting a unicode string (in py2) should # probable assert, but instead it encryptes zeros, # perhaps the high bytes in UCS-16? ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
<commit_before># Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) <commit_msg>Add failing test for unicode string encryption<commit_after>
# Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) def test_unicode_issues(self): msg = u'Unicode string' box = libnacl.secret.SecretBox() # Encrypting a unicode string (in py2) should # probable assert, but instead it encryptes zeros, # perhaps the high bytes in UCS-16? ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
# Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) Add failing test for unicode string encryption# Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) def test_unicode_issues(self): msg = u'Unicode string' box = libnacl.secret.SecretBox() # Encrypting a unicode string (in py2) should # probable assert, but instead it encryptes zeros, # perhaps the high bytes in UCS-16? ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
<commit_before># Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) <commit_msg>Add failing test for unicode string encryption<commit_after># Import libnacl libs import libnacl.secret # Import python libs import unittest class TestSecret(unittest.TestCase): ''' ''' def test_secret(self): msg = b'But then of course African swallows are not migratory.' box = libnacl.secret.SecretBox() ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg) def test_unicode_issues(self): msg = u'Unicode string' box = libnacl.secret.SecretBox() # Encrypting a unicode string (in py2) should # probable assert, but instead it encryptes zeros, # perhaps the high bytes in UCS-16? ctxt = box.encrypt(msg) self.assertNotEqual(msg, ctxt) box2 = libnacl.secret.SecretBox(box.sk) clear1 = box.decrypt(ctxt) self.assertEqual(msg, clear1) clear2 = box2.decrypt(ctxt) self.assertEqual(clear1, clear2) ctxt2 = box2.encrypt(msg) clear3 = box.decrypt(ctxt2) self.assertEqual(clear3, msg)
316bb319e5422e4fe35b5b0ae2e58617dddad6cd
scrape_symbols.py
scrape_symbols.py
#!/usr/bin/env python # encoding: utf-8 def main(): pass if __name__ == '__main__': main()
#!/usr/bin/env python # encoding: utf-8 from __future__ import unicode_literals import codecs import dshelpers import lxml def get_yahoo_ticker_xml(): """ Return Yahoo! Finance ticker company details as XML. """ url = "http://query.yahooapis.com/v1/public/yql?q=" \ "select%20*%20from%20yahoo.finance.industry%20where%20id%20in%20" \ "(select%20industry.id%20from%20yahoo.finance.sectors)&" \ "env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" return dshelpers.download_url(url) def yield_ticker_info_from_csv(xml): """ Extract symbols and company names from Yahoo! ticker XML. """ xml_tree = lxml.etree.parse(xml) results = xml_tree.xpath('//company') for result in results: industry = '"' + result.getparent().get('name') + '"' name = '"' + result.get('name') + '"' yield ','.join([name, result.get('symbol'), industry]) def write_header(fobj): """ Write header row to ticker CSV. """ fobj.write('company name,symbol,industry\n') def write_csv(xml): """ Write header row and company info to CSV. """ with codecs.open('ticker_info.csv', 'w', 'utf-8') as f: write_header(f) for company_info in yield_ticker_info_from_csv(xml): f.write(company_info + '\n') def main(): dshelpers.install_cache() xml = get_yahoo_ticker_xml() write_csv(xml) if __name__ == '__main__': main()
Implement conversion of Yahoo! tickers to CSV.
Implement conversion of Yahoo! tickers to CSV.
Python
agpl-3.0
scraperwiki/stock-tool,scraperwiki/stock-tool
#!/usr/bin/env python # encoding: utf-8 def main(): pass if __name__ == '__main__': main() Implement conversion of Yahoo! tickers to CSV.
#!/usr/bin/env python # encoding: utf-8 from __future__ import unicode_literals import codecs import dshelpers import lxml def get_yahoo_ticker_xml(): """ Return Yahoo! Finance ticker company details as XML. """ url = "http://query.yahooapis.com/v1/public/yql?q=" \ "select%20*%20from%20yahoo.finance.industry%20where%20id%20in%20" \ "(select%20industry.id%20from%20yahoo.finance.sectors)&" \ "env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" return dshelpers.download_url(url) def yield_ticker_info_from_csv(xml): """ Extract symbols and company names from Yahoo! ticker XML. """ xml_tree = lxml.etree.parse(xml) results = xml_tree.xpath('//company') for result in results: industry = '"' + result.getparent().get('name') + '"' name = '"' + result.get('name') + '"' yield ','.join([name, result.get('symbol'), industry]) def write_header(fobj): """ Write header row to ticker CSV. """ fobj.write('company name,symbol,industry\n') def write_csv(xml): """ Write header row and company info to CSV. """ with codecs.open('ticker_info.csv', 'w', 'utf-8') as f: write_header(f) for company_info in yield_ticker_info_from_csv(xml): f.write(company_info + '\n') def main(): dshelpers.install_cache() xml = get_yahoo_ticker_xml() write_csv(xml) if __name__ == '__main__': main()
<commit_before>#!/usr/bin/env python # encoding: utf-8 def main(): pass if __name__ == '__main__': main() <commit_msg>Implement conversion of Yahoo! tickers to CSV.<commit_after>
#!/usr/bin/env python # encoding: utf-8 from __future__ import unicode_literals import codecs import dshelpers import lxml def get_yahoo_ticker_xml(): """ Return Yahoo! Finance ticker company details as XML. """ url = "http://query.yahooapis.com/v1/public/yql?q=" \ "select%20*%20from%20yahoo.finance.industry%20where%20id%20in%20" \ "(select%20industry.id%20from%20yahoo.finance.sectors)&" \ "env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" return dshelpers.download_url(url) def yield_ticker_info_from_csv(xml): """ Extract symbols and company names from Yahoo! ticker XML. """ xml_tree = lxml.etree.parse(xml) results = xml_tree.xpath('//company') for result in results: industry = '"' + result.getparent().get('name') + '"' name = '"' + result.get('name') + '"' yield ','.join([name, result.get('symbol'), industry]) def write_header(fobj): """ Write header row to ticker CSV. """ fobj.write('company name,symbol,industry\n') def write_csv(xml): """ Write header row and company info to CSV. """ with codecs.open('ticker_info.csv', 'w', 'utf-8') as f: write_header(f) for company_info in yield_ticker_info_from_csv(xml): f.write(company_info + '\n') def main(): dshelpers.install_cache() xml = get_yahoo_ticker_xml() write_csv(xml) if __name__ == '__main__': main()
#!/usr/bin/env python # encoding: utf-8 def main(): pass if __name__ == '__main__': main() Implement conversion of Yahoo! tickers to CSV.#!/usr/bin/env python # encoding: utf-8 from __future__ import unicode_literals import codecs import dshelpers import lxml def get_yahoo_ticker_xml(): """ Return Yahoo! Finance ticker company details as XML. """ url = "http://query.yahooapis.com/v1/public/yql?q=" \ "select%20*%20from%20yahoo.finance.industry%20where%20id%20in%20" \ "(select%20industry.id%20from%20yahoo.finance.sectors)&" \ "env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" return dshelpers.download_url(url) def yield_ticker_info_from_csv(xml): """ Extract symbols and company names from Yahoo! ticker XML. """ xml_tree = lxml.etree.parse(xml) results = xml_tree.xpath('//company') for result in results: industry = '"' + result.getparent().get('name') + '"' name = '"' + result.get('name') + '"' yield ','.join([name, result.get('symbol'), industry]) def write_header(fobj): """ Write header row to ticker CSV. """ fobj.write('company name,symbol,industry\n') def write_csv(xml): """ Write header row and company info to CSV. """ with codecs.open('ticker_info.csv', 'w', 'utf-8') as f: write_header(f) for company_info in yield_ticker_info_from_csv(xml): f.write(company_info + '\n') def main(): dshelpers.install_cache() xml = get_yahoo_ticker_xml() write_csv(xml) if __name__ == '__main__': main()
<commit_before>#!/usr/bin/env python # encoding: utf-8 def main(): pass if __name__ == '__main__': main() <commit_msg>Implement conversion of Yahoo! tickers to CSV.<commit_after>#!/usr/bin/env python # encoding: utf-8 from __future__ import unicode_literals import codecs import dshelpers import lxml def get_yahoo_ticker_xml(): """ Return Yahoo! Finance ticker company details as XML. """ url = "http://query.yahooapis.com/v1/public/yql?q=" \ "select%20*%20from%20yahoo.finance.industry%20where%20id%20in%20" \ "(select%20industry.id%20from%20yahoo.finance.sectors)&" \ "env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" return dshelpers.download_url(url) def yield_ticker_info_from_csv(xml): """ Extract symbols and company names from Yahoo! ticker XML. """ xml_tree = lxml.etree.parse(xml) results = xml_tree.xpath('//company') for result in results: industry = '"' + result.getparent().get('name') + '"' name = '"' + result.get('name') + '"' yield ','.join([name, result.get('symbol'), industry]) def write_header(fobj): """ Write header row to ticker CSV. """ fobj.write('company name,symbol,industry\n') def write_csv(xml): """ Write header row and company info to CSV. """ with codecs.open('ticker_info.csv', 'w', 'utf-8') as f: write_header(f) for company_info in yield_ticker_info_from_csv(xml): f.write(company_info + '\n') def main(): dshelpers.install_cache() xml = get_yahoo_ticker_xml() write_csv(xml) if __name__ == '__main__': main()
e981369f61cec6582b3b9b583639f519ab5f0106
deployments/prob140/image/ipython_config.py
deployments/prob140/image/ipython_config.py
# Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.Historymanager.enabled = False # Use memory for notebook notary file to workaround corrupted files on nfs # https://www.sqlite.org/inmemorydb.html # https://github.com/jupyter/jupyter/issues/174 # https://github.com/ipython/ipython/issues/9163 c.NotebookNotary.db_file = ":memory:"
# Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.HistoryManager.enabled = False
Fix typo on ipython config
Fix typo on ipython config s/Historymanager/HistoryManager/
Python
bsd-3-clause
berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub
# Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.Historymanager.enabled = False # Use memory for notebook notary file to workaround corrupted files on nfs # https://www.sqlite.org/inmemorydb.html # https://github.com/jupyter/jupyter/issues/174 # https://github.com/ipython/ipython/issues/9163 c.NotebookNotary.db_file = ":memory:" Fix typo on ipython config s/Historymanager/HistoryManager/
# Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.HistoryManager.enabled = False
<commit_before># Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.Historymanager.enabled = False # Use memory for notebook notary file to workaround corrupted files on nfs # https://www.sqlite.org/inmemorydb.html # https://github.com/jupyter/jupyter/issues/174 # https://github.com/ipython/ipython/issues/9163 c.NotebookNotary.db_file = ":memory:" <commit_msg>Fix typo on ipython config s/Historymanager/HistoryManager/<commit_after>
# Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.HistoryManager.enabled = False
# Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.Historymanager.enabled = False # Use memory for notebook notary file to workaround corrupted files on nfs # https://www.sqlite.org/inmemorydb.html # https://github.com/jupyter/jupyter/issues/174 # https://github.com/ipython/ipython/issues/9163 c.NotebookNotary.db_file = ":memory:" Fix typo on ipython config s/Historymanager/HistoryManager/# Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.HistoryManager.enabled = False
<commit_before># Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.Historymanager.enabled = False # Use memory for notebook notary file to workaround corrupted files on nfs # https://www.sqlite.org/inmemorydb.html # https://github.com/jupyter/jupyter/issues/174 # https://github.com/ipython/ipython/issues/9163 c.NotebookNotary.db_file = ":memory:" <commit_msg>Fix typo on ipython config s/Historymanager/HistoryManager/<commit_after># Disable history manager, we don't really use it # and by default it puts an sqlite file on NFS, which is not something we wanna do c.HistoryManager.enabled = False