Commit ac8eb125 authored by Lukáš Krupčík's avatar Lukáš Krupčík

Merge branch '1-nespravne-trideni-modulu' into 'master'

Enabled CI

Closes #1

See merge request !3
parents 86499350 31b78e76
Pipeline #5286 passed with stage
in 14 seconds
stages:
- test
docs:
stage: test
image: davidhrbac/docker-mdcheck:latest
allow_failure: true
script:
- mdl -r ~MD024,~MD013,~MD033,~MD014,~MD026,~MD037,~MD036,~MD010,~MD029 *.md
pylint:
stage: test
image: davidhrbac/docker-pycheck:latest
script:
- pylint --max-module-lines=3000 *.py
shellcheck:
stage: test
image: davidhrbac/docker-shellcheck:latest
script:
- shellcheck *.sh
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=150
# Maximum number of lines in a module
max-module-lines=1000
# List of Modules on Clusters
Generate lists
* Salomon - login4
* Anselm - login2
......
#!/bin/bash
# vim: ai ts=2 sw=2 et sts=2 ft=sh
PWD="/home/easybuild/git/it4i-modules"
cd $PWD
STATE=$(git fetch 2>&1 | grep master)
if [ ! -z "$STATE" ]; then
git pull
./get_modules.sh
exit 0
git pull
./get_modules.sh
exit 0
fi
if [ ! -z `hostname -f | grep "bullx"` ]; then
ml --show-hidden -t av 2>&1 > /dev/null| awk '{print $1 ",1"}' | grep -v -e '/,\|:' | sort -u > anselm.csv
./modules.py > anselm.md
if hostname -f | grep -q "bullx"; then
ml --show-hidden -t av > /dev/null 2>&1| awk '{print $1 ",1"}' | grep -v -e '/,\|:' | sort -u > anselm.csv
./modules.py > anselm.md
else
ml --show-hidden -t av 2>&1 > /dev/null| awk '{print $1 ",2"}' | grep -v -e '/,\|:' | sort -u > salomon.csv
./modules.py > salomon.md
ml --show-hidden -t av > /dev/null 2>&1| awk '{print $1 ",2"}' | grep -v -e '/,\|:' | sort -u > salomon.csv
./modules.py > salomon.md
MODULEBASE="/appsuv/modules"
MODULEPATH=""
for resource in "/appsuv/modules,uv2000" "/apps/phi/modules,phi"
do
MODULEBASE=${resource%,*}
MODULEPATH=""
FILENAME=${resource#*,}
for dir in `ls $MODULEBASE`
for dir in $MODULEBASE
do
# Exclude following directories
if [[ ($dir == "all") ]]; then
continue
fi
# In case that it's directory
if [ -d $MODULEBASE/$dir ]; then
if [ -z $MODULEPATH ]; then
MODULEPATH="$MODULEBASE/$dir"
else
MODULEPATH="$MODULEPATH:$MODULEBASE/$dir"
fi
# Exclude following directories
if [[ ($(basename $dir) == "all") ]]; then
continue
fi
# In case that it's directory
if [ -d $dir ]; then
if [ -z $MODULEPATH ]; then
MODULEPATH=$dir
else
MODULEPATH="$MODULEPATH:$MODULEBASE/$dir"
fi
fi
done
export MODULEPATH
ml --show-hidden -t av 2>&1 > /dev/null| awk '{print $1 ",4"}' | grep -v -e '/,\|:' | sort -u > uv2000.csv
./modules.py > uv2000.md
MODULEBASE="/apps/phi/modules"
MODULEPATH=""
for dir in `ls $MODULEBASE`
do
# Exclude following directories
if [[ ($dir == "all") ]]; then
continue
fi
# In case that it's directory
if [ -d $MODULEBASE/$dir ]; then
if [ -z $MODULEPATH ]; then
MODULEPATH="$MODULEBASE/$dir"
else
MODULEPATH="$MODULEPATH:$MODULEBASE/$dir"
fi
fi
done
export MODULEPATH
export MODULEPATH
ml --show-hidden -t av > /dev/null 2>&1| awk '{print $1 ",4"}' | grep -v -e '/,\|:' | sort -u > "$FILENAME".csv
./modules.py > "$FILENAME".md
ml --show-hidden -t av 2>&1 > /dev/null| awk '{print $1 ",8"}' | grep -v -e '/,\|:' | sort -u > phi.csv
./modules.py > phi.md
done
fi
DATE=$(date -R)
......
#!/usr/bin/env python
"""Script to generate module lists"""
import os
import re
......@@ -67,8 +68,8 @@ if __name__ == "__main__":
first_module_path = os.path.join(software_path, software_versions[0])
software_url, software_description = get_module_description(first_module_path)
HTML_SOURCE_DATA[subdir][soft] = {'versions': [],
'url': software_url,
'description': software_description}
'url': software_url,
'description': software_description}
for version in software_versions:
HTML_SOURCE_DATA[subdir][soft]['versions'].append(version)
if software_url in ["", "(none)"]:
......
#!/bin/bash
MODULEBASE="/apps/phi/modules"
MODULEPATH=""
for dir in `ls $MODULEBASE`
do
# Exclude following directories
if [[ ($dir == "all") ]]; then
continue
fi
# In case that it's directory
if [ -d $MODULEBASE/$dir ]; then
if [ -z $MODULEPATH ]; then
MODULEPATH="$MODULEBASE/$dir"
else
MODULEPATH="$MODULEPATH:$MODULEBASE/$dir"
fi
fi
done
export MODULEPATH
./modules.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment