summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: force enable doctool and gtkdoc1.57.3Christoph Reiter2018-08-182-2/+4
| | | | | | | | doctool is an auto option and was disabled by the recent addition of a new dependency on the markdown Python module. Since we didn't have that in our testing docker image the tests were just skipped. This makes sure we error out if any dependencies are missing again.
* docwriter: revert some output changes to make the tests passChristoph Reiter2018-08-181-3/+6
| | | | | | This reverts a small part of 19c03a46b1 to make tests pass again. The test error weren't noticed because a new Python dependency was missing, leading to those tests getting skipped.
* g-ir-doc-tool: keep mallard as the default formatChristoph Reiter2018-08-171-1/+1
| | | | | In 7f67146d8254 the FORMAT list was extended but the argparser uses the first item as default value. This broke distcheck.
* Update NEWSChristoph Reiter2018-08-171-1/+4
|
* version bumpChristoph Reiter2018-08-172-2/+2
|
* build: Fix a meson build file missing in the tarball. Fixes #223Christoph Reiter2018-08-171-0/+1
| | | | | tests/scanner/meson.build was missing leading to: tests/meson.build:20:0: ERROR: Non-existent build file 'tests/scanner/meson.build'
* gir: Update annotations from glib git masterChristoph Reiter2018-08-163-90/+97
| | | | | Some structs are missing for me when running update-glib-annotations. I've kept them as is and just included theannotation updates.
* Merge branch 'flake8' into 'master'Christoph Reiter2018-08-1522-2707/+33
|\ | | | | | | | | tests: depend on flake8 instead of including pep8/pyflakes See merge request GNOME/gobject-introspection!58
| * ci: always pass --count to flake8 to get more verbose outputChristoph Reiter2018-08-153-4/+4
| | | | | | | | | | This prints the error count to stderr, and more importantly 0 when everything is OK so we know it did something.
| * tests: depend on flake8 instead of including pep8/pyflakesChristoph Reiter2018-08-1522-2707/+33
|/ | | | | | | | | | | | | | | | g-i includes an old version of pep8 and pyflakes and uses that during "make check". It (1) doesn't catch all cases newer versions of pycodestyle/pyflakes catch and (2) doesn't test all Python files (3) doesn't work with meson. Instead of updating just remove them and depend on flake8 instead. To run the checks simply run flake8 in the root dir. This also makes it possible to run those checks when using meson and not autotools. To not get test suite failures on flake8 updates move the checks from "make check" to an extra "make check.quality" target.
* Merge branch 'devdocs-format-rebase-v2' into 'master'Christoph Reiter2018-08-1423-22/+955
|\ | | | | | | | | Add DevDocs formatting for GJS See merge request GNOME/gobject-introspection!57
| * Fix format/format_inline distinction.rockon9992018-08-132-8/+7
| | | | | | | | - Fix autopep8 errors.
| * Improve markdown compatibility of docwriter.rockon9992018-08-081-13/+80
| |
| * Sort index files by type.rockon9992018-08-061-7/+50
| |
| * Only output introspectable methods.rockon9992018-08-066-9/+33
| |
| * Convert FORMATS to tuple.rockon9992018-08-061-1/+1
| |
| * docwriter: Gdk.Atom as Stringmakepost2018-08-061-0/+2
| | | | | | Reflect new string/GdkAtom marshalling that improves clipboard support: https://gitlab.gnome.org/GNOME/gjs/merge_requests/29
| * docwriter: Handle unknown language MIME typesPhilip Chimento2018-08-061-3/+5
| | | | | | | | | | | | | | Add "plain" -> "text/plain" to the mapping since "plain" is used several times in the GTK documentation. But also, fix the code that falls back to no syntax highlighting for an unknown language - it did not check for KeyError.
| * docwriter: Handle invalid nodes betterPhilip Chimento2018-08-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cogl-2.0.gir has the following entry: <bitfield name="BufferMapHint" version="1.4" stability="Unstable" c:type="CoglBufferMapHint"> <doc xml:whitespace="preserve">...</doc> <member name="" value="1" c:identifier="COGL_BUFFER_MAP_HINT_DISCARD"> <doc xml:whitespace="preserve">...</doc> </member> <member name="_range" value="2" c:identifier="COGL_BUFFER_MAP_HINT_DISCARD_RANGE"> <doc xml:whitespace="preserve">...</doc> </member> </bitfield> The prefix is not picked up correctly and so we get a member without a name, which crashes the docwriter in to_underscore(). Change that function to handle this case by giving it a dummy "anonymous member" name.
| * devdocs: Distinguish between versioning notesPhilip Chimento2018-08-061-3/+3
| | | | | | | | | | | | Previously, Since:, Deprecated:, and Stability: annotations were all given the same CSS class. In order to style them differently, we give them different classes.
| * devdocs: Mention when a function throws an errorPhilip Chimento2018-08-061-0/+4
| | | | | | | | | | This uses the "throws" annotation in the generated docs, adding a "Throws exception: Yes" if the annotation is present.
| * devdocs: Format in and out parameters correctlyPhilip Chimento2018-08-061-7/+20
| | | | | | | | | | | | | | | | Previously the functions template did not properly use formatter.get_in_parameters() and formatter.get_out_parameters(), so we had inaccurate function arguments in the documentation. In particular, I originally didn't take functions with multiple return values into account.
| * devdocs: Fix links to enum membersPhilip Chimento2018-08-061-1/+4
| | | | | | | | | | | | Links to enum members, e.g. GLib.MyEnum.FOO, were previously formatted as GLib.MyEnum.foo, so we add this special case for nodes that are ast.Members.
| * devdocs: Describe aliases more thoroughlyPhilip Chimento2018-08-061-0/+16
| | | | | | | | For aliases we add a description of what Javascript type they map to.
| * devdocs: Add extra CSS class to default.tmplPhilip Chimento2018-08-062-1/+11
| | | | | | | | | | | | | | | | We add an extra CSS class to default.tmpl to indicate what kind of AST node is represented here (e.g., ast.Constant). This should properly belong in get_node_kind() in docwriter.py, but adding extra kinds there would affect the way that all the other documentation output formats are generated.
| * devdocs: Mark links to other GIRs as suchPhilip Chimento2018-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | DevDocs will try to normalize links relative to the current documentation if it can, and strips ../ off the front, so e.g. a link on the gio20/gio.file page to ../gobject20/gobject.object will end up resolving to http://<host>/gio20/gobject20/gobject.object, which doesn't exist. We clearly mark links to other GIRs with a gir:// URL scheme that DevDocs won't process automatically, and then fill in the links ourselves in the DevDocs scraper.
| * devdocs: Match DevDocs' slug namesPhilip Chimento2018-08-061-2/+3
| | | | | | | | | | | | Because of some Ruby naming rules in DevDocs, other GIR modules will have their documentation in ../namespace10/ instead of ../NameSpace-1.0/, so change format_external_xref() to match this.
| * devdocs: Describe bare functionsPhilip Chimento2018-08-061-0/+2
| | | | | | | | | | Pages for bare functions (not in a class) were missing descriptions of their arguments and return values.
| * devdocs: Format the values of constantsPhilip Chimento2018-08-062-3/+18
| | | | | | | | | | | | | | We change the style of documentation pages for constants, so that their values are displayed in a <dt>/<dd> pair. We add a new method to the formatter family, format_value() which should print the representation of a constant's value in the target language; much like repr() in Python.
| * docwriter: Handle moved_to in underscore functionPhilip Chimento2018-08-061-0/+2
| | | | | | | | | | This function was failing on g_iconv() which has a blank name in the GIR file (its name instead coming from the moved-to attribute.)
| * devdocs: Add deprecated CSS class where neededPhilip Chimento2018-08-066-20/+38
| | | | | | | | | | | | | | | | | | | | This adds a def in _doc.tmpl that expands to "deprecated" if the node is deprecated, and to nothing otherwise. We use it to give the deprecated CSS class to particular elements. The presence of the class on a symbol's main entry will inform DevDocs that the symbol is deprecated, though it won't be formatted in a particular way. The presence of the class on an index entry will cause the index entry to be struck out, so that it's visually obvious in the index when a symbol is deprecated.
| * devdocs: Generate versioning notesPhilip Chimento2018-08-067-6/+37
| | | | | | | | | | | | | | For GIR nodes with version annotations, such as "Since:", "Deprecated:", and "Stability:", we generate stability notes at the top of each node's documentation. These notes are given the CSS class "versioning-note" so that we can format them nicely in DevDocs.
| * devdocs: Don't render private fieldsPhilip Chimento2018-08-062-4/+53
| | | | | | | | | | | | | | | | Skip private fields such as "priv" and "parent_instance". Unfortunately not all private structure and parent instance fields are marked private, and not all of them are named "priv" or "parent_instance". This also includes fields that are contained within anonymous unions.
| * docwriter: Use <pre> for code blocksPhilip Chimento2018-08-061-5/+19
| | | | | | | | | | | | | | | | | | | | | | Code blocks, i.e. |[ ]|, were converted into <code> elements, but <pre> would be more appropriate. In addition, add four spaces to the start of each line in a <pre> element so that Markdown will recognize it as code and not mangle it. As explained in a FIXME comment, a better solution would be to reimplement DocstringScanner using Markdown extensions so that such confusion becomes impossible.
| * devdocs: Render a summary at the top of each pagePhilip Chimento2018-08-064-1/+176
| | | | | | | | | | | | This summary, heavily inspired by the one from pgi-docs, is useful when browsing the page rather than searching for a specific term. It's also similar to the summary at the top of gtk-doc pages.
| * doctool: Output formatter for DevDocsPhilip Chimento2018-08-0619-5/+359
| | | | | | | | | | | | | | In order to generate HTML output that DevDocs can easily scrape and display, we add a new output format to g-ir-doc-tool (--format=devdocs). It works similarly to the Mallard output format, but generates very simple HTML instead. We add a new set of Mako templates to generate this output.
| * docwriter: parse markdown for code blocks.Mathieu Duponchelle2018-08-061-5/+65
| | | | | | | | | | | | | | | | | | This also removes some "parsing" code for paragraphs, which is best handled by the actual scanner. + Also fixes some pep8 issues. https://bugzilla.gnome.org/show_bug.cgi?id=745298
| * docwriter: Add support for plural type references.Mathieu Duponchelle2018-08-061-11/+25
| |
| * transformer: Strip whitespace from filter commandsPhilip Chimento2018-08-061-0/+1
| | | | | | | | | | | | | | | | On OS X, the output of sed as reported back to Python has a newline at the end. It seems like a good idea to strip whitespace from the symbol and identifier filter commands anyhow, so strip() the result. https://bugzilla.gnome.org/show_bug.cgi?id=752468
| * docwriter: Option to select output formatPhilip Chimento2018-08-062-0/+4
| | | | | | | | | | | | | | | | | | For generating other output formats such as DevDocs-ready HTML, we add an output format option (-f). The default output format is "mallard" which leaves the existing behaviour unchanged. We can fold the existing --write-sections-file option into the new output format option, as a new "sections" format.
* | regress: implement the getter/setter for the new byte-array property.Christoph Reiter2018-08-115-0/+42
| | | | | | | | | | It was added as part of !25 but without any implementation. This made instantiating TestObject fail which we do in the pygobject test suite.
* | utils: fix undefined cdir variableChristoph Reiter2018-08-111-0/+3
| | | | | | | | | | The docstring states that makedirs() was ported from python3, but this code part was missing. Found with newer pyflakes.
* | Add the generated _version.py to .gitignoreChristoph Reiter2018-08-111-0/+2
| |
* | MSVC.README.rst: Fix previous updateChun-wei Fan2018-08-111-1/+1
| | | | | | | | | | | | The default Cairo-GObject DLL filename should be for MinGW/mingw-w64 builds, not Visual Studio builds, hence the likely need to use the -Dcairo-libname option for MSVC builds... doh.
* | MSVC.README.rst: Mention about the config optionsChun-wei Fan2018-08-111-1/+9
| | | | | | | | | | Mention about the configuration options cairo-libname and python as they are likely necessary for G-I to be built and used successfully.
* | Update the NEWS for 2.581.57.2Emmanuele Bassi2018-08-061-0/+33
|/
* gir: Update annotations from glib git masterRico Tzschichholz2018-08-032-11/+11
|
* girnode: remove wrongly added g_assert_not_reached(). Fixes #218Christoph Reiter2018-08-031-1/+1
| | | | | Added in 9535fc48. After the switch it calls _g_ir_node_build_typelib() again handling the other types.
* Merge branch 'warn-flags' into 'master'Christoph Reiter2018-08-0230-102/+150
|\ | | | | | | | | autotools: add various compiler warning flags and enable -Werror for CI See merge request GNOME/gobject-introspection!56
| * girepository: port from g_type_class_add_private() to G_ADD_PRIVATE()Christoph Reiter2018-07-302-7/+2
| | | | | | | | This lets us enable -Wdeprecated-declarations