mesa_cli 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mesa +19 -19
- metadata +30 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a87a95b5be58fbec4ee71ba7063bfa8dc140a9c
|
4
|
+
data.tar.gz: bea773bce1823aa9bc9b5f148d37709a453fed51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0682d0de88e26690fea63946a399f55dd54f245a711c295027ccec0437c9f42f66f1884fd11f900ed77be5899ea30016733cf44348b4021ff5f2f066de15057c
|
7
|
+
data.tar.gz: 17fc655ea15f24b797ad0d2de79e34e2160f52c7ae02bfc30d86e69acf60c1dfc7c9f0b7c7c9acfffbcedd08da4b30e3a5de19fdadce83633dfe20453adaa23d
|
data/bin/mesa
CHANGED
@@ -25,7 +25,7 @@ class MyCLI < Thor
|
|
25
25
|
option :simple, :type => :boolean, :aliases => :s,
|
26
26
|
:desc => "Just copy work directory and rename it. Nothing done with " +
|
27
27
|
"MesaScript."
|
28
|
-
option :pgstar, :type => :boolean, :aliases => [:p, :pgstar],
|
28
|
+
option :pgstar, :type => :boolean, :aliases => [:p, :pgstar],
|
29
29
|
:desc => "Point `inlist` to main inlist for pgstar in addition to star_job " +
|
30
30
|
"and controls (default points to `inlist_pgstar`)."
|
31
31
|
|
@@ -59,9 +59,9 @@ class MyCLI < Thor
|
|
59
59
|
create_ms_file(new_inlist_name, File.join(new_loc, basename + '.rb'))
|
60
60
|
end
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
desc "point INLIST", "Point main `inlist` to INLIST."
|
64
|
-
option :pgstar, :type => :boolean, :aliases => [:p, :pgstar],
|
64
|
+
option :pgstar, :type => :boolean, :aliases => [:p, :pgstar],
|
65
65
|
:desc => "Point `inlist` to INLIST for pgstar in addition to star_job " +
|
66
66
|
"and controls (default points to `inlist_pgstar`)."
|
67
67
|
def point(inlist)
|
@@ -71,31 +71,31 @@ class MyCLI < Thor
|
|
71
71
|
create_control_inlist(Dir.pwd, inlist, inlist)
|
72
72
|
end
|
73
73
|
end
|
74
|
-
|
74
|
+
|
75
75
|
desc "test [TEST_SUITE_CASE] [NEW_DIR]", "Copy test suite case work " +
|
76
76
|
"directory with name TEST_SUITE_CASE to location NEW_DIR."
|
77
77
|
long_desc <<-LONGDESC
|
78
78
|
`mesa test` will primarily create a new work directory based on an existing
|
79
79
|
test case located in $MESA_DIR/star/test_suite. Since the structure of
|
80
|
-
these directories varies wildly, no MesaScript or renaming niceties are
|
80
|
+
these directories varies wildly, no MesaScript or renaming niceties are
|
81
81
|
done as in the standard `mesa new` command. The first argument is the name
|
82
82
|
of the test suite case to be copied. The second argument, if provided, will
|
83
83
|
be the name of the new directory. If this is omitted, the name remains the
|
84
84
|
same. If no arguments are given a list of available test suite cases are
|
85
85
|
printed out and no directories are copied.
|
86
86
|
|
87
|
-
The resulting directory will have all references to custom values of
|
87
|
+
The resulting directory will have all references to custom values of
|
88
88
|
MESA_DIR removed and any local paths (like ../../inlist_massive_defaults)
|
89
|
-
will be converted to fully-qualified paths (like
|
89
|
+
will be converted to fully-qualified paths (like
|
90
90
|
$MESA_DIR/star/inlist_massive_defaults). The resulting work directory should
|
91
91
|
be ready to make and run immediately as if it were in the test suite
|
92
92
|
directory.
|
93
93
|
LONGDESC
|
94
|
-
option :list, :type => :boolean, :aliases => :l,
|
94
|
+
option :list, :type => :boolean, :aliases => :l,
|
95
95
|
:desc => "lists available test suite cases"
|
96
|
-
|
96
|
+
|
97
97
|
def test(test_case=nil, new_dir=nil)
|
98
|
-
return unless check_for_mesa_dir
|
98
|
+
return unless check_for_mesa_dir
|
99
99
|
|
100
100
|
test_suite_dir = File.join(ENV['MESA_DIR'], 'star', 'test_suite')
|
101
101
|
if options[:list] or test_case.nil?
|
@@ -103,7 +103,7 @@ class MyCLI < Thor
|
|
103
103
|
puts Dir.entries(test_suite_dir).select { |entry| entry[0] != '.' }
|
104
104
|
return
|
105
105
|
end
|
106
|
-
|
106
|
+
|
107
107
|
work_dir = File.join(test_suite_dir, test_case)
|
108
108
|
unless File.directory?(work_dir)
|
109
109
|
puts "Unable to locate test suite case #{test_case} in directory " +
|
@@ -245,12 +245,12 @@ class MyCLI < Thor
|
|
245
245
|
end
|
246
246
|
puts "Installed MESA version #{ver_number} in #{dir_name}. Your login " +
|
247
247
|
"scripts likely still need to be updated. See \"Set your environment " +
|
248
|
-
"variables\" in http://mesa.sourceforge.net/prereqs.html for details."
|
249
|
-
puts ''
|
248
|
+
"variables\" in http://mesa.sourceforge.net/prereqs.html for details."
|
249
|
+
puts ''
|
250
250
|
return
|
251
251
|
end
|
252
252
|
|
253
|
-
# detect login scripts
|
253
|
+
# detect login scripts
|
254
254
|
possible_scripts.map! { |script| File.join(ENV['HOME'], script) }
|
255
255
|
login_scripts = []
|
256
256
|
possible_scripts.each do |script|
|
@@ -259,7 +259,7 @@ class MyCLI < Thor
|
|
259
259
|
|
260
260
|
# update login scripts to set MESA_DIR properly
|
261
261
|
have_fixed = login_scripts.empty?
|
262
|
-
login_scripts.each do |script|
|
262
|
+
login_scripts.each do |script|
|
263
263
|
fixed_this_one = adjust_script(script, dir_name, shell)
|
264
264
|
have_fixed = fixed_this_one unless have_fixed
|
265
265
|
end
|
@@ -277,7 +277,7 @@ class MyCLI < Thor
|
|
277
277
|
output = File.join(ms_name)
|
278
278
|
Inlist.inlist_to_mesascript(source, output) if $use_mesascript
|
279
279
|
end
|
280
|
-
|
280
|
+
|
281
281
|
def check_for_mesa_dir
|
282
282
|
return true if ENV['MESA_DIR']
|
283
283
|
|
@@ -329,8 +329,8 @@ class MyCLI < Thor
|
|
329
329
|
have_fixed = true
|
330
330
|
line = contents[i]
|
331
331
|
contents[i].sub!(/=.*/, "=#{dir_name}")
|
332
|
-
contents.insert(i
|
333
|
-
"#{Time.now.ctime} from mesa install script
|
332
|
+
contents.insert(i, '# ' + "Changed MESA_DIR to #{dir_name} on " +
|
333
|
+
"#{Time.now.ctime} from mesa install script.\n")
|
334
334
|
end
|
335
335
|
|
336
336
|
# write out adjusted contents to file
|
@@ -365,4 +365,4 @@ class MyCLI < Thor
|
|
365
365
|
end
|
366
366
|
end
|
367
367
|
|
368
|
-
MyCLI.start(ARGV)
|
368
|
+
MyCLI.start(ARGV)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mesa_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Wolf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -38,15 +38,24 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.1.4
|
41
|
-
description:
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
41
|
+
description: |2
|
42
|
+
MESA CLI is a command-line interface for doing several tasks with Modules
|
43
|
+
for Experiments in Stellar Astrophysics (MESA; mesa.sourceforge.net). This
|
44
|
+
package includes one executable, `mesa`. Actions are performed by entering
|
45
|
+
`mesa` followed by various subcommands. A list of available subcommands can
|
46
|
+
be displayed by entering
|
47
|
+
|
48
|
+
mesa help
|
49
|
+
|
50
|
+
Any individual subcommand is documented by typing `mesa help` followed by
|
51
|
+
the name of the subcommand, for instance,
|
52
|
+
|
53
|
+
mesa help new
|
54
|
+
|
55
|
+
will give information about what the `new` command does. For detailed
|
56
|
+
instructions, see the readme on the github page at
|
57
|
+
|
58
|
+
https://github.com/wmwolf/mesa_cli
|
50
59
|
email: wmwolf@physics.ucsb.edu
|
51
60
|
executables:
|
52
61
|
- mesa
|
@@ -59,10 +68,14 @@ homepage: https://wmwolf.github.io
|
|
59
68
|
licenses:
|
60
69
|
- MIT
|
61
70
|
metadata: {}
|
62
|
-
post_install_message:
|
63
|
-
|
64
|
-
|
65
|
-
|
71
|
+
post_install_message: |2+
|
72
|
+
Thanks for installing mesa_cli!
|
73
|
+
|
74
|
+
To learn more about how to use the mesa command line tool and to keep up to
|
75
|
+
date with its features, check out the README at the project homepage:
|
76
|
+
|
77
|
+
https://github.com/wmwolf/mesa_cli
|
78
|
+
|
66
79
|
rdoc_options: []
|
67
80
|
require_paths:
|
68
81
|
- lib
|
@@ -78,8 +91,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
91
|
version: '0'
|
79
92
|
requirements: []
|
80
93
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.4.
|
94
|
+
rubygems_version: 2.4.6
|
82
95
|
signing_key:
|
83
96
|
specification_version: 4
|
84
97
|
summary: Mesa CLI - a command line interface for simple MESA tasks.
|
85
98
|
test_files: []
|
99
|
+
has_rdoc: false
|