epydoc-commits Mailing List for Python API documentation generation tool (Page 5)
Brought to you by:
edloper
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(77) |
May
|
Jun
(6) |
Jul
(8) |
Aug
(91) |
Sep
(67) |
Oct
(4) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(17) |
Feb
(135) |
Mar
(25) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(62) |
Oct
(1) |
Nov
(3) |
Dec
|
2008 |
Jan
(40) |
Feb
(102) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ed...@us...> - 2008-02-02 02:38:43
|
Revision: 1712 http://epydoc.svn.sourceforge.net/epydoc/?rev=1712&view=rev Author: edloper Date: 2008-02-01 18:38:41 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Added a few regression tests for the command-line interface Added Paths: ----------- trunk/epydoc/src/epydoc/test/cli.doctest Added: trunk/epydoc/src/epydoc/test/cli.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/cli.doctest (rev 0) +++ trunk/epydoc/src/epydoc/test/cli.doctest 2008-02-02 02:38:41 UTC (rev 1712) @@ -0,0 +1,56 @@ +Regression Testing for epydoc.cli +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A helper function to check the behavior of parse_arguments: + + >>> import sys, epydoc.cli + >>> def parse_arguments(argv): + ... defaults = epydoc.cli.option_defaults() + ... if isinstance(argv, basestring): argv = argv.split() + ... sys.argv = list(argv) + ... options = epydoc.cli.parse_arguments() + ... for opt, val in sorted(options.__dict__.items()): + ... if val != defaults.get(opt): + ... if isinstance(val, dict): + ... val = '{%s}' % ', '.join(sorted( + ... ['%r: %r' % pair for pair in val.items()])) + ... print '%20s: %s' % (opt, val) + +Basic test: + >>> parse_arguments('epydoc sys') + names: ['sys'] + +The -o option now sets the default_target option if it comes *before* +any action values: + + >>> parse_arguments('epydoc -o foo sys') + default_target: foo + names: ['sys'] + >>> parse_arguments('epydoc -o foo --html sys') + actions: ['html'] + default_target: foo + names: ['sys'] + +But it modifies the target option if it comes *after* any action +values. This allows the user to specify an output location for each +action: + + >>> parse_arguments('epydoc --html -o foo sys') + actions: ['html'] + names: ['sys'] + target: {'html': 'foo'} + + >>> parse_arguments('epydoc --html -o myhtml --pdf -o mypdf sys') + actions: ['html', 'pdf'] + names: ['sys'] + target: {'html': 'myhtml', 'pdf': 'mypdf'} + +The user can specify a default and then override it for select output +formats: + + >>> parse_arguments('epydoc -o foo --pdf --dvi -o bar.dvi --html sys') + actions: ['pdf', 'dvi', 'html'] + default_target: foo + names: ['sys'] + target: {'dvi': 'bar.dvi'} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-02 02:38:14
|
Revision: 1711 http://epydoc.svn.sourceforge.net/epydoc/?rev=1711&view=rev Author: edloper Date: 2008-02-01 18:38:11 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - epydoc will now accept multiple action arguments (eg --html, --pdf) - if the target option (-o) is used before any action arguments, it gives the default target name. If it is used after any action argument, then it applies just to the action argument that preceeds it. Note that this is backwards compatible with the old case where only one action argument could be used -- either way, the target argument would apply to that one action argument. - In config files, the "output" option can now be used with multiple output formats. To specify per-format output targets, use the form "format->target" e.g. "html->myhtmldir" or "pdf->foo.pdf". The "target" option sets the default output target. - if latex output is not explicitly requested, then latex output is now written to a temp dir, and cleaned up after execution. The target name for dvi/ps/pdf outputs is treated as a filename. - parse_arguments now just returns the options argument -- returning a tuple with the names was redundant since we store the names as options.names anyway. Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:53:20 UTC (rev 1710) +++ trunk/epydoc/src/epydoc/cli.py 2008-02-02 02:38:11 UTC (rev 1711) @@ -63,7 +63,7 @@ """ __docformat__ = 'epytext en' -import sys, os, time, re, pickle, textwrap +import sys, os, time, re, pickle, textwrap, tempfile, shutil from glob import glob from optparse import OptionParser, OptionGroup, SUPPRESS_HELP import optparse @@ -87,6 +87,8 @@ ACTIONS = ('html', 'text', 'latex', 'dvi', 'ps', 'pdf', 'check') DEFAULT_DOCFORMAT = 'epytext' PROFILER = 'profile' #: Which profiler to use: 'hotshot' or 'profile' +TARGET_ACTIONS = ('html', 'latex', 'dvi', 'ps', 'pdf') +DEFAULT_ACTIONS = ('html',) ###################################################################### #{ Help Topics @@ -128,18 +130,37 @@ #{ Argument & Config File Parsing ###################################################################### -OPTION_DEFAULTS = dict( - action="html", show_frames=True, docformat=DEFAULT_DOCFORMAT, - show_private=True, show_imports=False, inheritance="listed", - verbose=0, quiet=0, load_pickle=False, parse=True, introspect=True, - debug=epydoc.DEBUG, profile=False, graphs=[], - list_classes_separately=False, graph_font=None, graph_font_size=None, - include_source_code=True, pstat_files=[], simple_term=False, fail_on=None, - exclude=[], exclude_parse=[], exclude_introspect=[], - external_api=[], external_api_file=[], external_api_root=[], - redundant_details=False, src_code_tab_width=8, - include_timestamp=True) +DEFAULT_TARGET = dict( + html='html', latex='latex', dvi='api.dvi', ps='api.ps', + pdf='api.pdf', pickle='api.pickle') +def option_defaults(): + return dict( + actions=[], show_frames=True, docformat=DEFAULT_DOCFORMAT, + show_private=True, show_imports=False, inheritance="listed", + verbose=0, quiet=0, load_pickle=False, parse=True, introspect=True, + debug=epydoc.DEBUG, profile=False, graphs=[], + list_classes_separately=False, graph_font=None, graph_font_size=None, + include_source_code=True, pstat_files=[], simple_term=False, + fail_on=None, exclude=[], exclude_parse=[], exclude_introspect=[], + external_api=[], external_api_file=[], external_api_root=[], + redundant_details=False, src_code_tab_width=8, verbosity=0, + include_timestamp=True, target={}, default_target=None) + +# append_const is not defined in py2.3 or py2.4, so use a callback +# instead, with the following function: +def add_action(option, opt, value, optparser): + action = opt.replace('-', '') + optparser.values.actions.append(action) + +def add_target(option, opt, value, optparser): + if optparser.values.actions: + optparser.values.target[optparser.values.actions[-1]] = value + elif optparser.values.default_target is None: + optparser.values.default_target = value + else: + optparser.error("Default output target specified multiple times!") + def parse_arguments(): # Construct the option parser. usage = '%prog [ACTION] [options] NAMES...' @@ -152,7 +173,7 @@ "and/or NAMES. This option may be repeated.")) optparser.add_option("--output", "-o", - dest="target", metavar="PATH", + action='callback', callback=add_target, type='string', metavar="PATH", help="The output directory. If PATH does not exist, then " "it will be created.") @@ -173,49 +194,48 @@ help="Do not try to use color or cursor control when displaying " "the progress bar, warnings, or errors.") - action_group = OptionGroup(optparser, 'Actions') optparser.add_option_group(action_group) action_group.add_option("--html", - action="store_const", dest="action", const="html", + action='callback', callback=add_action, help="Write HTML output.") action_group.add_option("--text", - action="store_const", dest="action", const="text", + action='callback', callback=add_action, help="Write plaintext output. (not implemented yet)") action_group.add_option("--latex", - action="store_const", dest="action", const="latex", + action='callback', callback=add_action, help="Write LaTeX output.") action_group.add_option("--dvi", - action="store_const", dest="action", const="dvi", + action='callback', callback=add_action, help="Write DVI output.") action_group.add_option("--ps", - action="store_const", dest="action", const="ps", + action='callback', callback=add_action, help="Write Postscript output.") action_group.add_option("--pdf", - action="store_const", dest="action", const="pdf", + action='callback', callback=add_action, help="Write PDF output.") action_group.add_option("--check", - action="store_const", dest="action", const="check", + action='callback', callback=add_action, help="Check completeness of docs.") action_group.add_option("--pickle", - action="store_const", dest="action", const="pickle", + action='callback', callback=add_action, help="Write the documentation to a pickle file.") # Provide our own --help and --version options. action_group.add_option("--version", - action="store_const", dest="action", const="version", + action='callback', callback=add_action, help="Show epydoc's version number and exit.") action_group.add_option("-h", "--help", - action="store_const", dest="action", const="help", + action='callback', callback=add_action, help="Show this message and exit. For help on specific " "topics, use \"--help TOPIC\". Use \"--help topics\" for a " "list of available help topics") @@ -419,14 +439,14 @@ "warnings).") # Set the option parser's defaults. - optparser.set_defaults(**OPTION_DEFAULTS) + optparser.set_defaults(**option_defaults()) # Parse the arguments. options, names = optparser.parse_args() # Print help message, if requested. We also provide support for # --help [topic] - if options.action == 'help': + if 'help' in options.actions: names = set([n.lower() for n in names]) for (topic, msg) in HELP_TOPICS.items(): if topic.lower() in names: @@ -436,7 +456,7 @@ sys.exit(0) # Print version message, if requested. - if options.action == 'version': + if 'version' in options.actions: print version sys.exit(0) @@ -475,7 +495,7 @@ if not options.parse and not options.introspect: optparser.error("Invalid option combination: --parse-only " "and --introspect-only.") - if options.action == 'text' and len(names) > 1: + if 'text' in options.actions and len(names) > 1: optparser.error("--text option takes only one name.") # Check the list of requested graph types to make sure they're @@ -500,13 +520,9 @@ verbosity = getattr(options, 'verbosity', 0) options.verbosity = verbosity + options.verbose - options.quiet - # The target default depends on the action. - if options.target is None: - options.target = options.action - # Return parsed args. options.names = names - return options, names + return options def parse_configfiles(configfiles, options, names): configparser = ConfigParser.ConfigParser() @@ -524,12 +540,14 @@ 'module', 'object', 'value'): names.extend(_str_to_list(val)) elif optname == 'target': - options.target = val + options.default_target = val elif optname == 'output': - if val.lower() not in ACTIONS: - raise ValueError('"%s" expected one of: %s' % - (optname, ', '.join(ACTIONS))) - options.action = val.lower() + for action, target in re.findall('(\w+)\s*(?:->\s*(\S+))?', val): + if action not in ACTIONS: + raise ValueError('"%s" expected one of %s, got %r' % + (optname, ', '.join(ACTIONS), action)) + options.actions.append(action) + if target: options.target[action] = target elif optname == 'verbosity': options.verbosity = _str_to_int(val, optname) elif optname == 'debug': @@ -649,21 +667,19 @@ #{ Interface ###################################################################### -def main(options, names): +def main(options): # Set the debug flag, if '--debug' was specified. if options.debug: epydoc.DEBUG = True - ## [XX] Did this serve a purpose? Commenting out for now: - #if options.action == 'text': - # if options.parse and options.introspect: - # options.parse = False + if not options.actions: + options.actions = DEFAULT_ACTIONS # Set up the logger loggers = [] if options.simple_term: TerminalController.FORCE_SIMPLE_TERM = True - if options.action == 'text': + if options.actions == ['text']: pass # no logger for text output. elif options.verbosity > 1: logger = ConsoleLogger(options.verbosity) @@ -682,15 +698,15 @@ 2] # Sorting & Grouping if options.load_pickle: stages = [30] # Loading pickled documentation - if options.action == 'html': stages += [100] - elif options.action == 'text': stages += [30] - elif options.action == 'latex': stages += [60] - elif options.action == 'dvi': stages += [60,30] - elif options.action == 'ps': stages += [60,40] - elif options.action == 'pdf': stages += [60,50] - elif options.action == 'check': stages += [10] - elif options.action == 'pickle': stages += [10] - else: raise ValueError, '%r not supported' % options.action + if 'html' in options.actions: stages += [100] + if 'text' in options.actions: stages += [30] + if 'check' in options.actions: stages += [10] + if 'pickle' in options.actions: stages += [10] + if 'latex' in options.actions: stages += [60] + if 'pdf' in options.actions: stages += [50] + elif 'ps' in options.actions: stages += [40] + elif 'dvi' in options.actions: stages += [30] + if options.parse and not options.introspect: del stages[1] # no merging if options.introspect and not options.parse: @@ -699,18 +715,35 @@ log.register_logger(logger) loggers.append(logger) - # check the output directory. - if options.action not in ('text', 'check', 'pickle'): - if os.path.exists(options.target): - if not os.path.isdir(options.target): - log.error("%s is not a directory" % options.target) + # Calculate the target directories/files. + for (key, val) in DEFAULT_TARGET.items(): + if options.default_target is not None: + options.target.setdefault(key, options.default_target) + else: + options.target.setdefault(key, val) + + # Add extensions to target filenames, where appropriate. + for action in ['pdf', 'ps', 'dvi', 'pickle']: + if action in options.target: + if not options.target[action].endswith('.%s' % action): + options.target[action] += '.%s' % action + + # check the output targets. + for action in options.actions: + target = options.target[action] + if os.path.exists(target): + if action not in ['html', 'latex'] and os.path.isdir(target): + log.error("%s is a directory" % target) sys.exit(1) + elif action in ['html', 'latex'] and not os.path.isdir(target): + log.error("%s is not a directory" % target) + sys.exit(1) if options.include_log: - if options.action == 'html': - if not os.path.exists(options.target): - os.mkdir(options.target) - logger = HTMLLogger(options.target, options) + if 'html' in options.actions: + if not os.path.exists(options.target['html']): + os.mkdir(options.target['html']) + logger = HTMLLogger(options.target['html'], options) log.register_logger(logger) loggers.append(logger) else: @@ -748,11 +781,11 @@ # If the input name is a pickle file, then read the docindex that # it contains. Otherwise, build the docs for the input names. if options.load_pickle: - assert len(names) == 1 + assert len(options.names) == 1 log.start_progress('Deserializing') - log.progress(0.1, 'Loading %r' % names[0]) + log.progress(0.1, 'Loading %r' % options.names[0]) t0 = time.time() - unpickler = pickle.Unpickler(open(names[0], 'rb')) + unpickler = pickle.Unpickler(open(options.names[0], 'rb')) unpickler.persistent_load = pickle_persistent_load docindex = unpickler.load() log.debug('deserialization time: %.1f sec' % (time.time()-t0)) @@ -763,8 +796,9 @@ exclude_parse = '|'.join(options.exclude_parse+options.exclude) exclude_introspect = '|'.join(options.exclude_introspect+ options.exclude) - docindex = build_doc_index(names, options.introspect, options.parse, - add_submodules=(options.action!='text'), + docindex = build_doc_index(options.names, + options.introspect, options.parse, + add_submodules=(options.actions!=['text']), exclude_introspect=exclude_introspect, exclude_parse=exclude_parse) @@ -795,18 +829,17 @@ docindex.read_profiling_info(profile_stats) # Perform the specified action. - if options.action == 'html': + if 'check' in options.actions: + check_docs(docindex, options) + if 'pickle' in options.actions: + write_pickle(docindex, options) + if 'html' in options.actions: write_html(docindex, options) - elif options.action in ('latex', 'dvi', 'ps', 'pdf'): - write_latex(docindex, options, options.action) - elif options.action == 'text': + if ('latex' in options.actions or 'dvi' in options.actions or + 'ps' in options.actions or 'pdf' in options.actions): + write_latex(docindex, options) + if 'text' in options.actions: write_text(docindex, options) - elif options.action == 'check': - check_docs(docindex, options) - elif options.action == 'pickle': - write_pickle(docindex, options) - else: - print >>sys.stderr, '\nUnsupported action %s!' % options.action # If we suppressed docstring warnings, then let the user know. for logger in loggers: @@ -817,8 +850,8 @@ else: prefix = ('%d markup errors were found' % logger.suppressed_docstring_warning) - logger.warning("%s while processing docstrings. Use the verbose " - "switch (-v) to display markup errors." % prefix) + log.warning("%s while processing docstrings. Use the verbose " + "switch (-v) to display markup errors." % prefix) # Basic timing breakdown: if options.verbosity >= 2: @@ -841,10 +874,10 @@ from epydoc.docwriter.html import HTMLWriter html_writer = HTMLWriter(docindex, **options.__dict__) if options.verbose > 0: - log.start_progress('Writing HTML docs to %r' % options.target) + log.start_progress('Writing HTML docs to %r' % options.target['html']) else: log.start_progress('Writing HTML docs') - html_writer.write(options.target) + html_writer.write(options.target['html']) log.end_progress() def write_pickle(docindex, options): @@ -852,14 +885,9 @@ read in at a later time. But loading the pickle is only marginally faster than building the docs from scratch, so this has pretty limited application.""" - if options.target == 'pickle': - options.target = 'api.pickle' - elif not options.target.endswith('.pickle'): - options.target += '.pickle' - log.start_progress('Serializing output') - log.progress(0.2, 'Writing %r' % options.target) - outfile = open(options.target, 'wb') + log.progress(0.2, 'Writing %r' % options.target['pickle']) + outfile = open(options.target['pickle'], 'wb') pickler = pickle.Pickler(outfile, protocol=0) pickler.persistent_id = pickle_persistent_id pickler.dump(docindex) @@ -881,31 +909,40 @@ _RERUN_LATEX_RE = re.compile(r'(?im)^LaTeX\s+Warning:\s+Label\(s\)\s+may' r'\s+have\s+changed.\s+Rerun') -def write_latex(docindex, options, format): +def write_latex(docindex, options): + # If latex is an intermediate target, then use a temporary + # directory for its files. + if 'latex' in options.actions: + latex_target = options.target['latex'] + else: + latex_target = tempfile.mkdtemp() + from epydoc.docwriter.latex import LatexWriter latex_writer = LatexWriter(docindex, **options.__dict__) log.start_progress('Writing LaTeX docs') - latex_writer.write(options.target) + latex_writer.write(latex_target) log.end_progress() - # If we're just generating the latex, and not any output format, - # then we're done. - if format == 'latex': return - if format == 'dvi': steps = 4 - elif format == 'ps': steps = 5 - elif format == 'pdf': steps = 6 + if 'pdf' in options.actions: steps = 6 + elif 'ps' in options.actions: steps = 5 + elif 'dvi' in options.actions: steps = 4 + else: + # If we're just generating the latex, and not any derived + # output format, then we're done. + assert 'latex' in options.actions + return log.start_progress('Processing LaTeX docs') oldpath = os.path.abspath(os.curdir) running = None # keep track of what we're doing. try: try: - os.chdir(options.target) + os.chdir(latex_target) # Clear any old files out of the way. - for ext in 'tex aux log out idx ilg toc ind'.split(): - if os.path.exists('apidoc.%s' % ext): - os.remove('apidoc.%s' % ext) + for ext in 'aux log out idx ilg toc ind'.split(): + if os.path.exists('api.%s' % ext): + os.remove('api.%s' % ext) # The first pass generates index files. running = 'latex' @@ -936,19 +973,31 @@ run_subprocess('latex api.tex') # If requested, convert to postscript. - if format in ('ps', 'pdf'): + if 'ps' in options.actions or 'pdf' in options.actions: running = 'dvips' log.progress(4./steps, 'dvips') run_subprocess('dvips api.dvi -o api.ps -G0 -Ppdf') # If requested, convert to pdf. - if format in ('pdf'): + if 'pdf' in options.actions: running = 'ps2pdf' log.progress(5./steps, 'ps2pdf') run_subprocess( 'ps2pdf -sPAPERSIZE#letter -dMaxSubsetPct#100 ' '-dSubsetFonts#true -dCompatibilityLevel#1.2 ' '-dEmbedAllFonts#true api.ps api.pdf') + + # Copy files to their respective targets. + if 'dvi' in options.actions: + dst = os.path.join(oldpath, options.target['dvi']) + shutil.copy2('api.dvi', dst) + if 'ps' in options.actions: + dst = os.path.join(oldpath, options.target['ps']) + shutil.copy2('api.ps', dst) + if 'pdf' in options.actions: + dst = os.path.join(oldpath, options.target['pdf']) + shutil.copy2('api.pdf', dst) + except RunSubprocessError, e: if running == 'latex': e.out = re.sub(r'(?sm)\A.*?!( LaTeX Error:)?', r'', e.out) @@ -959,6 +1008,18 @@ log.error("%s failed: %s" % (running, e)) finally: os.chdir(oldpath) + + if 'latex' not in options.actions: + # The latex output went to a tempdir; clean it up. + log.info('Cleaning up %s' % latex_target) + try: + for filename in os.listdir(latex_target): + os.remove(os.path.join(latex_target, filename)) + os.rmdir(latex_target) + except Exception, e: + log.error("Error cleaning up tempdir %s: %s" % + (latex_target, e)) + log.end_progress() def write_text(docindex, options): @@ -979,14 +1040,14 @@ def cli(): # Parse command-line arguments. - options, names = parse_arguments() + options = parse_arguments() try: try: if options.profile: _profile() else: - main(options, names) + main(options) finally: log.close() except SystemExit: @@ -1431,7 +1492,8 @@ msg = '<table border="0" cellpadding="0" cellspacing="0">\n' opts = [(key, getattr(options, key)) for key in dir(options) if key not in dir(optparse.Values)] - opts = [(val==OPTION_DEFAULTS.get(key), key, val) + defaults = option_defaults() + opts = [(val==defaults.get(key), key, val) for (key, val) in opts] for is_default, key, val in sorted(opts): css = is_default and 'opt-default' or 'opt-changed' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-01 19:53:22
|
Revision: 1710 http://epydoc.svn.sourceforge.net/epydoc/?rev=1710&view=rev Author: edloper Date: 2008-02-01 11:53:20 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Fixed spurious warning about identifiers occcuring in two groups when pre-2.4-style decorators are used. Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2008-02-01 19:47:06 UTC (rev 1709) +++ trunk/epydoc/src/epydoc/apidoc.py 2008-02-01 19:53:20 UTC (rev 1710) @@ -1082,7 +1082,7 @@ unused_groups.discard(ident) if elt_name in ungrouped: group.append(ungrouped.pop(elt_name)) - else: + elif elt_name not in set(idents): log.warning("%s.%s in multiple groups" % (self.canonical_name, elt_name)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-01 19:47:10
|
Revision: 1709 http://epydoc.svn.sourceforge.net/epydoc/?rev=1709&view=rev Author: edloper Date: 2008-02-01 11:47:06 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Fixed docstring typo Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2008-02-01 19:32:30 UTC (rev 1708) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2008-02-01 19:47:06 UTC (rev 1709) @@ -3423,7 +3423,7 @@ def _private_subclasses(self, class_doc): """Return a list of all subclasses of the given class that are - private, as determined by L{_val_is_private}. Recursive + private, as determined by L{_val_is_public}. Recursive subclasses are included in this list.""" queue = [class_doc] private = set() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-01 19:32:36
|
Revision: 1708 http://epydoc.svn.sourceforge.net/epydoc/?rev=1708&view=rev Author: edloper Date: 2008-02-01 11:32:30 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Removed debug-printf statement that was accidentally left in from svn 1703. Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2008-02-01 19:28:01 UTC (rev 1707) +++ trunk/epydoc/src/epydoc/docparser.py 2008-02-01 19:32:30 UTC (rev 1708) @@ -1691,7 +1691,6 @@ all_var.value.parse_repr = pp_toktree(all_var.value.toktree) except ParseError: error = "unable to parse the contents of __all__" - log.warning('now', all_var.value.parse_repr) if error: log.warning("Parsing %s (line %s): while processing an __all__" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-01 19:28:05
|
Revision: 1707 http://epydoc.svn.sourceforge.net/epydoc/?rev=1707&view=rev Author: edloper Date: 2008-02-01 11:28:01 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Minor modification to ConsoleLogger.print_times formatting Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:21:54 UTC (rev 1706) +++ trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:28:01 UTC (rev 1707) @@ -1352,10 +1352,10 @@ total = sum([time for (time, task) in self._task_times]) max_t = max([time for (time, task) in self._task_times]) for (time, task) in self._task_times: - task = task[:31] - print ' %s%s %7.1fs' % (task, '.'*(35-len(task)), time), - if self.term.COLS > 55: - print '|'+'=' * int((self.term.COLS-53) * time / max_t) + task = task[:34] + print ' %s%s%7.1fs' % (task, '.'*(37-len(task)), time), + if self.term.COLS > 58: + print '|'+'=' * int((self.term.COLS-56) * time / max_t) else: print print This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-01 19:21:56
|
Revision: 1706 http://epydoc.svn.sourceforge.net/epydoc/?rev=1706&view=rev Author: edloper Date: 2008-02-01 11:21:54 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Fixed a minor bug introduced in svn 1704 Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:18:37 UTC (rev 1705) +++ trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:21:54 UTC (rev 1706) @@ -1334,8 +1334,6 @@ print self.term.BOLD + header + self.term.NORMAL def end_progress(self): - if self._progress is None: - return # already ended. self.progress(1.) if self._progress_mode == 'bar': sys.stdout.write(self.term.CLEAR_LINE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-01 19:18:39
|
Revision: 1705 http://epydoc.svn.sourceforge.net/epydoc/?rev=1705&view=rev Author: edloper Date: 2008-02-01 11:18:37 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Fixed typo from previous checkin Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:15:34 UTC (rev 1704) +++ trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:18:37 UTC (rev 1705) @@ -822,9 +822,10 @@ # Basic timing breakdown: if options.verbosity >= 2: - for logger in logger: + for logger in loggers: if isinstance(logger, ConsoleLogger): logger.print_times() + break # If we encountered any message types that we were requested to # fail on, then exit with status 2. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-02-01 19:15:36
|
Revision: 1704 http://epydoc.svn.sourceforge.net/epydoc/?rev=1704&view=rev Author: edloper Date: 2008-02-01 11:15:34 -0800 (Fri, 01 Feb 2008) Log Message: ----------- - Deregister loggers before cli.main() exits. - Rearranged logger handling code in cli, to better handle the case where multiple loggers are used. Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py trunk/epydoc/src/epydoc/log.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-01-31 06:52:33 UTC (rev 1703) +++ trunk/epydoc/src/epydoc/cli.py 2008-02-01 19:15:34 UTC (rev 1704) @@ -660,13 +660,15 @@ # options.parse = False # Set up the logger + loggers = [] if options.simple_term: TerminalController.FORCE_SIMPLE_TERM = True if options.action == 'text': - logger = None # no logger for text output. + pass # no logger for text output. elif options.verbosity > 1: logger = ConsoleLogger(options.verbosity) log.register_logger(logger) + loggers.append(logger) else: # Each number is a rough approximation of how long we spend on # that task, used to divide up the unified progress bar. @@ -695,6 +697,7 @@ del stages[1:3] # no merging or linking logger = UnifiedProgressConsoleLogger(options.verbosity, stages) log.register_logger(logger) + loggers.append(logger) # check the output directory. if options.action not in ('text', 'check', 'pickle'): @@ -707,7 +710,9 @@ if options.action == 'html': if not os.path.exists(options.target): os.mkdir(options.target) - log.register_logger(HTMLLogger(options.target, options)) + logger = HTMLLogger(options.target, options) + log.register_logger(logger) + loggers.append(logger) else: log.warning("--include-log requires --html") @@ -764,9 +769,11 @@ exclude_parse=exclude_parse) if docindex is None: - if log.ERROR in logger.reported_message_levels: - sys.exit(1) + for logger in loggers: + if log.ERROR in logger.reported_message_levels: + sys.exit(1) else: + for logger in loggers: log.remove_logger(logger) return # docbuilder already logged an error. # Load profile information, if it was given. @@ -778,7 +785,9 @@ profile_stats = pstats.Stats(options.pstat_files[0]) for filename in options.pstat_files[1:]: profile_stats.add(filename) - except KeyboardInterrupt: raise + except KeyboardInterrupt: + for logger in loggers: log.remove_logger(logger) + raise except Exception, e: log.error("Error reading pstat file: %s" % e) profile_stats = None @@ -800,18 +809,22 @@ print >>sys.stderr, '\nUnsupported action %s!' % options.action # If we suppressed docstring warnings, then let the user know. - if logger is not None and logger.suppressed_docstring_warning: - if logger.suppressed_docstring_warning == 1: - prefix = '1 markup error was found' - else: - prefix = ('%d markup errors were found' % - logger.suppressed_docstring_warning) - log.warning("%s while processing docstrings. Use the verbose " - "switch (-v) to display markup errors." % prefix) + for logger in loggers: + if (isinstance(logger, ConsoleLogger) and + logger.suppressed_docstring_warning): + if logger.suppressed_docstring_warning == 1: + prefix = '1 markup error was found' + else: + prefix = ('%d markup errors were found' % + logger.suppressed_docstring_warning) + logger.warning("%s while processing docstrings. Use the verbose " + "switch (-v) to display markup errors." % prefix) # Basic timing breakdown: - if options.verbosity >= 2 and logger is not None: - logger.print_times() + if options.verbosity >= 2: + for logger in logger: + if isinstance(logger, ConsoleLogger): + logger.print_times() # If we encountered any message types that we were requested to # fail on, then exit with status 2. @@ -820,6 +833,9 @@ if max_reported_message_level >= options.fail_on: sys.exit(2) + # Deregister our logger(s). + for logger in loggers: log.remove_logger(logger) + def write_html(docindex, options): from epydoc.docwriter.html import HTMLWriter html_writer = HTMLWriter(docindex, **options.__dict__) @@ -1309,7 +1325,7 @@ def start_progress(self, header=None): if self._progress is not None: - raise ValueError + raise ValueError('previous progress bar not ended') self._progress = None self._progress_start_time = time.time() self._progress_header = header @@ -1317,6 +1333,8 @@ print self.term.BOLD + header + self.term.NORMAL def end_progress(self): + if self._progress is None: + return # already ended. self.progress(1.) if self._progress_mode == 'bar': sys.stdout.write(self.term.CLEAR_LINE) @@ -1365,6 +1383,8 @@ if self.stage == 0: ConsoleLogger.start_progress(self) self.stage += 1 + if self.stage > len(self.stages): + self.stage = len(self.stages) # should never happen! def end_progress(self): if self.stage == len(self.stages): @@ -1448,6 +1468,7 @@ return self.MESSAGE % (level.split()[-1], hdr, message) def close(self): + if self.out is None: return if self.is_empty: self.out.write('<div class="log-info">' 'No warnings or errors!</div>') @@ -1457,6 +1478,7 @@ (time.ctime(), self._elapsed_time())) self.out.write(self.FOOTER) self.out.close() + self.out = None def _elapsed_time(self): secs = int(time.time()-self.start_time) Modified: trunk/epydoc/src/epydoc/log.py =================================================================== --- trunk/epydoc/src/epydoc/log.py 2008-01-31 06:52:33 UTC (rev 1703) +++ trunk/epydoc/src/epydoc/log.py 2008-02-01 19:15:34 UTC (rev 1704) @@ -66,7 +66,8 @@ def close(self): """ - Perform any tasks needed to close this logger. + Perform any tasks needed to close this logger. This should + be safe to call multiple times. """ #//////////////////////////////////////////////////////////// @@ -141,7 +142,8 @@ """ _loggers.append(logger) -def remove_logger(logger): +def remove_logger(logger, close_logger=True): + if close_logger: logger.close() _loggers.remove(logger) ###################################################################### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-31 06:52:35
|
Revision: 1703 http://epydoc.svn.sourceforge.net/epydoc/?rev=1703&view=rev Author: edloper Date: 2008-01-30 22:52:33 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Added support for @public decorator, which is assumed to append a function's name to __all__. This can be turned off with the configuration constant PUBLIC_DECORATOR_APPENDS_TO_ALL. Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2008-01-31 06:50:04 UTC (rev 1702) +++ trunk/epydoc/src/epydoc/docparser.py 2008-01-31 06:52:33 UTC (rev 1703) @@ -145,6 +145,10 @@ knowledge about what value the decorator returns. """ +PUBLIC_DECORATOR_APPENDS_TO_ALL = True +"""If true, then the @public decorator will append the function's +name to the module's __all__ variable.""" + BASE_HANDLING = 'parse'#'link' """What should C{docparser} do when it encounters a base class that was imported from another module? @@ -1105,7 +1109,7 @@ # Evaluate the right hand side. if not is_instvar: - rhs_val, is_alias = rhs_to_valuedoc(rhs, parent_docs) + rhs_val, is_alias = rhs_to_valuedoc(rhs, parent_docs, lineno) else: rhs_val, is_alias = UNKNOWN, False @@ -1196,7 +1200,7 @@ return False return False -def rhs_to_valuedoc(rhs, parent_docs): +def rhs_to_valuedoc(rhs, parent_docs, lineno): # Dotted variable: try: rhs_name = parse_dotted_name(rhs) @@ -1209,9 +1213,10 @@ # Decorators: if (len(rhs)==2 and rhs[0][0] == token.NAME and isinstance(rhs[1], list)): - arg_val, _ = rhs_to_valuedoc(rhs[1][1:-1], parent_docs) + arg_val, _ = rhs_to_valuedoc(rhs[1][1:-1], parent_docs, lineno) if isinstance(arg_val, RoutineDoc): - doc = apply_decorator(DottedName(rhs[0][1]), arg_val) + doc = apply_decorator(DottedName(rhs[0][1]), arg_val, + parent_docs, lineno) doc.canonical_name = UNKNOWN doc.parse_repr = pp_toktree(rhs) return doc, False @@ -1438,7 +1443,7 @@ func_doc.parse_repr) else: deco_repr = UNKNOWN - func_doc = apply_decorator(deco_name, func_doc) + func_doc = apply_decorator(deco_name, func_doc, parent_docs, lineno) func_doc.parse_repr = deco_repr # [XX] Is there a reson the following should be done? It # causes the grouping code to break. Presumably the canonical @@ -1455,12 +1460,18 @@ # Return the new ValueDoc. return func_doc -def apply_decorator(decorator_name, func_doc): +def apply_decorator(decorator_name, func_doc, parent_docs, lineno): # [xx] what if func_doc is not a RoutineDoc? if decorator_name == DottedName('staticmethod'): return StaticMethodDoc(**func_doc.__dict__) elif decorator_name == DottedName('classmethod'): return ClassMethodDoc(**func_doc.__dict__) + elif (decorator_name == DottedName('public') and + PUBLIC_DECORATOR_APPENDS_TO_ALL): + if '"' not in func_doc.canonical_name[-1]: # for security + quoted_func_name = '"%s"' % func_doc.canonical_name[-1] + append_to_all(quoted_func_name, parent_docs, lineno) + return func_doc.__class__(**func_doc.__dict__) # make a copy. elif DEFAULT_DECORATOR_BEHAVIOR == 'transparent': return func_doc.__class__(**func_doc.__dict__) # make a copy. elif DEFAULT_DECORATOR_BEHAVIOR == 'opaque': @@ -1660,9 +1671,11 @@ """ # Extract the string to be appended assert line[-1][1][0] == token.STRING - name = line[-1][1][1] + append_to_all(line[-1][1][1], parent_docs, lineno) +def append_to_all(name, parent_docs, lineno): all_var = lookup_name('__all__', parent_docs) + error = None if all_var is None or all_var.value in (None, UNKNOWN): error = "variable __all__ not found." @@ -1678,10 +1691,11 @@ all_var.value.parse_repr = pp_toktree(all_var.value.toktree) except ParseError: error = "unable to parse the contents of __all__" + log.warning('now', all_var.value.parse_repr) if error: - log.warning("Parsing %s (line %s): while processing " - "an __all__.append() statement: %s" % + log.warning("Parsing %s (line %s): while processing an __all__" + ".append() statement or @public decorator: %s" % (parent_docs[0].filename, lineno, error)) def is_append_to_all(line): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-31 06:50:06
|
Revision: 1702 http://epydoc.svn.sourceforge.net/epydoc/?rev=1702&view=rev Author: edloper Date: 2008-01-30 22:50:04 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Pass options to plaintext writer Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-01-31 06:49:44 UTC (rev 1701) +++ trunk/epydoc/src/epydoc/cli.py 2008-01-31 06:50:04 UTC (rev 1702) @@ -950,7 +950,7 @@ plaintext_writer = PlaintextWriter() s = '' for apidoc in docindex.root: - s += plaintext_writer.write(apidoc) + s += plaintext_writer.write(apidoc, **options.__dict__) log.end_progress() if isinstance(s, unicode): s = s.encode('ascii', 'backslashreplace') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-31 06:49:47
|
Revision: 1701 http://epydoc.svn.sourceforge.net/epydoc/?rev=1701&view=rev Author: edloper Date: 2008-01-30 22:49:44 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Added support for show_private option to plaintext writer Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/plaintext.py Modified: trunk/epydoc/src/epydoc/docwriter/plaintext.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/plaintext.py 2008-01-31 06:20:50 UTC (rev 1700) +++ trunk/epydoc/src/epydoc/docwriter/plaintext.py 2008-01-31 06:49:44 UTC (rev 1701) @@ -19,6 +19,7 @@ result = [] out = result.append + self._show_private = options.get('show_private', True) self._cols = options.get('cols', 75) try: @@ -38,9 +39,6 @@ return ''.join(result) def write_module(self, out, mod_doc): - #for n,v in mod_doc.variables.items(): - # print n, `v.value`, `v.value.value` - # The cannonical name of the module. out(self.section('Module Name')) out(' %s\n\n' % mod_doc.canonical_name) @@ -226,6 +224,9 @@ for i, var_doc in enumerate(var_docs): val_doc, name = var_doc.value, var_doc.name + if not var_doc.is_public and not self._show_private: + continue + if verbose: out(prefix+'\n') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-31 06:20:53
|
Revision: 1700 http://epydoc.svn.sourceforge.net/epydoc/?rev=1700&view=rev Author: edloper Date: 2008-01-30 22:20:50 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Added parsing support for: >>> __all__.append('name') >>> __all__ += ['name'] - Added line numbers to parser warning messages Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2008-01-31 01:18:16 UTC (rev 1699) +++ trunk/epydoc/src/epydoc/docparser.py 2008-01-31 06:20:50 UTC (rev 1700) @@ -767,6 +767,8 @@ elif (line[0][0] == token.NAME and line[0][1] in CONTROL_FLOW_KEYWORDS): return process_control_flow_line(*args) + elif line[0] == (token.NAME, '__all__') and is_append_to_all(line): + return process_append_to_all(*args) else: return None # [xx] do something with control structures like for/if? @@ -1340,9 +1342,10 @@ # decode_with_backslashreplace, which will map e.g. # "\xe9" -> u"\\xe9". docstring = decode_with_backslashreplace(docstring) - log.warning("While parsing %s: docstring is not a unicode " - "string, but it contains non-ascii data." % - prev_line_doc.canonical_name) + log.warning("Parsing %s (line %s): %s docstring is not a " + "unicode string, but it contains non-ascii data." % + (parent_docs[0].filename, lineno, + prev_line_doc.canonical_name)) # If the modified APIDoc is an instance variable, and it has # not yet been added to its class's C{variables} list, @@ -1362,9 +1365,12 @@ break if prev_line_doc.docstring not in (None, UNKNOWN): - log.warning("%s has both a comment-docstring and a normal " - "(string) docstring; ignoring the comment-" - "docstring." % prev_line_doc.canonical_name) + name = prev_line_doc.canonical_name + if name is UNKNOWN and isinstance(prev_line_doc, VariableDoc): + name = prev_line_doc.name + log.warning("Parsing %s (line %s): %s has both a comment-docstring " + "and a normal (string) docstring; ignoring the comment-" + "docstring." % (parent_docs[0].filename, lineno, name)) prev_line_doc.docstring = docstring prev_line_doc.docstring_lineno = lineno @@ -1548,8 +1554,9 @@ for base_name in parse_classdef_bases(line[2]): class_doc.bases.append(find_base(base_name, parent_docs)) except ParseError, e: - log.warning("Unable to extract the base list for %s: %s" % - (canonical_name, e)) + log.warning("Parsing %s (line %s): Unable to extract " + "the base list for class '%s'." % + (parent_docs[0].filename, lineno, canonical_name)) class_doc.bases = UNKNOWN else: class_doc.bases = [] @@ -1636,6 +1643,67 @@ return _proxy_base(parse_repr=str(name)) #///////////////////////////////////////////////////////////////// +# Line handler: append to all +#///////////////////////////////////////////////////////////////// + +def process_append_to_all(line, parent_docs, prev_line_doc, lineno, + comments, decorators, encoding): + """ + The line handler for __all__.append() lines; either of: + + >>> __all__.append('name') + >>> __all__ += ['name'] + + This handler looks up the value of the variable C{__all__} in + parent_docs; and if it is found, and has a list-of-strings value, + the handler appends the new name. + """ + # Extract the string to be appended + assert line[-1][1][0] == token.STRING + name = line[-1][1][1] + + all_var = lookup_name('__all__', parent_docs) + error = None + if all_var is None or all_var.value in (None, UNKNOWN): + error = "variable __all__ not found." + else: + try: + # Make sure we can parse the __all__ value. + parse_string_list(all_var.value.toktree, True) + + # Add the new name to __all__. + if len(all_var.value.toktree[0]) > 2: + all_var.value.toktree[0].insert(-1, (token.OP, ',')) + all_var.value.toktree[0].insert(-1, (token.STRING, name)) + all_var.value.parse_repr = pp_toktree(all_var.value.toktree) + except ParseError: + error = "unable to parse the contents of __all__" + + if error: + log.warning("Parsing %s (line %s): while processing " + "an __all__.append() statement: %s" % + (parent_docs[0].filename, lineno, error)) + +def is_append_to_all(line): + """ + Check if a line is an __all__.append line() + @see: L{process_append_to_all} + """ + # __all__.append(string) + if (len(line) == 4 and line[0] == (token.NAME, '__all__') and + line[1] == (token.OP, '.') and line[2] == (token.NAME, 'append') and + isinstance(line[3], list) and len(line[3]) == 3 and + line[3][0] == (token.OP, '(') and line[3][1][0] == token.STRING): + return True + + # __all__ += [string] + if (len(line) == 3 and line[0] == (token.NAME, '__all__') and + line[1] == (token.OP, '+=') and isinstance(line[2], list) and + len(line[2]) == 3 and line[2][0][1] in '[(' and + line[2][1][0] == token.STRING): + return True + +#///////////////////////////////////////////////////////////////// #{ Parsing #///////////////////////////////////////////////////////////////// @@ -1820,10 +1888,12 @@ raise ParseError("Expected a string") # ['1', 'b', 'c'] -def parse_string_list(elt_list): - if (len(elt_list) == 1 and isinstance(elt_list, list) and +def parse_string_list(elt_list, require_sequence=False): + if (len(elt_list) == 1 and isinstance(elt_list[0], list) and elt_list[0][0][1] in ('(', '[')): elt_list = elt_list[0][1:-1] + elif require_sequence: + raise ParseError("Expected a sequence") string_list = [] for string_elt in split_on(elt_list, (token.OP, ',')): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-31 01:18:19
|
Revision: 1699 http://epydoc.svn.sourceforge.net/epydoc/?rev=1699&view=rev Author: edloper Date: 2008-01-30 17:18:16 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Minor change in help string for --suppress-timestamp Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-01-31 01:09:38 UTC (rev 1698) +++ trunk/epydoc/src/epydoc/cli.py 2008-01-31 01:18:16 UTC (rev 1699) @@ -346,8 +346,7 @@ output_group.add_option('--suppress-timestamp', action='store_false', dest='include_timestamp', - help=("When generating HTML output, suppress the timestamp at " - "the bottom of each page.")) + help=("Do not include a timestamp in the generated output.")) # The group of external API options. # Skip if the module couldn't be imported (usually missing docutils) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-31 01:09:47
|
Revision: 1698 http://epydoc.svn.sourceforge.net/epydoc/?rev=1698&view=rev Author: edloper Date: 2008-01-30 17:09:38 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Added --suppress-timestamp option (sf feature request 1695848) Modified Paths: -------------- trunk/epydoc/man/epydoc.1 trunk/epydoc/src/epydoc/cli.py trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/man/epydoc.1 =================================================================== --- trunk/epydoc/man/epydoc.1 2008-01-31 00:33:47 UTC (rev 1697) +++ trunk/epydoc/man/epydoc.1 2008-01-31 01:09:38 UTC (rev 1698) @@ -293,6 +293,10 @@ their modules. This creates a separate LaTeX file for each class, so it can also be useful if you want to include the documentation for one or two classes as sections of your own LaTeX document. +.\" --suppress-timestamp +.TP +.B \-\-suppress\-timestamp +Do not include a timestamp in the generated output. .RE .PP .\"-------------------------------------------------- Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2008-01-31 00:33:47 UTC (rev 1697) +++ trunk/epydoc/src/epydoc/cli.py 2008-01-31 01:09:38 UTC (rev 1698) @@ -137,7 +137,8 @@ include_source_code=True, pstat_files=[], simple_term=False, fail_on=None, exclude=[], exclude_parse=[], exclude_introspect=[], external_api=[], external_api_file=[], external_api_root=[], - redundant_details=False, src_code_tab_width=8) + redundant_details=False, src_code_tab_width=8, + include_timestamp=True) def parse_arguments(): # Construct the option parser. @@ -342,6 +343,11 @@ action='store', type='int', dest='src_code_tab_width', help=("When generating HTML output, sets the number of spaces " "each tab in source code listings is replaced with.")) + + output_group.add_option('--suppress-timestamp', + action='store_false', dest='include_timestamp', + help=("When generating HTML output, suppress the timestamp at " + "the bottom of each page.")) # The group of external API options. # Skip if the module couldn't be imported (usually missing docutils) @@ -580,6 +586,8 @@ options.list_classes_separately = _str_to_bool(val, optname) elif optname in ('src-code-tab-width', 'src_code_tab_width'): options.src_code_tab_width = _str_to_int(val, optname) + elif optname == 'timestamp': + options.include_timestamp = _str_to_bool(val, optname) # External API elif optname in ('external-api', 'external_api'): Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2008-01-31 00:33:47 UTC (rev 1697) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2008-01-31 01:09:38 UTC (rev 1698) @@ -291,6 +291,9 @@ @type include_log: C{boolean} @keyword include_log: If true, the the footer will include an href to the page 'epydoc-log.html'. + @type include_timestamp: C{boolean} + @keyword include_timestamp: If true, then include a timestamp in + the footer. @type src_code_tab_width: C{int} @keyword src_code_tab_width: Number of spaces to replace each tab with in source code listings. @@ -358,6 +361,9 @@ self._include_log = kwargs.get('include_log', False) """Are we generating an HTML log page?""" + self._include_timestamp = kwargs.get('include_timestamp', True) + """Include a timestamp on the generated docs?""" + self._src_code_tab_width = kwargs.get('src_code_tab_width', 8) """Number of spaces to replace each tab with in source code listings.""" @@ -1771,9 +1777,13 @@ <td align="left" class="footer"> >>> if self._include_log: <a href="epydoc-log.html">Generated by Epydoc - $epydoc.__version__$ on $time.asctime()$</a> + $epydoc.__version__$ + >>> if self._include_timestamp: + on $time.asctime()$</a> >>> else: - Generated by Epydoc $epydoc.__version__$ on $time.asctime()$ + Generated by Epydoc $epydoc.__version__$ + >>> if self._include_timestamp: + on $time.asctime()$ >>> #endif </td> <td align="right" class="footer"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-31 00:34:12
|
Revision: 1697 http://epydoc.svn.sourceforge.net/epydoc/?rev=1697&view=rev Author: edloper Date: 2008-01-30 16:33:47 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - When parsing a file for documentation, if an IOError or OSError is encountered then issue an error message rather than crashing. E.g., this occurs if a permission issue prevents epydoc from reading a python source file. (sf bug 1883053) Modified Paths: -------------- trunk/epydoc/src/epydoc/docbuilder.py Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2008-01-30 18:47:21 UTC (rev 1696) +++ trunk/epydoc/src/epydoc/docbuilder.py 2008-01-31 00:33:47 UTC (rev 1697) @@ -547,10 +547,8 @@ try: parse_doc = parse_docs( filename=filename, context=parent_docs[1]) - except ParseError, e: + except (ParseError, ImportError, IOError, OSError), e: parse_error = str(e) - except ImportError, e: - parse_error = str(e) # Report any errors we encountered. _report_errors(filename, introspect_doc, parse_doc, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 18:47:23
|
Revision: 1696 http://epydoc.svn.sourceforge.net/epydoc/?rev=1696&view=rev Author: edloper Date: 2008-01-30 10:47:21 -0800 (Wed, 30 Jan 2008) Log Message: ----------- tagged 3.0.1 release Added Paths: ----------- tags/epydoc-3.0.1/ Copied: tags/epydoc-3.0.1 (from rev 1695, trunk/epydoc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 18:46:34
|
Revision: 1695 http://epydoc.svn.sourceforge.net/epydoc/?rev=1695&view=rev Author: edloper Date: 2008-01-30 10:46:32 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Only use 'classifiers' metadata if py version >= 2.4 Modified Paths: -------------- trunk/epydoc/src/setup.py Modified: trunk/epydoc/src/setup.py =================================================================== --- trunk/epydoc/src/setup.py 2008-01-30 18:43:49 UTC (rev 1694) +++ trunk/epydoc/src/setup.py 2008-01-30 18:46:32 UTC (rev 1695) @@ -37,6 +37,12 @@ 'Topic :: Software Development :: Documentation', ] +# Classifiers metadata only supported for Python 2.4+ +if sys.version_info[:2] >= (2,4): + other_metadata = dict(classifiers=CLASSIFIERS) +else: + other_metadata = {} + if '--format=wininst' in sys.argv: SCRIPTS = ['scripts/epydoc.pyw', 'scripts/epydoc.py'] else: @@ -53,7 +59,7 @@ url=URL, scripts=SCRIPTS, keywords=KEYWORDS.split(), - classifiers=CLASSIFIERS, long_description=LONG_DESCRIPTION, - packages=['epydoc', 'epydoc.markup', 'epydoc.test', 'epydoc.docwriter']) + packages=['epydoc', 'epydoc.markup', 'epydoc.test', 'epydoc.docwriter'], + **other_metadata) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 18:43:55
|
Revision: 1694 http://epydoc.svn.sourceforge.net/epydoc/?rev=1694&view=rev Author: edloper Date: 2008-01-30 10:43:49 -0800 (Wed, 30 Jan 2008) Log Message: ----------- Added more metadata, for pypi index. Modified Paths: -------------- trunk/epydoc/src/setup.py Modified: trunk/epydoc/src/setup.py =================================================================== --- trunk/epydoc/src/setup.py 2008-01-30 18:43:30 UTC (rev 1693) +++ trunk/epydoc/src/setup.py 2008-01-30 18:43:49 UTC (rev 1694) @@ -13,6 +13,29 @@ (AUTHOR, EMAIL) = re.match('^(.*?)\s*<(.*)>$', epydoc.__author__).groups() URL = epydoc.__url__ LICENSE = epydoc.__license__ +KEYWORDS='docstring restructuredtext rst javadoc docformat pydoc epydoc' +LONG_DESCRIPTION = """\ +Epydoc is a tool for generating API documentation documentation for +Python modules, based on their docstrings. For an example of epydoc's +output, see the API documentation for epydoc itself (`html +<http://epydoc.sf.net/api/>`__\ , `pdf +<http://epydoc.sf.net/epydoc.pdf>`__\ ). A lightweight markup +language called `epytext <http://epydoc.sf.net/epytextintro.html>`__ +can be used to format docstrings, and to add information about +specific fields, such as parameters and instance variables. Epydoc +also understands docstrings written in `reStructuredText +<http://docutils.sourceforge.net/rst.html>`__\ , Javadoc, and +plaintext. For a more extensive example of epydoc's output, see the +API documentation for `Python 2.5 +<http://epydoc.sourceforge.net/stdlib/>`__\ .""" +CLASSIFIERS=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python', + 'Topic :: Documentation', + 'Topic :: Software Development :: Documentation', + ] if '--format=wininst' in sys.argv: SCRIPTS = ['scripts/epydoc.pyw', 'scripts/epydoc.py'] @@ -29,5 +52,8 @@ license=LICENSE, url=URL, scripts=SCRIPTS, + keywords=KEYWORDS.split(), + classifiers=CLASSIFIERS, + long_description=LONG_DESCRIPTION, packages=['epydoc', 'epydoc.markup', 'epydoc.test', 'epydoc.docwriter']) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 18:43:32
|
Revision: 1693 http://epydoc.svn.sourceforge.net/epydoc/?rev=1693&view=rev Author: edloper Date: 2008-01-30 10:43:30 -0800 (Wed, 30 Jan 2008) Log Message: ----------- Added 'upload' target (to update pypi index) Modified Paths: -------------- trunk/epydoc/src/Makefile Modified: trunk/epydoc/src/Makefile =================================================================== --- trunk/epydoc/src/Makefile 2008-01-30 17:11:29 UTC (rev 1692) +++ trunk/epydoc/src/Makefile 2008-01-30 18:43:30 UTC (rev 1693) @@ -89,3 +89,14 @@ test -e doc || ln -s ../webpage doc test -e man || ln -s ../man man $(PYTHON) setup.py -q bdist --format=wininst + +upload: + test -e doc || ln -s ../webpage doc + test -e man || ln -s ../man man + $(PYTHON) setup.py register + $(PYTHON) setup.py -q sdist --format=gztar upload + $(PYTHON) setup.py -q sdist --format=zip upload + $(PYTHON) setup.py -q bdist --format=wininst upload + $(PYTHON) setup.py -q bdist --format=rpm upload + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 17:11:31
|
Revision: 1692 http://epydoc.svn.sourceforge.net/epydoc/?rev=1692&view=rev Author: edloper Date: 2008-01-30 09:11:29 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Bumped version to 3.0.1, for the GUI fix. Modified Paths: -------------- trunk/epydoc/doc/installing.html trunk/epydoc/doc/manual-install.txt Modified: trunk/epydoc/doc/installing.html =================================================================== --- trunk/epydoc/doc/installing.html 2008-01-30 17:11:09 UTC (rev 1691) +++ trunk/epydoc/doc/installing.html 2008-01-30 17:11:29 UTC (rev 1692) @@ -83,13 +83,13 @@ <div class="screen"><pre> <code class="prompt">[/tmp]$</code> <code class="user">su</code> Password: -<code class="prompt">[/tmp]#</code> <code class="user">rpm -i epydoc-3.0.noarch.rpm</code> +<code class="prompt">[/tmp]#</code> <code class="user">rpm -i epydoc-3.0.1.noarch.rpm</code> </pre></div></li> <li> Once epydoc is installed, you can delete the RPM file. <div class="screen"><pre> -<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.rpm</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.1.rpm</code> </pre></div> </li> </ol> @@ -97,7 +97,7 @@ <h2> Installing from the Windows Installer </h2> <ol> - <li> Download and run <code>epydoc-3.0.win32.exe</code>. </li> + <li> Download and run <code>epydoc-3.0.1.win32.exe</code>. </li> <li> Follow the on-screen instructions. Epydoc will be installed in the <code>epydoc</code> subdirectory of your Python installation directory (typically <code>C:\Python23\</code>). </li> @@ -109,7 +109,7 @@ scripts to more convenient locations (such as your desktop or start menu). </li> <li> Once epydoc is installed, you can delete - <code>epydoc-3.0.win32.exe</code>. </li> + <code>epydoc-3.0.1.win32.exe</code>. </li> </ol> <a name="src"></a> @@ -120,19 +120,19 @@ to a directory of your choice, and uncompress it. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0.tar</code> +<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0.1.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0.1.tar</code> </pre></div></li> - <li> Use "<code>make install</code>" in the <code>eydoc-3.0/</code> + <li> Use "<code>make install</code>" in the <code>eydoc-3.0.1/</code> directory to install epydoc. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0/</code> -<code class="prompt">[/tmp/epydoc-3.0]$</code> <code class="user">su</code> +<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0.1/</code> +<code class="prompt">[/tmp/epydoc-3.0.1]$</code> <code class="user">su</code> Password: -<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">make install</code> +<code class="prompt">[/tmp/epydoc-3.0.1]#</code> <code class="user">make install</code> running install running build <i>[...]</i> @@ -150,16 +150,16 @@ running "<code>make installdocs</code>". <div class="screen"><pre> -<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">make installdocs</code> +<code class="prompt">[/tmp/epydoc-3.0.1]#</code> <code class="user">make installdocs</code> </pre></div></li> <li> Once epydoc is installed, you can delete the installation directory and the source distribution file. <div class="screen"><pre> -<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">cd ..</code> -<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0</code> -<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.tar</code> +<code class="prompt">[/tmp/epydoc-3.0.1]#</code> <code class="user">cd ..</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0.1</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.1.tar</code> </pre></div> </li> </ol> @@ -171,25 +171,25 @@ to a directory of your choice, and uncompress it. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0.tar.gz</code> -<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0.tar</code> +<code class="prompt">[/tmp]$</code> <code class="user">wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">gunzip epydoc-3.0.1.tar.gz</code> +<code class="prompt">[/tmp]$</code> <code class="user">tar -xvf epydoc-3.0.1.tar</code> </pre></div></li> <li> Use the <code>setup.py</code> script in the - <code>eydoc-3.0/</code> directory to install epydoc. + <code>eydoc-3.0.1/</code> directory to install epydoc. <div class="screen"><pre> -<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0/</code> -<code class="prompt">[/tmp/epydoc-3.0]$</code> <code class="user">su</code> +<code class="prompt">[/tmp]$</code> <code class="user">cd epydoc-3.0.1/</code> +<code class="prompt">[/tmp/epydoc-3.0.1]$</code> <code class="user">su</code> Password: -<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">python setup.py install</code> +<code class="prompt">[/tmp/epydoc-3.0.1]#</code> <code class="user">python setup.py install</code> running install running build <i>[...]</i> copying build/scripts/epydoc -> /usr/bin changing mode of /usr/bin/epydoc to 100775 -<code class="prompt">[/tmp/epydoc-3.0]#</code> <code class="user">cd ..</code> +<code class="prompt">[/tmp/epydoc-3.0.1]#</code> <code class="user">cd ..</code> <code class="prompt">[/tmp]#</code> </pre></div></li> @@ -199,16 +199,16 @@ as <code>/usr/share/man/</code>. <div class="screen"><pre> -<code class="prompt">[/tmp]#</code> <code class="user">cp -r epydoc-3.0/doc/ /usr/share/doc/epydoc/</code> -<code class="prompt">[/tmp]#</code> <code class="user">cp epydoc-3.0/man/* /usr/share/man/</code> +<code class="prompt">[/tmp]#</code> <code class="user">cp -r epydoc-3.0.1/doc/ /usr/share/doc/epydoc/</code> +<code class="prompt">[/tmp]#</code> <code class="user">cp epydoc-3.0.1/man/* /usr/share/man/</code> </pre></div> </li> <li> Once epydoc is installed, you can delete the installation directory and the source distribution file. <div class="screen"><pre> -<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0</code> -<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.tar</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm -r epydoc-3.0.1</code> +<code class="prompt">[/tmp]#</code> <code class="user">rm epydoc-3.0.1.tar</code> </pre></div> </li> </ol> Modified: trunk/epydoc/doc/manual-install.txt =================================================================== --- trunk/epydoc/doc/manual-install.txt 2008-01-30 17:11:09 UTC (rev 1691) +++ trunk/epydoc/doc/manual-install.txt 2008-01-30 17:11:29 UTC (rev 1692) @@ -55,17 +55,17 @@ [/tmp]$ su Password: - [/tmp]# rpm -i epydoc-3.0.noarch.rpm + [/tmp]# rpm -i epydoc-3.0.1.noarch.rpm 3. Once epydoc is installed, you can delete the RPM file. :: - [/tmp]# rm epydoc-3.0.rpm + [/tmp]# rm epydoc-3.0.1.rpm Installing from the Windows Installer ------------------------------------- -1. Download and run ``epydoc-3.0.win32.exe``. +1. Download and run ``epydoc-3.0.1.win32.exe``. 2. Follow the on-screen instructions. Epydoc will be installed in the epydoc subdirectory of your Python installation directory (typically ``C:\Python24\``). @@ -74,7 +74,7 @@ interface, and ``epydoc.py`` calls the command line interface. If you'd like, you can create shortcuts from these scripts to more convenient locations (such as your desktop or start menu). -4. Once epydoc is installed, you can delete ``epydoc-3.0.win32.exe``. +4. Once epydoc is installed, you can delete ``epydoc-3.0.1.win32.exe``. Installing from the Source Distribution (using make) @@ -83,17 +83,17 @@ 1. Download an epydoc source distribution to a directory of your choice, and uncompress it. :: - [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz - [/tmp]$ gunzip epydoc-3.0.tar.gz - [/tmp]$ tar -xvf epydoc-3.0.tar + [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz + [/tmp]$ gunzip epydoc-3.0.1.tar.gz + [/tmp]$ tar -xvf epydoc-3.0.1.tar -2. Use ``make install`` in the ``eydoc-3.0/`` directory to install +2. Use ``make install`` in the ``eydoc-3.0.1/`` directory to install epydoc. :: - [/tmp]$ cd epydoc-3.0/ - [/tmp/epydoc-3.0]$ su + [/tmp]$ cd epydoc-3.0.1/ + [/tmp/epydoc-3.0.1]$ su Password: - [/tmp/epydoc-3.0]# make install + [/tmp/epydoc-3.0.1]# make install running install running build [...] @@ -107,14 +107,14 @@ ``/usr/lib/doc``), then edit the ``MAN`` and ``DOC`` variables at the top of ``Makefile`` before running ``make installdocs``. :: - [/tmp/epydoc-3.0]# make installdocs + [/tmp/epydoc-3.0.1]# make installdocs 4. Once epydoc is installed, you can delete the installation directory and the source distribution file. :: - [/tmp/epydoc-3.0]# cd .. - [/tmp]# rm -r epydoc-3.0 - [/tmp]# rm epydoc-3.0.tar + [/tmp/epydoc-3.0.1]# cd .. + [/tmp]# rm -r epydoc-3.0.1 + [/tmp]# rm epydoc-3.0.1.tar Installing from the Source Distribution (without make) @@ -123,37 +123,37 @@ 1. Download an epydoc source distribution to a directory of your choice, and uncompress it. :: - [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.tar.gz - [/tmp]$ gunzip epydoc-3.0.tar.gz - [/tmp]$ tar -xvf epydoc-3.0.tar + [/tmp]$ wget -q http://prdownloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz + [/tmp]$ gunzip epydoc-3.0.1.tar.gz + [/tmp]$ tar -xvf epydoc-3.0.1.tar -2. Use the ``setup.py`` script in the ``eydoc-3.0/`` directory to install +2. Use the ``setup.py`` script in the ``eydoc-3.0.1/`` directory to install epydoc. :: - [/tmp]$ cd epydoc-3.0/ - [/tmp/epydoc-3.0]$ su + [/tmp]$ cd epydoc-3.0.1/ + [/tmp/epydoc-3.0.1]$ su Password: - [/tmp/epydoc-3.0]# python setup.py install + [/tmp/epydoc-3.0.1]# python setup.py install running install running build [...] copying build/scripts/epydoc -> /usr/bin changing mode of /usr/bin/epydoc to 100775 - [/tmp/epydoc-3.0]# cd .. + [/tmp/epydoc-3.0.1]# cd .. [/tmp]# 3. If you'd like to keep a local copy of the documentation, then copy it to a permanant location, such as ``/usr/share/doc/``. You may also want to copy the man pages to a permanant location, such as ``/usr/share/man/``. :: - [/tmp]# cp -r epydoc-3.0/doc/ /usr/share/doc/epydoc/ - [/tmp]# cp epydoc-3.0/man/* /usr/share/man/ + [/tmp]# cp -r epydoc-3.0.1/doc/ /usr/share/doc/epydoc/ + [/tmp]# cp epydoc-3.0.1/man/* /usr/share/man/ 4. Once epydoc is installed, you can delete the installation directory and the source distribution file. :: - [/tmp]# rm -r epydoc-3.0 - [/tmp]# rm epydoc-3.0.tar + [/tmp]# rm -r epydoc-3.0.1 + [/tmp]# rm epydoc-3.0.1.tar Installing on Debian This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 17:11:18
|
Revision: 1691 http://epydoc.svn.sourceforge.net/epydoc/?rev=1691&view=rev Author: edloper Date: 2008-01-30 09:11:09 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Bumped version to 3.0.1, for the GUI fix. Modified Paths: -------------- trunk/epydoc/src/epydoc/__init__.py Modified: trunk/epydoc/src/epydoc/__init__.py =================================================================== --- trunk/epydoc/src/epydoc/__init__.py 2008-01-30 17:07:10 UTC (rev 1690) +++ trunk/epydoc/src/epydoc/__init__.py 2008-01-30 17:11:09 UTC (rev 1691) @@ -167,7 +167,7 @@ :author: `Edward Loper <ed...@gr...>`__ :requires: Python 2.3+ -:version: 3.0 +:version: 3.0.1 :see: `The epydoc webpage <http://epydoc.sourceforge.net>`__ :see: `The epytext markup language manual <http://epydoc.sourceforge.net/epytext.html>`__ @@ -200,7 +200,7 @@ """ __docformat__ = 'restructuredtext en' -__version__ = '3.0' +__version__ = '3.0.1' """The version of epydoc""" __author__ = 'Edward Loper <ed...@gr...>' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 17:07:11
|
Revision: 1690 http://epydoc.svn.sourceforge.net/epydoc/?rev=1690&view=rev Author: edloper Date: 2008-01-30 09:07:10 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - Fixed _STAGES bug Modified Paths: -------------- trunk/epydoc/src/epydoc/gui.py Modified: trunk/epydoc/src/epydoc/gui.py =================================================================== --- trunk/epydoc/src/epydoc/gui.py 2008-01-30 17:01:02 UTC (rev 1689) +++ trunk/epydoc/src/epydoc/gui.py 2008-01-30 17:07:10 UTC (rev 1690) @@ -144,7 +144,7 @@ from epydoc import log from epydoc.util import wordwrap class GUILogger(log.Logger): - _STAGES = [40, 7, 1, 3, 30, 1, 2, 100] + _STAGES = [40, 7, 1, 3, 1, 30, 1, 2, 100] def __init__(self, progress, cancel): self._progress = progress This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 17:01:08
|
Revision: 1689 http://epydoc.svn.sourceforge.net/epydoc/?rev=1689&view=rev Author: edloper Date: 2008-01-30 09:01:02 -0800 (Wed, 30 Jan 2008) Log Message: ----------- - When hiding variables with @undocumented, also remove them from sort_spec. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2008-01-30 03:59:27 UTC (rev 1688) +++ trunk/epydoc/src/epydoc/docstringparser.py 2008-01-30 17:01:02 UTC (rev 1689) @@ -671,6 +671,9 @@ if var_name_re.match(var_name): # Remove the variable from `variables`. api_doc.variables.pop(var_name, None) + if api_doc.sort_spec is not UNKNOWN: + try: api_doc.sort_spec.remove(var_name) + except ValueError: pass # For modules, remove any submodules that match var_name_re. if isinstance(api_doc, ModuleDoc): removed = set([m for m in api_doc.submodules This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2008-01-30 03:59:29
|
Revision: 1688 http://epydoc.svn.sourceforge.net/epydoc/?rev=1688&view=rev Author: edloper Date: 2008-01-29 19:59:27 -0800 (Tue, 29 Jan 2008) Log Message: ----------- created tag for 3.0 release Added Paths: ----------- tags/epydoc-3.0/ Copied: tags/epydoc-3.0 (from rev 1687, trunk/epydoc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |