[Notes] [Git][BuildStream/buildstream][jjardon/pycodestyle] 8 commits: Move development reqirements to dev-requirements.txt



Title: GitLab

Javier Jardón pushed to branch jjardon/pycodestyle at BuildStream / buildstream

Commits:

5 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -66,6 +66,8 @@ source_dist:
    66 66
       - chown -R buildstream:buildstream buildstream
    
    67 67
       - cd buildstream
    
    68 68
     
    
    69
    +  - pip3 install pytest-codestyle
    
    70
    +
    
    69 71
       # Run the tests from the source distribution, We run as a simple
    
    70 72
       # user to test for permission issues
    
    71 73
       - su buildstream -c 'python3 setup.py test --index-url invalid://uri --addopts --integration'
    
    ... ... @@ -86,6 +88,9 @@ tests-fedora-27:
    86 88
       image: buildstream/testsuite-fedora:27-master-102-9067e269
    
    87 89
       <<: *linux-tests
    
    88 90
     
    
    91
    +tests-ubuntu-18.04:
    
    92
    +  image: buildstream/testsuite-ubuntu:18.04-master-112-a9f63c5e
    
    93
    +  <<: *linux-tests
    
    89 94
     
    
    90 95
     tests-unix:
    
    91 96
       # Use fedora here, to a) run a test on fedora and b) ensure that we
    
    ... ... @@ -108,6 +113,8 @@ tests-unix:
    108 113
         # Unpack and get into dist/buildstream
    
    109 114
         - cd dist && ./unpack.sh && cd buildstream
    
    110 115
     
    
    116
    +    - pip3 install pytest-codestyle
    
    117
    +
    
    111 118
         # Since the unix platform is required to run as root, no user change required
    
    112 119
         - python3 setup.py test --index-url invalid://uri --addopts --integration
    
    113 120
     
    

  • MANIFEST.in
    ... ... @@ -21,3 +21,6 @@ recursive-include tests *.expected
    21 21
     
    
    22 22
     # Protocol Buffers
    
    23 23
     recursive-include buildstream/_protos *.proto
    
    24
    +
    
    25
    +# Requirements files
    
    26
    +dev-requirements.txt

  • dev-requirements.txt
    1
    +# Pin coverage to 4.2 for now, we're experiencing
    
    2
    +# random crashes with 4.4.2
    
    3
    +coverage == 4.4.0
    
    4
    +pytest >= 3.1.0
    
    5
    +pytest-codestyle
    
    6
    +pytest-cov >= 2.5.0
    
    7
    +pytest-datafiles
    
    8
    +pytest-env
    
    9
    +pytest-pylint
    
    10
    +# Provide option to run tests in parallel, less reliable
    
    11
    +pytest-xdist

  • setup.cfg
    ... ... @@ -10,11 +10,11 @@ parentdir_prefix = BuildStream-
    10 10
     test=pytest
    
    11 11
     
    
    12 12
     [tool:pytest]
    
    13
    -addopts = --verbose --basetemp ./tmp --pep8 --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc
    
    13
    +addopts = --verbose --basetemp ./tmp --codestyle --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc
    
    14 14
     norecursedirs = integration-cache tmp __pycache__ .eggs
    
    15 15
     python_files = tests/*/*.py
    
    16
    -pep8maxlinelength = 119
    
    17
    -pep8ignore =
    
    16
    +codestyle_max_line_length = 119
    
    17
    +codestyle_ignore =
    
    18 18
         * E129
    
    19 19
         * E125
    
    20 20
         doc/source/conf.py ALL
    

  • setup.py
    ... ... @@ -218,6 +218,15 @@ def get_cmdclass():
    218 218
         return cmdclass
    
    219 219
     
    
    220 220
     
    
    221
    +#####################################################
    
    222
    +#               Gather requirements                 #
    
    223
    +#####################################################
    
    224
    +setup_requires = set(['pytest-runner'])
    
    225
    +with open('dev-requirements.txt') as dev_reqs:
    
    226
    +    dev_requires = set([line for line in dev_reqs.read().split('\n')
    
    227
    +                        if not line.strip().startswith('#')])
    
    228
    +
    
    229
    +
    
    221 230
     #####################################################
    
    222 231
     #             Main setup() Invocation               #
    
    223 232
     #####################################################
    
    ... ... @@ -260,17 +269,6 @@ setup(name='BuildStream',
    260 269
               'grpcio >= 1.10',
    
    261 270
           ],
    
    262 271
           entry_points=bst_install_entry_points,
    
    263
    -      setup_requires=['pytest-runner'],
    
    264
    -      tests_require=['pep8',
    
    265
    -                     # Pin coverage to 4.2 for now, we're experiencing
    
    266
    -                     # random crashes with 4.4.2
    
    267
    -                     'coverage == 4.4.0',
    
    268
    -                     'pytest-datafiles',
    
    269
    -                     'pytest-env',
    
    270
    -                     'pytest-pep8',
    
    271
    -                     'pytest-pylint',
    
    272
    -                     'pytest-cov >= 2.5.0',
    
    273
    -                     # Provide option to run tests in parallel, less reliable
    
    274
    -                     'pytest-xdist',
    
    275
    -                     'pytest >= 3.1.0'],
    
    272
    +      setup_requires=list(setup_requires),
    
    273
    +      tests_require=list(dev_requires - setup_requires),
    
    276 274
           zip_safe=False)



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]