Skip to content

Commit

Permalink
Add license document and license text to code. Add simple README file.
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair-droop committed Mar 2, 2018
1 parent b3bad87 commit b2489cb
Show file tree
Hide file tree
Showing 8 changed files with 783 additions and 6 deletions.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions README.md
@@ -0,0 +1,36 @@
# A Simple SGE Template Preprocessor Engine


`qsubsec` is a template language for generating script files for submission using the [SGE grid system](https://arc.liv.ac.uk/trac/SGE). By using this system, you can separate the logic of your qsub jobs from the data required for a specific run.

## Overview

The qsubsec utility processes qsubsec-formatted template files to generate code sections that can be submitted for execution (for example through the SGE scheduler). Before processing, template files are checked for token placeholders and these are filled in. The resulting Python code is then executed to generate a set of sections.

The stages in template processing are:

* The template file and token file(s) are read;
* Any token placeholders found in the template file are filled in using the tokens file(s) read;
* The resulting Python code is executed to yield a set of sections;
* Each section is output in turn

Processed sections can be output in multiple formats (currently `bash` and `qsub`), allowing the same templates to be run on multiple different systems.

For more information on the TFF token definition syntax and the qsubsec template syntax, see the documentation directory.


## Installation

Installation should be as simple as:

~~~bash
git clone https://github.com/alastair-droop/qsubsec3.git
cd qsubsec3
python setup.py install
~~~

Although `qsubsec` can be run on most machines, the qsub executable must be available and functional for automatic qsub submission to work (using the `-s` argument with the qsub format).

## Licence

These tools are released under the [GNU General Public License version 3](http://www.gnu.org/licenses/gpl.html).
13 changes: 12 additions & 1 deletion parseTFF.py
@@ -1,4 +1,15 @@
#!/usr/bin/env python3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import tokens
import os.path
Expand Down
13 changes: 12 additions & 1 deletion qsubsec.py
@@ -1,4 +1,15 @@
#!/usr/bin/env python3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import tokens as qstokens
from sections import SectionList, Limits, CommandType
Expand Down
13 changes: 12 additions & 1 deletion sectionFormatter.py
@@ -1,4 +1,15 @@
#!/usr/bin/env python
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from sections import Requirement, CommandType
from os import remove
Expand Down
13 changes: 12 additions & 1 deletion sections.py
@@ -1,4 +1,15 @@
#!/usr/bin/env python3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import logging as log
import json
Expand Down
13 changes: 12 additions & 1 deletion templates.py
@@ -1,4 +1,15 @@
#!/usr/bin/env python
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import tokens as qstokens
from sections import Option, CommandType, Section, SectionList
Expand Down
14 changes: 13 additions & 1 deletion tokens.py
@@ -1,4 +1,16 @@
#!/usr/bin/env python
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from collections import OrderedDict
from string import Formatter
from itertools import product
Expand Down

0 comments on commit b2489cb

Please sign in to comment.