Skip to content

Commit

Permalink
Merge pull request #178 from VirtualPlanetaryLaboratory/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
RoryBarnes authored Jun 7, 2021
2 parents 033665e + b9a428c commit f85c800
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: tests

on:
push:
branches: [master, dev, main]
branches: [master, main, dev]
pull_request:
branches: [master, dev, main]
branches: [master, main, dev]

jobs:
tests:
Expand Down
14 changes: 10 additions & 4 deletions vplanet/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_param_name(param, file, line):
Returns a string.
"""
# Replace bad characters
# Replace any bad characters
repl = [("#", "")]
for a, b in repl:
param = param.replace(a, b)
Expand Down Expand Up @@ -299,7 +299,9 @@ def get_log(path=".", sysname=None, ext="log", units=True):
# Process the header
for i, line in header:
try:
name_and_unit, value = line.split(":")
line_items = line.split(":")
name_and_unit = line_items[0]
value = ":".join(line_items[1:])
unit = get_param_unit(name_and_unit, lf, i)
name = get_param_name(name_and_unit, lf, i)
value = get_param_value(value, unit, lf, i, units=units)
Expand All @@ -315,7 +317,9 @@ def get_log(path=".", sysname=None, ext="log", units=True):
for i, line in initial:
if "BODY:" not in line:
try:
name_and_unit, value = line.split(":")
line_items = line.split(":")
name_and_unit = line_items[0]
value = ":".join(line_items[1:])
unit = get_param_unit(name_and_unit, lf, i)
name = get_param_name(name_and_unit, lf, i)
value = get_param_value(value, unit, lf, i, units=units)
Expand Down Expand Up @@ -347,7 +351,9 @@ def get_log(path=".", sysname=None, ext="log", units=True):
for i, line in final:
if "BODY:" not in line:
try:
name_and_unit, value = line.split(":")
line_items = line.split(":")
name_and_unit = line_items[0]
value = ":".join(line_items[1:])
unit = get_param_unit(name_and_unit, lf, i)
name = get_param_name(name_and_unit, lf, i)
value = get_param_value(value, unit, lf, i, units=units)
Expand Down

0 comments on commit f85c800

Please sign in to comment.