-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:odoonix/utils
- Loading branch information
Showing
16 changed files
with
270 additions
and
84 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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Supports basic operation related to workspase""" | ||
|
||
from otoolbox import env | ||
|
||
|
||
def _init_resources(**kargs): | ||
resources = env.context.get('resources') | ||
resources.build() | ||
|
||
def _delete_resources(**kargs): | ||
resources = env.context.get('resources') | ||
resources.destroy() | ||
|
||
def init_cli(parent_parser): | ||
"""Init CLI to support maintainer tools | ||
""" | ||
init_parseer = parent_parser.add_parser( | ||
'init', | ||
description=""" | ||
Tools and Utilites to help developers and maintainers. It makes simple to | ||
keep dev repositories up to date. | ||
""") | ||
init_parseer.set_defaults(func=_init_resources) | ||
|
||
init_parseer.add_argument( | ||
'--odoo', | ||
dest='odoo_version', | ||
action='store', | ||
required=False | ||
) | ||
|
||
delete_parseer = parent_parser.add_parser( | ||
'delete', | ||
description=""" | ||
Delete resources. | ||
""") | ||
delete_parseer.set_defaults(func=_delete_resources) | ||
|
||
|
||
return parent_parser |
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,36 @@ | ||
"""Adds helps and documents | ||
Resources: | ||
- README.md | ||
""" | ||
from otoolbox import env | ||
from otoolbox import utils | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
################################################################### | ||
# init | ||
################################################################### | ||
(env | ||
.add_resource( | ||
path="README.md", | ||
title="Workspace README", | ||
description="A readme that shows parts of the workspace", | ||
constructors=[ | ||
utils.constructor_copy_resource("data/WORKSPACE_README.md") | ||
], | ||
destructors=[ | ||
utils.delete_file | ||
], | ||
validators=[ | ||
utils.is_file, | ||
utils.is_readable | ||
] | ||
) | ||
) |
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
Oops, something went wrong.