-
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 pull request #269 from GEOS-ESM/feature/pchakrab/py-project-pip…
…-installable Make mepo a pip-installable Python project
- Loading branch information
Showing
78 changed files
with
289 additions
and
249 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
*~ | ||
*.pyc | ||
*.egg-info | ||
dist | ||
venv |
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,17 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import sys | ||
import traceback | ||
|
||
# Version check | ||
if sys.version_info < (3, 9, 0): | ||
sys.exit('ERROR: Python version needs to be >= 3.6.0') | ||
|
||
# Add direactory containing mepo to path | ||
SRC_D = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'src') | ||
sys.path.insert(0, SRC_D) | ||
|
||
if __name__ == '__main__': | ||
from mepo.main import main | ||
main() |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "mepo" | ||
version = "v2.0.0" | ||
authors = [ | ||
{name = "GMAO SI Team", email = "[email protected]"}, | ||
] | ||
description = "Tool to manage (m)ultiple r(epo)sitories" | ||
requires-python = ">= 3.9" | ||
license = {file = "LICENSE"} | ||
readme = "README.md" | ||
dependencies = [ | ||
"pyyaml>=6.0.1", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/GEOS-ESM/mepo" | ||
|
||
[project.scripts] | ||
mepo = "mepo.main:main" | ||
|
||
[tool.setuptools] | ||
include-package-data = true |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import subprocess as sp | ||
|
||
from mepo.state.state import MepoState | ||
|
||
from mepo.command.branch.list import list | ||
from mepo.command.branch.create import create | ||
from mepo.command.branch.delete import delete | ||
|
||
def run(args): | ||
d = { | ||
'list': list, | ||
'create': create, | ||
'delete': delete, | ||
} | ||
d[args.mepo_branch_cmd].run(args) |
6 changes: 3 additions & 3 deletions
6
mepo.d/command/branch/create/create.py → src/mepo/command/branch/create/create.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
6 changes: 3 additions & 3 deletions
6
mepo.d/command/branch/delete/delete.py → src/mepo/command/branch/delete/delete.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
6 changes: 3 additions & 3 deletions
6
mepo.d/command/branch/list/list.py → src/mepo/command/branch/list/list.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
15 changes: 8 additions & 7 deletions
15
....d/command/changed-files/changed-files.py → ...po/command/changed-files/changed-files.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
8 changes: 4 additions & 4 deletions
8
.../checkout-if-exists/checkout-if-exists.py → .../checkout-if-exists/checkout-if-exists.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
8 changes: 4 additions & 4 deletions
8
mepo.d/command/checkout/checkout.py → src/mepo/command/checkout/checkout.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
12 changes: 6 additions & 6 deletions
12
mepo.d/command/clone/clone.py → src/mepo/command/clone/clone.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
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,11 +1,11 @@ | ||
from importlib import import_module | ||
from utilities import mepoconfig | ||
from mepo.utilities import mepoconfig | ||
|
||
def run(args): | ||
mepo_cmd = mepoconfig.get_alias_command(args.mepo_cmd) | ||
|
||
# Load the module containing the 'run' method of specified mepo command | ||
cmd_module = import_module('command.{}.{}'.format(mepo_cmd, mepo_cmd)) | ||
cmd_module = import_module('mepo.command.{}.{}'.format(mepo_cmd, mepo_cmd)) | ||
|
||
# Execute 'run' method of the specified mepo command | ||
cmd_module.run(args) |
8 changes: 4 additions & 4 deletions
8
mepo.d/command/commit/commit.py → src/mepo/command/commit/commit.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
9 changes: 5 additions & 4 deletions
9
mepo.d/command/compare/compare.py → src/mepo/command/compare/compare.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
Oops, something went wrong.