Skip to content
Snippets Groups Projects
Commit 2d9a57a8 authored by Marek Chrastina's avatar Marek Chrastina
Browse files

Fix python environment

parent 73c17df6
No related branches found
No related tags found
5 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!280Fix python environment
......@@ -17,6 +17,8 @@ docs:
pylint:
stage: test
image: it4innovations/docker-pycheck:latest
before_script:
- source /opt/.venv3/bin/activate
script:
- pylint $(find . -name "*.py" -not -name "feslicescript.py")
......
......@@ -240,6 +240,7 @@ markdown_extensions:
- pymdownx.snippets:
base_path: snippets
- pymdownx.tabbed:
- pymdownx.superfences
google_analytics:
- 'UA-90498826-1'
......
......@@ -2,6 +2,8 @@
# -*- coding: utf-8 -*-
""" combinations """
from __future__ import print_function
import itertools
import re
......@@ -9,5 +11,5 @@ CHARS = ['A', 'S', 'U', 'T', 'D']
MASK = ''.join(reversed(CHARS))
for i in range(1, len(CHARS)+1):
for comb in itertools.combinations(CHARS, i):
reg = "[^%s]" % ''.join(comb)
print re.sub(reg, "-", MASK)
REG = "[^%s]" % ''.join(comb)
print(re.sub(REG, "-", MASK))
......@@ -2,16 +2,18 @@
# -*- coding: utf-8 -*-
""" matrix """
from __future__ import print_function
import itertools
CHARS = ['A', 'S', 'U', 'P', 'D', 'B']
MASK = ''.join(reversed(CHARS))
for bits in itertools.product([0, 1], repeat=len(CHARS)):
s = "".join(str(bit) for bit in bits)
ns = ""
for i, _ in enumerate(s):
if s[i] == "1":
ns += MASK[i]
SBIT = "".join(str(bit) for bit in bits)
NST = ""
for i, _ in enumerate(SBIT):
if SBIT[i] == "1":
NST += MASK[i]
else:
ns += "-"
print ns
NST += "-"
print(NST)
#!/usr/bin/env python2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" modules_matrix """
......@@ -133,7 +133,6 @@ def main():
if arg.json:
print(json.dumps(packages_json(software)))
else:
print(datalist)
print_hint()
print_software(software)
......
......@@ -39,15 +39,13 @@ def linestart(line, disabled, test, prev_line=None):
if test:
if (line.startswith("``") or line.startswith("extra:")) and not disabled:
return True
else:
if (line.startswith("``") or prev_line.startswith("pages:")) and disabled:
return False
if (line.startswith("``") or prev_line.startswith("pages:")) and disabled:
return False
else:
if line.startswith("``") and not disabled:
return True
else:
if line.startswith("``") and disabled:
return False
if line.startswith("``") and disabled:
return False
return disabled
def testdata(arg):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment