Skip to content

Commit

Permalink
Fix for imports and upload
Browse files Browse the repository at this point in the history
More in changelog
  • Loading branch information
trianglesis committed Sep 22, 2017
1 parent 58acbbb commit 24b9cd4
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 290 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.1 2017-09-21
- Fix bug with no uploading.
- Remove unused code
- Init some new features like progressbar
- Fix import error if progressbar wasn't installed. Will show simple count for test run (like 1/10)

## 1.0.0 2017-09-21
- Can run all designed functions for devs and customer mode.
- Docs beautifying.
Expand Down
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,8 @@ This is IDE and automation program for [BMC Discovery (ADDM)](https://discovery.

### Designed for Python 3 ###


##### Can run in usual shell or like 'build system'

Just run it from CMD:

#### Usage ####

-full_path "d:\addm\tkn_main\tku_patterns\CORE\PatternFolder\Pattern.tplpre" --help



#### Syntax check ####

NOTE: syntax tests (require 3rd party [module tplint](https://communities.bmc.com/docs/DOC-42313) by Ladkau, Matthias)
Expand All @@ -44,19 +35,19 @@ All available modes described [here in pdf.](https://trianglesis.github.io/BMC_T

### In editor: ###

##### Sublime: use it's build system, [example](https://github.com/trianglesis/bmc_tpl/blob/master/tplpre_various.sublime-build).
- ##### Sublime: use it's build system, [example](https://github.com/trianglesis/bmc_tpl/blob/master/tplpre_various.sublime-build).

![Build](https://trianglesis.github.io/BMC_TPL_IDE_auto_pics/TPL_IDE_Build_Sublime3.png)

You probably should update build file example according to recent arguments.


##### Atom: install plugin 'build' and use atom-build.yml [example](https://github.com/trianglesis/language-tplpre/blob/master/.atom-build.yml-EXAMPLE).
- ##### Atom: install plugin 'build' and use atom-build.yml [example](https://github.com/trianglesis/language-tplpre/blob/master/.atom-build.yml-EXAMPLE).

![Build](https://trianglesis.github.io/BMC_TPL_IDE_auto_pics/TPL_IDE_Build_Atom.png)


### In CMD: ###
- ### In CMD: ###

Common options:

Expand All @@ -73,7 +64,7 @@ Common options:
-h, --help show this help message and exit


### From windows context menu: ###
- ### From windows context menu: ###

Run regedit;
Add keys as described:
Expand Down
22 changes: 19 additions & 3 deletions bmc_tplpre/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
common = parser.add_argument_group("Common options")
developer = parser.add_argument_group("Developer options")


developer.add_argument("-usual_import",
action="store_true",
help="Option imports patterns which only imported in currently opened pattern "
Expand Down Expand Up @@ -110,7 +109,7 @@
help="Please set log level") # info, quiet, warning, debug, output, error
common.add_argument('--version',
action='version',
version='%(prog)s 1.0')
version='%(prog)s 1.0.1')

known_args, extra_args = parser.parse_known_args()
# print("Known args: "+str(known_args))
Expand All @@ -123,6 +122,7 @@

# Manual functions execution:
assert isinstance(conditional_functions, dict)
# TODO: Can separate this on logical blocks based on cond. operations, later.

if conditional_functions['imports_f']:
imports_f = conditional_functions['imports_f']
Expand All @@ -131,54 +131,70 @@
if callable(imports_f['parse_tests_queries']):
parse_tests_queries = imports_f['parse_tests_queries']
if parse_tests_queries:
log.debug("IMPORTS:\t\tparse_tests_queries")
parse_tests_queries()

# Executing test patterns list get:
if callable(imports_f['parse_tests_patterns']):
parse_tests_patterns = imports_f['parse_tests_patterns']
if parse_tests_patterns:
log.debug("IMPORTS:\t\tparse_tests_patterns")
parse_tests_patterns()

# Executing all imports:
if callable(imports_f['import_patterns']):
import_patterns = imports_f['import_patterns']
if import_patterns:
log.debug("IMPORTS:\t\timport_patternsrns")
import_patterns()

# # Executing preprocessor:
if callable(conditional_functions['preproc_f']):
preproc_f = conditional_functions['preproc_f']
if preproc_f:
log.debug("PREPROC:\t\tpreproc_f")
preproc_f()

# Executing syntax checker:
if callable(conditional_functions['syntax_check_f']):
syntax_check_f = conditional_functions['syntax_check_f']
if syntax_check_f:
log.debug("SYNTAX:\t\tsyntax_check_f")
syntax_check_f()

# Executing zipping files (and upload maybe?)
if callable(conditional_functions['zip_files_f']):
zip_files_f = conditional_functions['zip_files_f']
if zip_files_f:
log.debug("ZIP:\t\tzip_files_f")
zip_files_f()

# Executing pattern upload:
if callable(conditional_functions['upload_f']):
upload_f = conditional_functions['upload_f']
if upload_f:
log.debug("UPLOAD:\t\tupload_f")
upload_f()

# Executing pattern activation:
if callable(conditional_functions['addm_activate_f']):
addm_activate_f = conditional_functions['addm_activate_f']
if addm_activate_f:
log.debug("ACTIVATE:\t\taddm_activate_f")
addm_activate_f()

# Executing start scan
# # Working in current condition. Disable to save time
if callable(conditional_functions['scan_f']):
scan_f = conditional_functions['scan_f']
if scan_f:
scan_f()
log.debug("SCAN:\t\tscan_f")
# scan_f()

if callable(conditional_functions['test_executor_f']):
test_executor = conditional_functions['test_executor_f']
if test_executor:
log.debug("TEST EXEC:\t\ttest_executor_f")
test_executor()

log.info("-=== END of Check script. ===-")
Expand Down
Loading

0 comments on commit 24b9cd4

Please sign in to comment.