Skip to content

Commit

Permalink
1.1.8 - Legacy removal (#123)
Browse files Browse the repository at this point in the history
- Removed legacy functions
    - Cloning repository is not available anymore
    - Inline printing is not available anymore, console defaults to table if called
  • Loading branch information
PonteIneptique authored Jun 25, 2018
1 parent 08d22e7 commit 3c8e1b4
Show file tree
Hide file tree
Showing 9 changed files with 306 additions and 612 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ language: python
python:
- "3.4.5"
- "3.5"
- "3.6"

# command to install dependencies
install:
- pip install -r requirements.txt
- pip install coveralls

# command to run tests
script:
- coverage run setup.py test
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.1.8 - 2018-06-25

- Removed legacy functions
- Cloning repository is not available anymore
- Inline printing is not available anymore, console defaults to table if called

## 1.1.7 - 2018-06-22

- Implemented test for empty reference strings
Expand Down
2 changes: 1 addition & 1 deletion HookTest/capitains_units/cts.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def run_rng(self, rng_path):
:param rng_path: Path to the RelaxNG file to run against the XML to test
"""
test = subprocess.Popen(
["java", "-jar", TESTUnit.JING, rng_path, self.path],
["java", "-Duser.country=US", "-Duser.language=en", "-jar", TESTUnit.JING, rng_path, self.path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=False
Expand Down
39 changes: 19 additions & 20 deletions HookTest/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ def parse_args(args):

parser.add_argument('-w', "--workers", type=int, help='Number of workers (processes) to be used', default=1)

parser.add_argument('-s', "--scheme", help="Scheme to test. '-ignore' test will ignore RNG test but still inform which scheme is used", default="tei", choices=("tei", "epidoc", "epidoc-ignore", "tei-ignore"))
parser.add_argument(
'-s', "--scheme",
help="Scheme to test. '-ignore' test will ignore RNG test but still inform which scheme is used",
default="tei", choices=("tei", "epidoc", "epidoc-ignore", "tei-ignore"))

parser.add_argument("-v", "--verbose", help="""Verbose Level\n
- 0\t(Default) Only show necessary Information\n
Expand All @@ -40,7 +43,10 @@ def parse_args(args):
default=False
)
parser.add_argument(
"--console", help="Console Mode [Default : table]", nargs="?", default=False, choices=("table", "inline")
"--console", help="Console Mode",
default=False, action="store", const="true",
# Allows for retro-compatibility with older code base
nargs="?"
)
parser.add_argument(
"--manifest", dest="build_manifest", help="Produce a Manifest", action="store_true", default=False
Expand All @@ -53,32 +59,23 @@ def parse_args(args):
help="Maximum time to be used on RelaxNG tests. If exceeded, test fails", type=int, default=30
)


parser.add_argument(
"--hookUI", dest="from_travis_to_hook",
help="Send results to a Hook UI endpoint",
default=False
)

#########
#
# Remote legacy mode
#
#########

#parser.add_argument("--ping", help="Send results to a server", default=None)
parser.add_argument(
"-i", "--uuid", help="[Remote] Identifier for a test. This will be used as a temporary folder name", default=None
)
parser.add_argument("-r", "--repository", help="[Remote] Name of the git repository", default=None)
parser.add_argument("-b", "--branch", help="[Remote] Reference for the branch", default=None)

args = parser.parse_args(args)
if args.finder:
args.finderoptions = {"include": args.finder}
args.finder = HookTest.test.FilterFinder
if args.console is None:
args.console = "table"
if args.console == "inline":
print("WARNING ! Inline printing is not available anymore since 1.1.8")
args.console = True
elif args.console == "table":
print("Since 1.1.8, you do not need to specify --console table anymore. --console is enough")
elif args.console:
args.console = True
if args.verbose is None:
args.verbose = 10
return args
Expand Down Expand Up @@ -125,8 +122,9 @@ def parse_args_build(args):
default=3
)

args = parser.parse_args(args)
return args
arguments = parser.parse_args(args)

return arguments


def cmd_build():
Expand All @@ -138,5 +136,6 @@ def cmd_build():
else:
sys.exit(message)


if __name__ == '__main__':
cmd()
Loading

0 comments on commit 3c8e1b4

Please sign in to comment.