-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update setup.cfg for new structure * Update name * Update tests for new structure * Setup pipeval main module * Update validate module * Update validate module with new structure * Update checksum module * Remove old structure * Update Dockerfile * Update command name * Update CHANGELOG * Update commands in README * Remove version from subcommands
- Loading branch information
1 parent
2ed7792
commit ee3dbe1
Showing
22 changed files
with
166 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'''Inits pipeval module''' | ||
|
||
__version__ = '5.0.0-rc.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
''' Console script main entrance ''' | ||
import argparse | ||
from pipeval import __version__ | ||
|
||
from pipeval.validate.__main__ import add_subparser_validate | ||
from pipeval.generate_checksum.__main__ import add_subparser_generate_checksum | ||
|
||
def _parse_args(): | ||
""" Parse arguments """ | ||
parser = argparse.ArgumentParser( | ||
prog = 'pipeval' | ||
) | ||
|
||
parser.add_argument( | ||
'-v', '--version', | ||
action='version', | ||
version=f'%(prog)s {__version__}' | ||
) | ||
|
||
subparsers = parser.add_subparsers(dest = 'command') | ||
add_subparser_validate(subparsers) | ||
add_subparser_generate_checksum(subparsers) | ||
|
||
return parser.parse_args() | ||
|
||
def main(): | ||
''' Main entrance ''' | ||
args = _parse_args() | ||
args.func(args) | ||
|
||
if __name__=='__main__': | ||
main() |
2 changes: 0 additions & 2 deletions
2
generate_checksum/__init__.py → pipeval/generate_checksum/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
'''Inits checksum module''' | ||
|
||
__version__ = '3.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
''' Console script main entrance ''' | ||
import argparse | ||
from pipeval.generate_checksum.checksum import generate_checksum | ||
|
||
def add_subparser_generate_checksum(subparsers:argparse._SubParsersAction): | ||
""" Parse arguments """ | ||
parser = subparsers.add_parser( | ||
name = 'generate-checksum', | ||
help = 'Generate checksums for one or more file(s)', | ||
description = 'Generate checksums for one or more file(s)', | ||
formatter_class = argparse.ArgumentDefaultsHelpFormatter | ||
) | ||
parser.add_argument('path', help='one or more paths of files to validate', type=str, nargs='+') | ||
parser.add_argument('-t', '--type', help='Checksum type', | ||
choices=['md5', 'sha512'], | ||
default='sha512') | ||
|
||
parser.set_defaults(func=generate_checksum) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
'''Inits validate module''' | ||
|
||
__version__ = '4.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.