• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

marshallward / f90nml / 198
99%

Build:
DEFAULT BRANCH: master
Ran 23 Jul 2016 02:22PM UTC
Jobs 8
Files 5
Run time 53s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
198

push

travis-ci

marshallward
Explicit start index; Implicit global start index

Previously, the starting index was very strongly implied to be 1 in most
cases.  For example, if we read the following variable:

    &grp
        x(3) = 1
    /

then it would be saved into Python as

    nml['grp']['x'] = [None, None, 1]

which may cause problems if the original Fortran vector was not
1-indexed (e.g. 0-indexed).

We now would save this as a single-valued vector:

    nml['grp']['x'] = [1]

but also track the starting index in a new field dict, `start_index`.

These are primarily used by the `write` method, which now begin printing
their output from the explicit starting index, rather than 1.

For example, the case above used to write the output as `x(1:3) = , , 1`
but now writes more simply as `x(3) = 1.

----

This has also exposed some bugs in defining the parents of children in
derived types.  In one case, a new child was not updating its status
with its parent.  This was previously not a problem, since the namelist
was empty and the parent re-establised the content.  But it needed to be
fixed since any local modifications to `start_index` were missed.  This
has now been fixed.

A second bug is that the child of a list of derived types incorrectly
sets its parent as the list of types, rather than the member which
spawned the child.  The bug seems to be related to the parsing of v_idx
(denoting the parent as a list, rather than the list member) and dtype
member on the same pass.  This is still **not fixed** but seems to have
no serious consequences yet.  Hopefully we can look into it someday in
the future.

----

There have also been some changes to implicit indexing, when a
variable's value is set in one stage and its index is set in another
stage, which is outlined below.

If we set a variable once with an index and again without an index, then
it's ambiguous where to place the non-indexed variable in the array.

This was not a serious problem when the starting index was very st... (continued)

617 of 619 relevant lines covered (99.68%)

7.94 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
100.0
/home/travis/build/marshallward/f90nml/f90nml/namelist.py
Jobs
ID Job ID Ran Files Coverage
1 198.1 23 Jul 2016 02:22PM UTC 0
99.68
Travis Job 198.1
2 198.2 23 Jul 2016 02:22PM UTC 0
99.35
Travis Job 198.2
3 198.3 23 Jul 2016 02:22PM UTC 0
99.19
Travis Job 198.3
4 198.4 23 Jul 2016 02:22PM UTC 0
99.19
Travis Job 198.4
5 198.5 23 Jul 2016 02:22PM UTC 0
99.19
Travis Job 198.5
6 198.6 23 Jul 2016 02:23PM UTC 0
99.19
Travis Job 198.6
7 198.7 23 Jul 2016 02:23PM UTC 0
99.19
Travis Job 198.7
8 198.8 23 Jul 2016 02:23PM UTC 0
99.19
Travis Job 198.8
Source Files on build 198
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #198
  • d1df701e on github
  • Prev Build on master (#197)
  • Next Build on master (#199)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc