mepo 2.0.0rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mepo might be problematic. Click here for more details.

Files changed (93) hide show
  1. mepo-2.0.0rc1/.gitignore +6 -0
  2. mepo-2.0.0rc1/LICENSE +200 -0
  3. mepo-2.0.0rc1/LICENSE-NOSA +261 -0
  4. mepo-2.0.0rc1/PKG-INFO +34 -0
  5. mepo-2.0.0rc1/README.md +21 -0
  6. mepo-2.0.0rc1/docs/.gitignore +1 -0
  7. mepo-2.0.0rc1/docs/make_md_docs.py +98 -0
  8. mepo-2.0.0rc1/etc/mepo-cd.bash +26 -0
  9. mepo-2.0.0rc1/etc/mepo-cd.csh +1 -0
  10. mepo-2.0.0rc1/etc/mepo-cd.zsh +26 -0
  11. mepo-2.0.0rc1/etc/mepo-completion.bash +26 -0
  12. mepo-2.0.0rc1/etc/mepoconfig-example +83 -0
  13. mepo-2.0.0rc1/pyproject.toml +45 -0
  14. mepo-2.0.0rc1/src/mepo/__init__.py +7 -0
  15. mepo-2.0.0rc1/src/mepo/__main__.py +19 -0
  16. mepo-2.0.0rc1/src/mepo/cmdline/__init__.py +0 -0
  17. mepo-2.0.0rc1/src/mepo/cmdline/branch_parser.py +60 -0
  18. mepo-2.0.0rc1/src/mepo/cmdline/config_parser.py +54 -0
  19. mepo-2.0.0rc1/src/mepo/cmdline/parser.py +497 -0
  20. mepo-2.0.0rc1/src/mepo/cmdline/stash_parser.py +75 -0
  21. mepo-2.0.0rc1/src/mepo/cmdline/tag_parser.py +82 -0
  22. mepo-2.0.0rc1/src/mepo/command/__init__.py +0 -0
  23. mepo-2.0.0rc1/src/mepo/command/branch.py +12 -0
  24. mepo-2.0.0rc1/src/mepo/command/branch_create.py +13 -0
  25. mepo-2.0.0rc1/src/mepo/command/branch_delete.py +13 -0
  26. mepo-2.0.0rc1/src/mepo/command/branch_list.py +24 -0
  27. mepo-2.0.0rc1/src/mepo/command/changed-files.py +59 -0
  28. mepo-2.0.0rc1/src/mepo/command/checkout-if-exists.py +34 -0
  29. mepo-2.0.0rc1/src/mepo/command/checkout.py +41 -0
  30. mepo-2.0.0rc1/src/mepo/command/clone.py +145 -0
  31. mepo-2.0.0rc1/src/mepo/command/commit.py +46 -0
  32. mepo-2.0.0rc1/src/mepo/command/compare.py +119 -0
  33. mepo-2.0.0rc1/src/mepo/command/config.py +14 -0
  34. mepo-2.0.0rc1/src/mepo/command/config_delete.py +7 -0
  35. mepo-2.0.0rc1/src/mepo/command/config_get.py +18 -0
  36. mepo-2.0.0rc1/src/mepo/command/config_print.py +5 -0
  37. mepo-2.0.0rc1/src/mepo/command/config_set.py +8 -0
  38. mepo-2.0.0rc1/src/mepo/command/develop.py +24 -0
  39. mepo-2.0.0rc1/src/mepo/command/diff.py +74 -0
  40. mepo-2.0.0rc1/src/mepo/command/fetch.py +21 -0
  41. mepo-2.0.0rc1/src/mepo/command/init.py +25 -0
  42. mepo-2.0.0rc1/src/mepo/command/list.py +9 -0
  43. mepo-2.0.0rc1/src/mepo/command/pull-all.py +30 -0
  44. mepo-2.0.0rc1/src/mepo/command/pull.py +27 -0
  45. mepo-2.0.0rc1/src/mepo/command/push.py +14 -0
  46. mepo-2.0.0rc1/src/mepo/command/reset.py +105 -0
  47. mepo-2.0.0rc1/src/mepo/command/restore-state.py +41 -0
  48. mepo-2.0.0rc1/src/mepo/command/save.py +79 -0
  49. mepo-2.0.0rc1/src/mepo/command/stage.py +26 -0
  50. mepo-2.0.0rc1/src/mepo/command/stash.py +16 -0
  51. mepo-2.0.0rc1/src/mepo/command/stash_apply.py +13 -0
  52. mepo-2.0.0rc1/src/mepo/command/stash_list.py +14 -0
  53. mepo-2.0.0rc1/src/mepo/command/stash_pop.py +13 -0
  54. mepo-2.0.0rc1/src/mepo/command/stash_push.py +13 -0
  55. mepo-2.0.0rc1/src/mepo/command/stash_show.py +13 -0
  56. mepo-2.0.0rc1/src/mepo/command/status.py +85 -0
  57. mepo-2.0.0rc1/src/mepo/command/tag.py +14 -0
  58. mepo-2.0.0rc1/src/mepo/command/tag_create.py +53 -0
  59. mepo-2.0.0rc1/src/mepo/command/tag_delete.py +21 -0
  60. mepo-2.0.0rc1/src/mepo/command/tag_list.py +24 -0
  61. mepo-2.0.0rc1/src/mepo/command/tag_push.py +24 -0
  62. mepo-2.0.0rc1/src/mepo/command/unstage.py +23 -0
  63. mepo-2.0.0rc1/src/mepo/command/update-state.py +23 -0
  64. mepo-2.0.0rc1/src/mepo/command/whereis.py +53 -0
  65. mepo-2.0.0rc1/src/mepo/component.py +247 -0
  66. mepo-2.0.0rc1/src/mepo/git.py +579 -0
  67. mepo-2.0.0rc1/src/mepo/registry.py +80 -0
  68. mepo-2.0.0rc1/src/mepo/state.py +168 -0
  69. mepo-2.0.0rc1/src/mepo/utilities/__init__.py +0 -0
  70. mepo-2.0.0rc1/src/mepo/utilities/chdir.py +14 -0
  71. mepo-2.0.0rc1/src/mepo/utilities/colors.py +17 -0
  72. mepo-2.0.0rc1/src/mepo/utilities/exceptions.py +34 -0
  73. mepo-2.0.0rc1/src/mepo/utilities/mepoconfig.py +77 -0
  74. mepo-2.0.0rc1/src/mepo/utilities/shellcmd.py +21 -0
  75. mepo-2.0.0rc1/src/mepo/utilities/verify.py +38 -0
  76. mepo-2.0.0rc1/src/mepo/utilities/version.py +92 -0
  77. mepo-2.0.0rc1/tests/input/components.yaml +52 -0
  78. mepo-2.0.0rc1/tests/output/output_branch_create.txt +1 -0
  79. mepo-2.0.0rc1/tests/output/output_branch_delete.txt +1 -0
  80. mepo-2.0.0rc1/tests/output/output_branch_list.txt +11 -0
  81. mepo-2.0.0rc1/tests/output/output_clone_status.txt +11 -0
  82. mepo-2.0.0rc1/tests/output/output_compare.txt +3 -0
  83. mepo-2.0.0rc1/tests/output/output_compare_all.txt +12 -0
  84. mepo-2.0.0rc1/tests/output/output_develop_status.txt +11 -0
  85. mepo-2.0.0rc1/tests/output/output_diff.txt +5 -0
  86. mepo-2.0.0rc1/tests/output/output_list.txt +1 -0
  87. mepo-2.0.0rc1/tests/output/output_pull_all.txt +1 -0
  88. mepo-2.0.0rc1/tests/output/output_push.txt +7 -0
  89. mepo-2.0.0rc1/tests/output/output_reset.txt +10 -0
  90. mepo-2.0.0rc1/tests/output/output_tag_create.txt +2 -0
  91. mepo-2.0.0rc1/tests/output/output_tag_delete.txt +2 -0
  92. mepo-2.0.0rc1/tests/output/output_whereis.txt +10 -0
  93. mepo-2.0.0rc1/tests/test_mepo_commands.py +346 -0
@@ -0,0 +1,6 @@
1
+ *~
2
+ *.pyc
3
+ *.egg-info
4
+ dist
5
+ venv
6
+ .python-version
mepo-2.0.0rc1/LICENSE ADDED
@@ -0,0 +1,200 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form, made
34
+ available under the License, as indicated by a copyright notice that is included
35
+ in or attached to the work (an example is provided in the Appendix below).
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original version
45
+ of the Work and any modifications or additions to that Work or Derivative Works
46
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
47
+ by the copyright owner or by an individual or Legal Entity authorized to submit
48
+ on behalf of the copyright owner. For the purposes of this definition,
49
+ "submitted" means any form of electronic, verbal, or written communication sent
50
+ to the Licensor or its representatives, including but not limited to
51
+ communication on electronic mailing lists, source code control systems, and
52
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
53
+ the purpose of discussing and improving the Work, but excluding communication
54
+ that is conspicuously marked or otherwise designated in writing by the copyright
55
+ owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License.
62
+
63
+ Subject to the terms and conditions of this License, each Contributor hereby
64
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
65
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
66
+ publicly display, publicly perform, sublicense, and distribute the Work and such
67
+ Derivative Works in Source or Object form.
68
+
69
+ 3. Grant of Patent License.
70
+
71
+ Subject to the terms and conditions of this License, each Contributor hereby
72
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
73
+ irrevocable (except as stated in this section) patent license to make, have
74
+ made, use, offer to sell, sell, import, and otherwise transfer the Work, where
75
+ such license applies only to those patent claims licensable by such Contributor
76
+ that are necessarily infringed by their Contribution(s) alone or by combination
77
+ of their Contribution(s) with the Work to which such Contribution(s) was
78
+ submitted. If You institute patent litigation against any entity (including a
79
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
80
+ Contribution incorporated within the Work constitutes direct or contributory
81
+ patent infringement, then any patent licenses granted to You under this License
82
+ for that Work shall terminate as of the date such litigation is filed.
83
+
84
+ 4. Redistribution.
85
+
86
+ You may reproduce and distribute copies of the Work or Derivative Works
87
+ thereof in any medium, with or without modifications, and in Source or Object
88
+ form, provided that You meet the following conditions:
89
+
90
+ (a) You must give any other recipients of the Work or Derivative Works a
91
+ copy of this License; and
92
+
93
+ (b) You must cause any modified files to carry prominent notices stating that
94
+ You changed the files; and
95
+
96
+ (c) You must retain, in the Source form of any Derivative Works that You
97
+ distribute, all copyright, patent, trademark, and attribution notices from
98
+ the Source form of the Work, excluding those notices that do not pertain
99
+ to any part of the Derivative Works; and
100
+
101
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
102
+ then any Derivative Works that You distribute must include a readable copy
103
+ of the attribution notices contained within such NOTICE file, excluding
104
+ those notices that do not pertain to any part of the Derivative Works, in
105
+ at least one of the following places: within a NOTICE text file
106
+ distributed as part of the Derivative Works; within the Source form or
107
+ documentation, if provided along with the Derivative Works; or, within a
108
+ display generated by the Derivative Works, if and wherever such
109
+ third-party notices normally appear. The contents of the NOTICE file are
110
+ for informational purposes only and do not modify the License. You may add
111
+ Your own attribution notices within Derivative Works that You distribute,
112
+ alongside or as an addendum to the NOTICE text from the Work, provided
113
+ that such additional attribution notices cannot be construed as modifying
114
+ the License.
115
+
116
+ You may add Your own copyright statement to Your modifications and may
117
+ provide additional or different license terms and conditions for use,
118
+ reproduction, or distribution of Your modifications, or for any such
119
+ Derivative Works as a whole, provided Your use, reproduction, and
120
+ distribution of the Work otherwise complies with the conditions stated in
121
+ this License.
122
+
123
+ 5. Submission of Contributions.
124
+
125
+ Unless You explicitly state otherwise, any Contribution intentionally
126
+ submitted for inclusion in the Work by You to the Licensor shall be under the
127
+ terms and conditions of this License, without any additional terms or
128
+ conditions. Notwithstanding the above, nothing herein shall supersede or
129
+ modify the terms of any separate license agreement you may have executed with
130
+ Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks.
133
+
134
+ This License does not grant permission to use the trade names, trademarks,
135
+ service marks, or product names of the Licensor, except as required for
136
+ reasonable and customary use in describing the origin of the Work and
137
+ reproducing the content of the NOTICE file.
138
+
139
+ 7. Disclaimer of Warranty.
140
+
141
+ Unless required by applicable law or agreed to in writing, Licensor provides
142
+ the Work (and each Contributor provides its Contributions) on an "AS IS"
143
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
144
+ implied, including, without limitation, any warranties or conditions of
145
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
146
+ PURPOSE. You are solely responsible for determining the appropriateness of
147
+ using or redistributing the Work and assume any risks associated with Your
148
+ exercise of permissions under this License.
149
+
150
+ 8. Limitation of Liability.
151
+
152
+ In no event and under no legal theory, whether in tort (including
153
+ negligence), contract, or otherwise, unless required by applicable law (such
154
+ as deliberate and grossly negligent acts) or agreed to in writing, shall any
155
+ Contributor be liable to You for damages, including any direct, indirect,
156
+ special, incidental, or consequential damages of any character arising as a
157
+ result of this License or out of the use or inability to use the Work
158
+ (including but not limited to damages for loss of goodwill, work stoppage,
159
+ computer failure or malfunction, or any and all other commercial damages or
160
+ losses), even if such Contributor has been advised of the possibility of such
161
+ damages.
162
+
163
+ 9. Accepting Warranty or Additional Liability.
164
+
165
+ While redistributing the Work or Derivative Works thereof, You may choose to
166
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
167
+ other liability obligations and/or rights consistent with this License.
168
+ However, in accepting such obligations, You may act only on Your own behalf
169
+ and on Your sole responsibility, not on behalf of any other Contributor, and
170
+ only if You agree to indemnify, defend, and hold each Contributor harmless
171
+ for any liability incurred by, or claims asserted against, such Contributor
172
+ by reason of your accepting any such warranty or additional liability.
173
+
174
+ END OF TERMS AND CONDITIONS
175
+
176
+ APPENDIX: How to apply the Apache License to your work
177
+
178
+ To apply the Apache License to your work, attach the following boilerplate
179
+ notice with the fields enclosed by brackets "[]" replaced with your own
180
+ identifying information. (Don't include the brackets!) The text should be
181
+ enclosed in the appropriate comment syntax for the file format. We also
182
+ recommend that a file or class name and description of purpose be included on
183
+ the same "printed page" as the copyright notice for easier identification within
184
+ third-party archives.
185
+
186
+ NASA Docket No. GSC-15,354-1, and identified as "GEOS-5 GCM Modeling Software”
187
+
188
+ “Copyright © 2008 United States Government as represented by the Administrator
189
+ of the National Aeronautics and Space Administration. All Rights Reserved.”
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
192
+ this file except in compliance with the License. You may obtain a copy of the
193
+ License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software distributed
198
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
199
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
200
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,261 @@
1
+
2
+ NASA OPEN SOURCE SOFTWARE AGREEMENT
3
+
4
+
5
+ NASA OPEN SOURCE AGREEMENT VERSION 1.3
6
+
7
+ THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE,
8
+ REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN
9
+ COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS
10
+ REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY").
11
+ THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN
12
+ INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR
13
+ REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES,
14
+ DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED
15
+ HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE
16
+ RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT.
17
+
18
+ Government Agency: National Aeronautics and Space Administration
19
+ Government Agency Original Software Designation: GSC-15354-1
20
+ Government Agency Original Software Title: GEOS-5 GCM Modeling Software
21
+ User Registration Requested. Please Visit http://opensource.gsfc.nasa.gov
22
+ Government Agency Point of Contact for Original Software:
23
+ Dale Hithon, SRA Assistant, (301) 286-2691
24
+
25
+ 1. DEFINITIONS
26
+
27
+ A. "Contributor" means Government Agency, as the developer of the
28
+ Original Software, and any entity that makes a Modification.
29
+
30
+ B. "Covered Patents" mean patent claims licensable by a Contributor
31
+ that are necessarily infringed by the use or sale of its Modification
32
+ alone or when combined with the Subject Software.
33
+
34
+ C. "Display" means the showing of a copy of the Subject Software,
35
+ either directly or by means of an image, or any other device.
36
+
37
+ D. "Distribution" means conveyance or transfer of the Subject Software,
38
+ regardless of means, to another.
39
+
40
+ E. "Larger Work" means computer software that combines Subject
41
+ Software, or portions thereof, with software separate from the Subject
42
+ Software that is not governed by the terms of this Agreement.
43
+
44
+ F. "Modification" means any alteration of, including addition to
45
+ or deletion from, the substance or structure of either the Original
46
+ Software or Subject Software, and includes derivative works, as that
47
+ term is defined in the Copyright Statute, 17 USC 101. However, the act
48
+ of including Subject Software as part of a Larger Work does not in and
49
+ of itself constitute a Modification.
50
+
51
+ G. "Original Software" means the computer software first released under
52
+ this Agreement by Government Agency with Government Agency designation
53
+ GSC-15354-1 and entitled GEOS-5 GCM Modeling Software, including source
54
+ code, object code and accompanying documentation, if any.
55
+
56
+ H. "Recipient" means anyone who acquires the Subject Software under
57
+ this Agreement, including all Contributors.
58
+
59
+ I. "Redistribution" means Distribution of the Subject Software after a
60
+ Modification has been made.
61
+
62
+ J. "Reproduction" means the making of a counterpart, image or copy of
63
+ the Subject Software.
64
+
65
+ K. "Sale" means the exchange of the Subject Software for money or
66
+ equivalent value.
67
+
68
+ L. "Subject Software" means the Original Software, Modifications, or
69
+ any respective parts thereof.
70
+
71
+ M. "Use" means the application or employment of the Subject Software
72
+ for any purpose.
73
+
74
+
75
+
76
+ 2. GRANT OF RIGHTS
77
+
78
+ A. Under Non-Patent Rights: Subject to the terms and conditions of this
79
+ Agreement, each Contributor, with respect to its own contribution to
80
+ the Subject Software, hereby grants to each Recipient a non-exclusive,
81
+ world-wide, royalty-free license to engage in the following activities
82
+ pertaining to the Subject Software:
83
+
84
+ 1. Use
85
+ 2. Distribution
86
+ 3. Reproduction
87
+ 4. Modification
88
+ 5. Redistribution
89
+ 6. Display
90
+
91
+ B. Under Patent Rights: Subject to the terms and conditions of this
92
+ Agreement, each Contributor, with respect to its own contribution to
93
+ the Subject Software, hereby grants to each Recipient under Covered
94
+ Patents a non-exclusive, world-wide, royalty-free license to engage in
95
+ the following activities pertaining to the Subject Software:
96
+
97
+ 1. Use
98
+ 2. Distribution
99
+ 3. Reproduction
100
+ 4. Sale
101
+ 5. Offer for Sale
102
+
103
+ C. The rights granted under Paragraph B. also apply to the combination
104
+ of a Contributor's Modification and the Subject Software if, at the
105
+ time the Modification is added by the Contributor, the addition of
106
+ such Modification causes the combination to be covered by the Covered
107
+ Patents. It does not apply to any other combinations that include a
108
+ Modification.
109
+
110
+ D. The rights granted in Paragraphs A. and B. allow the Recipient to
111
+ sublicense those same rights. Such sublicense must be under the same
112
+ terms and conditions of this Agreement.
113
+
114
+
115
+ 3. OBLIGATIONS OF RECIPIENT
116
+
117
+ A. Distribution or Redistribution of the Subject Software must be made
118
+ under this Agreement except for additions covered under paragraph 3H.
119
+
120
+ 1. Whenever a Recipient distributes or redistributes the Subject
121
+ Software, a copy of this Agreement must be included with each copy of
122
+ the Subject Software; and
123
+
124
+ 2. If Recipient distributes or redistributes the Subject Software in
125
+ any form other than source code, Recipient must also make the source
126
+ code freely available, and must provide with each copy of the Subject
127
+ Software information on how to obtain the source code in a reasonable
128
+ manner on or through a medium customarily used for software exchange.
129
+
130
+ B. Each Recipient must ensure that the following copyright notice
131
+ appears prominently in the Subject Software:
132
+
133
+ Copyright © 2003-2018 United States Government as represented by the
134
+ Administrator of the National Aeronautics and Space Administration. All
135
+ Rights Reserved.
136
+
137
+ C. Each Contributor must characterize its alteration of the Subject
138
+ Software as a Modification and must identify itself as the originator
139
+ of its Modification in a manner that reasonably allows subsequent
140
+ Recipients to identify the originator of the Modification. In
141
+ fulfillment of these requirements, Contributor must include a file
142
+ (e.g., a change log file) that describes the alterations made and
143
+ the date of the alterations, identifies Contributor as originator of
144
+ the alterations, and consents to characterization of the alterations
145
+ as a Modification, for example, by including a statement that the
146
+ Modification is derived, directly or indirectly, from Original Software
147
+ provided by Government Agency. Once consent is granted, it may not
148
+ thereafter be revoked.
149
+
150
+ D. A Contributor may add its own copyright notice to the Subject
151
+ Software. Once a copyright notice has been added to the Subject
152
+ Software, a Recipient may not remove it without the express permission
153
+ of the Contributor who added the notice.
154
+
155
+ E. A Recipient may not make any representation in the Subject Software
156
+ or in any promotional, advertising or other material that may be
157
+ construed as an endorsement by Government Agency or by any prior
158
+ Recipient of any product or service provided by Recipient, or that may
159
+ seek to obtain commercial advantage by the fact of Government Agency's
160
+ or a prior Recipient's participation in this Agreement.
161
+
162
+ F. In an effort to track usage and maintain accurate records of
163
+ the Subject Software, each Recipient, upon receipt of the Subject
164
+ Software, is requested to register with Government Agency by visiting
165
+ the following website: http://opensource.gsfc.nasa.gov. Recipient's
166
+ name and personal information shall be used for statistical purposes
167
+ only. Once a Recipient makes a Modification available, it is requested
168
+ that the Recipient inform Government Agency at the web site provided
169
+ above how to access the Modification.
170
+
171
+ G. Each Contributor represents that its Modification is believed to
172
+ be Contributor's original creation and does not violate any existing
173
+ agreements, regulations, statutes or rules, and further that Contributor
174
+ has sufficient rights to grant the rights conveyed by this Agreement.
175
+
176
+ H. A Recipient may choose to offer, and to charge a fee for, warranty,
177
+ support, indemnity and/or liability obligations to one or more other
178
+ Recipients of the Subject Software. A Recipient may do so, however,
179
+ only on its own behalf and not on behalf of Government Agency or any
180
+ other Recipient. Such a Recipient must make it absolutely clear that
181
+ any such warranty, support, indemnity and/or liability obligation is
182
+ offered by that Recipient alone. Further, such Recipient agrees to
183
+ indemnify Government Agency and every other Recipient for any liability
184
+ incurred by them as a result of warranty, support, indemnity and/or
185
+ liability offered by such Recipient.
186
+
187
+ I. A Recipient may create a Larger Work by combining Subject Software
188
+ with separate software not governed by the terms of this agreement
189
+ and distribute the Larger Work as a single product. In such case, the
190
+ Recipient must make sure Subject Software, or portions thereof, included
191
+ in the Larger Work is subject to this Agreement.
192
+
193
+ J. Notwithstanding any provisions contained herein, Recipient is hereby
194
+ put on notice that export of any goods or technical data from the United
195
+ States may require some form of export license from the U.S. Government.
196
+ Failure to obtain necessary export licenses may result in criminal
197
+ liability under U.S. laws. Government Agency neither represents that a
198
+ license shall not be required nor that, if required, it shall be issued.
199
+ Nothing granted herein provides any such export license.
200
+
201
+ 4. DISCLAIMER OF WARRANTIES AND LIABILITIES; WAIVER AND INDEMNIFICATION
202
+
203
+ A. No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT
204
+ ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY,
205
+ INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT
206
+ SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
207
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM
208
+ INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE,
209
+ OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE
210
+ SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE AN
211
+ ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT OF ANY RESULTS,
212
+ RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS
213
+ RESULTING FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY
214
+ DISCLAIMS ALL WARRANTIES AND LIABILITIES REGARDING THIRD-PARTY SOFTWARE,
215
+ IF PRESENT IN THE ORIGINAL SOFTWARE, AND DISTRIBUTES IT "AS IS."
216
+
217
+ B. Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL
218
+ CLAIMS AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND
219
+ SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE
220
+ OF THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES,
221
+ EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM
222
+ PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT
223
+ SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED STATES
224
+ GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR
225
+ RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR
226
+ ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS
227
+ AGREEMENT.
228
+
229
+ 5. GENERAL TERMS
230
+
231
+ A. Termination: This Agreement and the rights granted hereunder will
232
+ terminate automatically if a Recipient fails to comply with these terms
233
+ and conditions, and fails to cure such noncompliance within thirty
234
+ (30) days of becoming aware of such noncompliance. Upon termination,
235
+ a Recipient agrees to immediately cease use and distribution of the
236
+ Subject Software. All sublicenses to the Subject Software properly
237
+ granted by the breaching Recipient shall survive any such termination of
238
+ this Agreement.
239
+
240
+ B. Severability: If any provision of this Agreement is invalid or
241
+ unenforceable under applicable law, it shall not affect the validity or
242
+ enforceability of the remainder of the terms of this Agreement.
243
+
244
+ C. Applicable Law: This Agreement shall be subject to United States
245
+ federal law only for all purposes, including, but not limited to,
246
+ determining the validity of this Agreement, the meaning of its
247
+ provisions and the rights, obligations and remedies of the parties.
248
+
249
+ D. Entire Understanding: This Agreement constitutes the entire
250
+ understanding and agreement of the parties relating to release of the
251
+ Subject Software and may not be superseded, modified or amended except
252
+ by further written agreement duly executed by the parties.
253
+
254
+ E. Binding Authority: By accepting and using the Subject Software under
255
+ this Agreement, a Recipient affirms its authority to bind the Recipient
256
+ to all terms and conditions of this Agreement and that that Recipient
257
+ hereby agrees to all terms and conditions herein.
258
+
259
+ F. Point of Contact: Any Recipient contact with Government Agency is to
260
+ be directed to the designated representative as follows: Dale Hithon,
261
+ SRA Assistant, (301) 286-2691.
mepo-2.0.0rc1/PKG-INFO ADDED
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.3
2
+ Name: mepo
3
+ Version: 2.0.0rc1
4
+ Summary: A tool for managing (m)ultiple r(epo)s
5
+ Author-email: GMAO SI Team <siteam@gmao.gsfc.nasa.gov>
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ License-File: LICENSE-NOSA
9
+ Requires-Python: >=3.9
10
+ Requires-Dist: mdutils>=1.6.0
11
+ Requires-Dist: pyyaml>=6.0.1
12
+ Description-Content-Type: text/markdown
13
+
14
+ # mepo [![Actions Status](https://github.com/pchakraborty/mepo/workflows/Unit%20testing%20of%20mepo/badge.svg)](https://github.com/pchakraborty/mepo/actions) [![DOI](https://zenodo.org/badge/215067850.svg)](https://zenodo.org/badge/latestdoi/215067850) [![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye-up.com) ![pylint]()
15
+
16
+ `mepo` is a tool, written in Python3 (3.9.0+), to manage (m)ultiple git r(epo)sitories, by attempting to create an illusion of a 'single repository' for multi-repository projects. Please see the [Wiki](../../wiki) for examples of `mepo` workflows.
17
+
18
+ ## Commands
19
+
20
+ For more about the possible `mepo` commands, please see the [Mepo Commands](https://github.com/GEOS-ESM/mepo/wiki/Mepo-Commands) wiki page.
21
+
22
+ ## Presentation
23
+
24
+ The SI Team has made a PowerPoint about `mepo` that can be found [here](https://github.com/GEOS-ESM/mepo/wiki/files/MEPO-2020Nov19.pptx).
25
+
26
+ ## Contributing
27
+
28
+ Please check out our [contributing guidelines](CONTRIBUTING.md).
29
+
30
+ ## License
31
+
32
+ All files are currently licensed under the Apache-2.0 license, see [`LICENSE`](LICENSE).
33
+
34
+ Previously, the code was licensed under the [NASA Open Source Agreement, Version 1.3](LICENSE-NOSA).
@@ -0,0 +1,21 @@
1
+ # mepo [![Actions Status](https://github.com/pchakraborty/mepo/workflows/Unit%20testing%20of%20mepo/badge.svg)](https://github.com/pchakraborty/mepo/actions) [![DOI](https://zenodo.org/badge/215067850.svg)](https://zenodo.org/badge/latestdoi/215067850) [![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye-up.com) ![pylint]()
2
+
3
+ `mepo` is a tool, written in Python3 (3.9.0+), to manage (m)ultiple git r(epo)sitories, by attempting to create an illusion of a 'single repository' for multi-repository projects. Please see the [Wiki](../../wiki) for examples of `mepo` workflows.
4
+
5
+ ## Commands
6
+
7
+ For more about the possible `mepo` commands, please see the [Mepo Commands](https://github.com/GEOS-ESM/mepo/wiki/Mepo-Commands) wiki page.
8
+
9
+ ## Presentation
10
+
11
+ The SI Team has made a PowerPoint about `mepo` that can be found [here](https://github.com/GEOS-ESM/mepo/wiki/files/MEPO-2020Nov19.pptx).
12
+
13
+ ## Contributing
14
+
15
+ Please check out our [contributing guidelines](CONTRIBUTING.md).
16
+
17
+ ## License
18
+
19
+ All files are currently licensed under the Apache-2.0 license, see [`LICENSE`](LICENSE).
20
+
21
+ Previously, the code was licensed under the [NASA Open Source Agreement, Version 1.3](LICENSE-NOSA).
@@ -0,0 +1 @@
1
+ *.md
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import os
4
+ import io
5
+ import glob
6
+ from mdutils.mdutils import MdUtils
7
+ import subprocess as sp
8
+
9
+ preamble = """
10
+ mepo provides many different commands for working with a multi-repository fixture.
11
+ """
12
+
13
+ # Assume this script is in mepo/doc. Then we need to get to the mepo/mepo.d/command directory
14
+ doc_dir_path = os.path.dirname(os.path.realpath(__file__))
15
+ # Then we need to get to the mepo/mepo.d/command directory. First the "main" dir
16
+ main_dir_path = os.path.dirname(doc_dir_path)
17
+ # Now add "src/mepo"
18
+ mepod_dir_path = os.path.join(main_dir_path, "src", "mepo")
19
+ # And then "command"
20
+ command_dir_path = os.path.join(mepod_dir_path, "command")
21
+
22
+ mepo_command_path = os.path.join(main_dir_path, "bin", "mepo")
23
+
24
+
25
+ def get_command_list(directory):
26
+ # Get all commands
27
+ all_commands_py = glob.glob(os.path.join(directory, "*.py"))
28
+ all_commands = [os.path.basename(x).replace(".py", "") for x in all_commands_py]
29
+
30
+ # Now let's find the commands that have subcommands
31
+ ## First we get commands with underscore
32
+ ## Then replace underscore with a space
33
+ commands_with_underscore = [x for x in all_commands if "_" in x]
34
+ commands_with_subcommands = [x.replace("_", " ") for x in commands_with_underscore]
35
+ all_useful_commands = [x for x in all_commands if x not in commands_with_underscore]
36
+ all_useful_commands += commands_with_subcommands
37
+
38
+ return sorted(all_useful_commands)
39
+
40
+
41
+ def create_markdown_from_usage(command, mdFile):
42
+ cmd = [mepo_command_path, command, "--help"]
43
+
44
+ # Some commands have spaces, so we need to break it up again
45
+ cmd = " ".join(cmd).split()
46
+
47
+ result = sp.run(cmd, capture_output=True, universal_newlines=True)
48
+ output = result.stdout
49
+
50
+ output_list = output.split("\n")
51
+
52
+ # Command summary
53
+ summary = output_list[2]
54
+ mdFile.write(summary)
55
+
56
+ # Usage
57
+ usage = output_list[0]
58
+ usage = usage.replace("usage: ", "")
59
+ mdFile.new_header(level=3, title="Usage")
60
+ mdFile.insert_code(usage)
61
+
62
+ positional_arguments = output.partition("positional arguments:\n")[2].partition(
63
+ "\n\n"
64
+ )[0]
65
+ if positional_arguments:
66
+ mdFile.new_header(level=3, title="Positional Arguments")
67
+ mdFile.insert_code(positional_arguments)
68
+
69
+ optional_arguments = output.partition("optional arguments:\n")[2].partition("\n\n")[
70
+ 0
71
+ ]
72
+ # Remove extra blank lines
73
+ optional_arguments = os.linesep.join(
74
+ [s for s in optional_arguments.splitlines() if s]
75
+ )
76
+ if optional_arguments:
77
+ mdFile.new_header(level=3, title="Optional Arguments")
78
+ mdFile.insert_code(optional_arguments)
79
+
80
+
81
+ if __name__ == "__main__":
82
+
83
+ doc_file = "Mepo-Commands.md"
84
+ mdFile = MdUtils(file_name=doc_file)
85
+
86
+ mdFile.new_header(level=1, title="Overview")
87
+ mdFile.new_paragraph(preamble)
88
+
89
+ mdFile.new_header(level=1, title="Commands")
90
+ command_list = get_command_list(command_dir_path)
91
+ for command in command_list:
92
+ mdFile.new_header(level=2, title=command)
93
+ print(f"mepo command: {command}")
94
+ create_markdown_from_usage(command, mdFile)
95
+
96
+ mdFile.new_table_of_contents(table_title="Table of Contents", depth=2)
97
+ mdFile.create_md_file()
98
+ print(f"Generated {doc_file}.")
@@ -0,0 +1,26 @@
1
+ function usage_ () {
2
+ echo "usage: "
3
+ echo " mepo-cd : cd to root of mepo project"
4
+ echo " mepo-cd <component> : cd to directory of <component>"
5
+ echo ""
6
+ echo "mepo-cd accepts only 0 or 1 arguments"
7
+ }
8
+
9
+ function mepo-cd () {
10
+ if [ "$#" -gt 1 ]; then
11
+ usage_
12
+ return 1
13
+ fi
14
+ if [ "$1" == "-h" ]; then
15
+ usage_
16
+ return 0
17
+ fi
18
+ if [ "$#" -eq 0 ]; then
19
+ output=$(mepo whereis _root)
20
+ else
21
+ output=$(mepo whereis -i $1)
22
+ fi
23
+ if [ $? -eq 0 ]; then
24
+ cd $output
25
+ fi
26
+ }
@@ -0,0 +1 @@
1
+ alias mepo-cd 'cd `mepo whereis -i \!:1`'