mirror of https://github.com/interlegis/sapl.git
Eduardo Calil
9 years ago
13 changed files with 175 additions and 102 deletions
@ -1,7 +1,8 @@ |
|||
-r test-requirements.txt |
|||
autopep8==1.2.2 |
|||
autopep8==1.2.4 |
|||
beautifulsoup4==4.4.1 |
|||
django-debug-toolbar==1.4 |
|||
ipdb==0.9.0 |
|||
pygraphviz==1.3rc2 |
|||
ipdb==0.10.1 |
|||
pip-review==0.4 |
|||
pygraphviz==1.3.1 |
|||
pytest-ipdb==0.1-prerelease2 |
@ -1,11 +1,11 @@ |
|||
-r requirements.txt |
|||
coverage==4.0.3 |
|||
coverage==4.1 |
|||
django-webtest |
|||
flake8==2.5.4 |
|||
flake8==2.6.2 |
|||
isort==4.2.5 |
|||
model_mommy==1.2.6 |
|||
model-mommy==1.2.6 |
|||
pep8==1.7.0 |
|||
pytest==2.7.2 |
|||
pytest-cov==2.2.1 |
|||
pytest==2.9.2 |
|||
pytest-cov==2.3.0 |
|||
pytest-django==2.9.1 |
|||
webtest==2.0.21 |
@ -0,0 +1,19 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Generated by Django 1.9.5 on 2016-07-01 12:40 |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('base', '0015_problemamigracao_nome_campo'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterModelOptions( |
|||
name='casalegislativa', |
|||
options={'verbose_name': 'Casa Legislativa', 'verbose_name_plural': 'Casa Legislativa'}, |
|||
), |
|||
] |
@ -0,0 +1,38 @@ |
|||
#!/usr/bin/env python |
|||
|
|||
# Este script altera os arquivos requirements/*requirements.txt |
|||
# atualizando as versões fixadas neles para coincidirem com as do venv. |
|||
# |
|||
# Rode esse script após atualizar as dependências do venv usando, p. ex.: |
|||
# pip-review |
|||
# |
|||
# Após usá-lo confira sempre o resultado com `git diff` e teste as mudanças |
|||
|
|||
import glob |
|||
import re |
|||
import subprocess |
|||
|
|||
freeze_output = subprocess.Popen( |
|||
'pip freeze', shell=True, |
|||
stdout=subprocess.PIPE).stdout.read().decode('ascii') |
|||
freeze = freeze_output.strip().split('\n') |
|||
freeze = {name.lower(): version |
|||
for name, version in [re.split('==+', s) for s in freeze]} |
|||
req_files = glob.glob('requirements/*requirements.txt') |
|||
requirements = [(f, open(f).read().strip().split('\n')) |
|||
for f in req_files] |
|||
|
|||
|
|||
def novas_linhas(linhas): |
|||
for linha in linhas: |
|||
split = re.split('==', linha) |
|||
if len(split) == 1: |
|||
yield split[0] |
|||
else: |
|||
nome, versao = split |
|||
nome = nome.lower() |
|||
yield '%s==%s' % (nome, freeze[nome]) |
|||
|
|||
for arq, linhas in requirements: |
|||
with open(arq, 'w') as f: |
|||
f.writelines(l + '\n' for l in novas_linhas(linhas)) |
Loading…
Reference in new issue