Skip to content

Commit

Permalink
Fixed bug in extension defaults, inherited type components.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacmackin committed Jul 26, 2016
1 parent eeb7e0e commit f8f3967
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ford/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
__author__ = "Chris MacMackin, Jacob Williams, Marco Restelli, Iain Barrass, Jérémie Burgalat, Stephen J. Turnbull, Balint Aradi"
__credits__ = ["Stefano Zhagi", "Izaak Beekman", "Gavin Huttley"]
__license__ = "GPLv3"
__version__ = "5.0.0"
__version__ = "5.0.1"
__maintainer__ = "Chris MacMackin"
__status__ = "Production"

Expand Down Expand Up @@ -148,7 +148,7 @@ def initialize():
defaults = {'src_dir': ['./src'],
'extensions': ['f90','f95','f03','f08','f15'],
'fpp_extensions': ['F90','F95','F03','F08','F15','F','FOR'],
'fixed_extensions': ['f','for'],
'fixed_extensions': ['f','for','F','FOR'],
'output_dir': './doc',
'project': 'Fortran Program',
'project_url': '',
Expand Down
9 changes: 8 additions & 1 deletion ford/sourceform.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def markdown(self,md,project):
md_list = []
if hasattr(self,'variables'):
md_list.extend(self.variables)
sort_items(self,self.variables)
if not isinstance(self,FortranType): sort_items(self,self.variables)
if hasattr(self,'modules'):
md_list.extend(self.modules)
sort_items(self,self.modules)
Expand Down Expand Up @@ -1523,6 +1523,12 @@ def correlate(self,project):
#~ self.variables[i].correlate(project)
for v in self.variables:
v.correlate(project)
# Get inherited public components
inherited = [var for var in getattr(self.extends,'variables',[])
if var.permission == "public"]
self.variables = inherited + self.variables
sort_items(self,self.variables)

# Match boundprocs with procedures
# FIXME: This is not at all modular because must process non-generic bound procs first--could there be a better way to do it
for proc in self.boundprocs:
Expand Down Expand Up @@ -1571,6 +1577,7 @@ def correlate(self,project):
elif isinstance(bind,FortranBoundProcedure):
for b in bind.bindings:
if isinstance(b,(FortranFunction,FortranSubroutine)): self.num_lines_all += b.num_lines

def prune(self):
"""
Remove anything which shouldn't be displayed.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
name = 'FORD',
packages = ['ford'],
include_package_data = True,
version = '5.0.0',
version = '5.0.1',
description = 'FORD, standing for FORtran Documenter, is an automatic documentation generator for modern Fortran programs.',
long_description = long_description,
author = 'Chris MacMackin',
author_email = '[email protected]',
url = 'https://github.com/cmacmackin/ford/',
download_url = 'https://github.com/cmacmackin/ford/tarball/5.0.0',
download_url = 'https://github.com/cmacmackin/ford/tarball/5.0.1',
keywords = ['Markdown', 'Fortran', 'documentation', 'comments'],
classifiers=[
# How mature is this project? Common values are
Expand Down

0 comments on commit f8f3967

Please sign in to comment.