0
0
Fork 0
Commit Graph

336 Commits

Author SHA1 Message Date
Travis Ralston 9e0fafbcd4 Remove debugging line 2018-07-10 15:13:22 -06:00
Travis Ralston 3a9cfd490f
Improve pagination handling in proposals.py
Previously if multiple pages were returned then the script would lose the results. 

A check to ensure the response is an array was also added. This helps avoid somewhat cryptic errors when iterating over non-lists (eg: error messages, bad output, etc)
2018-07-09 23:52:22 -06:00
Travis Ralston 550f95570b Fix regex for some versions of python 2018-07-09 15:17:43 -06:00
Travis Ralston 7ada960206 Fix the Travis CI build to work on 3.5 2018-07-09 14:55:25 -06:00
Travis Ralston 08f6912825 Ask Travis to install 3.5 explicitly 2018-07-09 12:13:58 -06:00
Travis Ralston a4f8e0807a Print the python version being used in the CI build. 2018-07-09 08:41:20 -06:00
Travis Ralston 63b926a4aa Make Travis CI use python 3 2018-07-06 17:19:04 -06:00
Travis Ralston c2f85788de Add documentation about how to add to the changelog 2018-07-06 16:54:14 -06:00
Travis Ralston 9277e4c52d Add initial towncrier support 2018-07-06 16:32:27 -06:00
Travis Ralston f54d5a4039 Convert build scripts to python 3 2018-07-06 15:21:07 -06:00
Travis Ralston 1722734a51
Merge pull request #1364 from turt2live/travis/server-name-join
Document the server_name query parameter on /join/{roomIdOrAlias}
2018-07-06 07:00:24 -06:00
Richard van der Hoff f9a0a49e96 Add a bunch more people to the speculator trusted list 2018-07-05 20:27:40 +01:00
Travis Ralston 4485b2f025
Merge branch 'master' into travis/server-name-join 2018-07-05 11:23:13 -06:00
Travis Ralston 8bd1fe9908
Merge pull request #1357 from turt2live/travis/fix-windows
Use filepath.To/FromSlash instead of manually replacing slashes
2018-07-04 08:09:43 -06:00
Matthew Hodgson d02e9b875b
Merge pull request #1355 from matrix-org/benpa/travisci-ignore-proposals
don't run proposals.py step if in TravisCI environment
2018-07-04 00:04:25 +01:00
Travis Ralston cbbdcbcf01 Show arrays in the query string as "[type]" rather than "array"
Otherwise the question "array of what?" is raised.
2018-07-03 15:50:01 -06:00
Travis Ralston aac7b848f7 Add uhoreg and myself as trusted speculator people 2018-07-03 13:10:28 -06:00
Hubert Chathi a2e0d0382c ignore emacs temporary files
and fix ignoring of dotfiles
2018-07-03 14:10:22 -04:00
Travis Ralston 85e1962f9c Use filepath.To/FromSlash instead of manually replacing slashes
see https://github.com/matrix-org/matrix-doc/pull/1356#discussion_r199897557
2018-07-03 12:07:31 -06:00
Travis Ralston eb21a71b70 Make the builder happier with Windows environments
There's two main issues with Windows environments:
* Slashes
* Windows still notifies about some directories we've ignored, therefore we need to filter them too

It's not super pretty, but it does work.
2018-07-03 10:49:55 -06:00
Ben Parsons 5803c9cace don't run proposals.py step if in TravisCI environment 2018-07-03 15:49:40 +01:00
Ben Parsons e52d94bea9 ignore malformed PR items 2018-06-25 15:00:58 +01:00
user 5ab5fe08d1 Small grammatical and stylistic fixes 2018-06-17 15:49:39 +01:00
Ben Parsons 0c1ba33eba include proposals.py in matrix-doc CI 2018-06-07 14:30:50 +01:00
Ben Parsons ee98082a60 update MSC1270 2018-06-04 12:12:48 +01:00
Ben Parsons cb00fc35ab git checkout master 2018-05-31 15:54:23 +01:00
Ben Parsons d1c27349b2 Merge branch 'master' of https://github.com/matrix-org/matrix-doc 2018-05-31 15:47:34 +01:00
Richard van der Hoff 419bf1e52c Fix continuserv instructions
As per f04b17f1c9

Also dedup continuserv readme
2018-05-30 09:45:22 +01:00
Ben Parsons 7a82a5d427 correct proposals.py 2018-05-29 14:20:48 +01:00
Ben Parsons 34090b24c4 prepare proposals.py for CI 2018-05-29 14:19:03 +01:00
Ben Parsons 663e1a5ebe Update some text 2018-05-18 10:17:54 +01:00
Ben Parsons 73b28612ec updates from feedback on pull 2018-05-15 16:07:55 +01:00
Ben Parsons 4d59abebf0 handle PR links from GitHub 2018-05-15 15:33:39 +01:00
Ben Parsons d338f18927 handle EOF gracefully when searching for Authors and PRs 2018-05-15 15:22:03 +01:00
Ben Parsons f1cc26dfd7 sort output by Created date per-table 2018-05-15 11:59:34 +01:00
Ben Parsons b8f38b21a7 update introductory text 2018-05-14 14:25:12 +01:00
Ben Parsons e87f1f2619 include PRs in tables 2018-05-14 11:32:40 +01:00
Ben Parsons 3b4e56c4e0 handle dd/mm/yyyy and yyyy-mm-dd dates in text 2018-05-14 09:48:54 +01:00
Ben Parsons 3b84de383c cleanup and include all content 2018-05-12 10:30:52 +01:00
Ben Parsons cbdd33a5f5 single authors and shepherds link correctly 2018-05-11 21:23:06 +01:00
Ben Parsons 73b7faddd4 handle multiple Google Docs 2018-05-11 20:47:27 +01:00
Ben Parsons 866b0b6348 I mostly play with ascii art 2018-05-10 16:02:55 +01:00
Ben Parsons dc2b53318b prettify ID column 2018-05-09 11:32:31 +01:00
Ben Parsons a78f7b38e9 generator is now usable 2018-05-08 15:35:46 +01:00
Ben Parsons c58dc59ffe separate tables by label 2018-05-08 14:43:06 +01:00
Ben Parsons 1f7fbefd53 start using a table 2018-05-08 12:17:38 +01:00
Ben Parsons e18aa30fd2 start generating new proposals page 2018-05-02 13:47:01 +01:00
Richard van der Hoff f04b17f1c9 Fix path to fsnotify
Apparently this should be referred to as gopkg.in/fsnotify/fsnotify.v1. I'm not
sure what has changed to stop the old format working.
2018-03-27 11:27:23 +01:00
Richard van der Hoff 8e97ec8bad make the speculator work for rick 2018-03-14 17:52:10 +00:00
Richard van der Hoff 9150ba0dce Improve error output from failing to parse examples 2018-03-06 11:09:33 +00:00
Richard van der Hoff a36bd1a6d2 Make build fail if gendoc fails
(cf https://github.com/matrix-org/matrix-doc/issues/1146)
2018-03-06 11:03:52 +00:00
Richard van der Hoff 87d90ab58a gendoc: improve title line matching
This makes it possible to include tables etc without the script trying to turn
them into titles.
2017-11-22 22:44:04 +00:00
Maxime Dor 1045bc721d Document federation version endpoint 2017-11-15 04:16:30 +01:00
Richard van der Hoff 427e0bb83b make jenkins and travis use a common script 2017-11-14 19:19:58 +00:00
Richard van der Hoff 202a265d85 Config for travis-ci 2017-11-14 13:12:38 +00:00
Richard van der Hoff 0cbf533625 Use petstore for continuserv swagger docs
Matrix.org's swagger browser is behind https, which means it can't read the
swagger from a continuserv on http. Use the petstore instead.
2017-11-14 13:02:43 +00:00
Richard van der Hoff a38d4fc68e Move templating into scripts dir
There's no real need for this to be at the top level.
2017-11-08 08:37:56 +00:00
Richard van der Hoff e7772af5c3 Supporting-docs now in matrix.org repo. 2017-11-06 14:57:04 +00:00
Richard van der Hoff cc6b16b63c Generate the swagger for export
We may as well generate the unstable version of the C-S swagger.
2017-10-25 12:09:08 +01:00
Richard van der Hoff d6f892f894 continuserv, speculator: update dump-swagger call
dump-swagger now expects -o before its output path
2017-10-25 12:05:31 +01:00
Richard van der Hoff 56c3e5a627 README.rst: Add notes on how to build the spec 2017-10-25 09:57:02 +01:00
Richard van der Hoff 834a3d78a8 Add a pip requirements file for the scripts 2017-10-25 09:54:21 +01:00
Richard van der Hoff 986c9d99a0 Improve arg parsing in dump-swagger 2017-10-25 08:05:50 +01:00
Richard van der Hoff 0dfff6b190 Simplify dump_swagger
We don't need most of the templating stuff. All we have to do is merge together
the swagger files, and resolve references.
2017-09-27 08:04:24 +01:00
Richard van der Hoff 2454598926 Speculator: include API docs links for branches 2017-09-26 15:23:00 +01:00
Richard van der Hoff 13d3293378 Fix version-extraction regexp
Fixes https://github.com/matrix-org/matrix-doc/issues/982
2017-09-18 13:48:35 +01:00
Richard van der Hoff b0ea6038c6 Move jekyll back out of matrix-doc again
Having the jekyll assets here is a mistake, because they need to be versioned
separately to the spec: we keep old versions of the spec, but they sometimes
need to be restyled to match the latest website.
2017-08-03 15:49:17 +01:00
Richard van der Hoff 8a66b1a68b Build the spec as part of the build 2017-08-03 00:18:07 +01:00
Richard van der Hoff 0af06291fe Hardcode client major version r0 2017-08-02 21:58:52 +01:00
Richard van der Hoff 986e51cf35 Gendoc: allow overriding the dest dir 2017-08-02 21:48:07 +01:00
Richard van der Hoff 9d2a93ad7b Run jekyll as part of the matrix-doc build
- this saves us having to run it manually on the web server.
2017-08-02 16:20:46 +01:00
Richard van der Hoff 934dd4754c swagger-http-server: fix port param
it needs to be an int, not a list
2017-04-19 16:10:53 +01:00
Richard van der Hoff 2ec43a5948 Add continuserv index
Oops, forgot this when adding support for the API docs to continuserv in
bfb65d8.
2016-10-14 17:57:07 +01:00
Richard van der Hoff d41438605d Use matrix.org for swagger UI
In the swagger UI, default to matrix.org rather than localhost, to make the UI
more useful.
2016-10-14 17:56:26 +01:00
Richard van der Hoff bfb65d8ceb Serve the API docs with continuserv 2016-10-13 23:54:08 +01:00
Richard van der Hoff 1320a86cbe Serve the api docs from the speculator
There are a few parts to this:

* when we generate the spec for a particular git sha, also run the script which
  turns our yaml api descriptions into a swagger json file.

* tweak serveSpec to add another header when serving the generated json.

* add a link to the generated index which will (via js hackery) redirect to our
  hosted swagger UI at http://matrix.org/docs/api/client-server, with a "url"
  query-param pointing at the generated json.

Also, factor makeTempDir out of gitClone, so that we can give clearer log lines.
2016-10-03 12:36:46 +01:00
Richard van der Hoff 459f4b953d swagger-http-server: add a --port argument 2016-09-27 12:18:01 +01:00
Oddvar Lovaas 1ea836bb1b Remove howtos from build script 2016-09-21 16:22:49 +01:00
Benjamin Saunders 33d80408e0 Add a nix-shell environment suitable for building
This enables easy execution of scripts/*.py by Nix users.

Signed-off-by: Benjamin Saunders <ben.e.saunders@gmail.com>
2016-08-30 21:26:35 -07:00
Richard van der Hoff 49cd65dd58 Add a license to the spec
We're licensing hte spec under ASLv2. Add the LICENSE file, and add the
short-form to as much of the source as is practical right now (adding it to
json source is a massive pita).
2016-07-12 17:28:30 +01:00
Stas Rudakou b6c41727c5 Add PyYAML to scripts/README.md
PyYAML is a 3rd-party package used by `gendoc.py`.
2016-06-11 14:10:21 +03:00
Richard van der Hoff 8b61dab1c6 gendoc.py: add --list_targets arg
I want to be able to run all of the targets except one from matrix-doc, so make
a way to list the targets.
2016-05-09 12:12:50 +01:00
Richard van der Hoff f46a2a7f2b Include the basePath in the path in swagger output
This fixes both SPEC-393, and ORG-52.
2016-05-06 12:35:27 +01:00
Richard van der Hoff 8aa0f64665 Update the speculator to understand spec subdirs
Fix the speculator so that it doesn't blow up when it finds subdirs in the gen
directory.

(It doesn't handle the html diff very well in the case that the subdirs don't
match, but it's hard to do much about that)
2016-05-05 18:46:29 +01:00
Richard van der Hoff 01f8173c84 Put each bit of spec in its own directory
I want to change the URLs for the spec sections on the website from
<version>/<section>.html to <section>/<version>.html, to better reflect how we
do the versioning.

This puts each bit of spec in its own directory, updates the index to point to
the right place, and fixes continuserv to deal with directories as well as
files.

This will probably require fixes to the speculator too, but I'll have to come
back to that.
2016-05-05 18:26:17 +01:00
Richard van der Hoff a8eed29e9f gendoc: Allow multiple targets 2016-05-05 16:49:10 +01:00
Richard van der Hoff 7138205f31 Update README.md
escape angle-bracket to stop it getting lost in markdown
2016-05-04 01:08:50 +01:00
Richard van der Hoff 0546f0917d Replace hacky shell to do matrix styling with hacky perl
Since the shell just wrapped three invocations of perl, we might as well do
it all in perl.
2016-05-04 00:01:54 +01:00
Richard van der Hoff 23c4ffbc1b Add securityDefintions to generated swagger JSON
Also factor out to a common file
2016-05-03 13:57:16 +01:00
Richard van der Hoff 60f36bf868 Script to serve the generated swagger JSON
We need custom CORS headers to serve the swagger JSON, so add a script to do it
2016-05-03 12:04:44 +01:00
Richard van der Hoff c39d797cce Dump-swagger: take output file name rather than output dir
Make the argument to dump-swagger.py be the name of the output file rather than
the output dir, and give it a sensible default.

Also, use the absolute path to the output file, so that the output path is
relative to the user's cwd rather than the templating dir.
2016-05-03 12:03:21 +01:00
Richard van der Hoff d6c1d1343b Continuserv: Reduce number of watches
rather than trying to watch half the filesystem, be a bit more conservative in
what we put watches on. This means that we don't end up dying with "No space on
device" (thanks for that, Linux.)
2016-04-11 23:21:21 +01:00
Daniel Wagner-Hall 072d285153 speculator: Allow access token to be specified 2016-02-15 14:48:26 +00:00
Richard van der Hoff 1f6c4d5bb2 Speed up gendoc.py by only running build.py once 2016-01-08 00:40:03 +00:00
Daniel Wagner-Hall aaeaa1dd98 Detect major version in presence of patch release 2015-12-09 15:56:58 +00:00
Daniel Wagner-Hall ad7874a730 Use site-relative stylesheet 2015-12-09 14:35:25 +00:00
Daniel Wagner-Hall 60127de1e3 Take list of files to edit as args 2015-12-09 13:50:15 +00:00
Daniel Wagner-Hall a9b4f6fef0 Add missing _ to paths 2015-12-08 15:39:32 +00:00
Daniel Wagner-Hall db5cad4711 Remove accidentally committed change 2015-12-07 15:16:06 +00:00
Daniel Wagner-Hall 99b8a066c8 Make dump-swagger work from all directories 2015-12-07 14:40:42 +00:00
Daniel Wagner-Hall 1f5b6271f2 Generate swagger-ui output for client-server API
Depends on:
https://github.com/matrix-org/matrix-doc/pull/212
https://github.com/matrix-org/matrix-doc/pull/208
https://github.com/matrix-org/matrix-doc/pull/207
for the actual rendered output to not throw javascript errors at runtime.
2015-12-07 12:45:13 +00:00
Richard van der Hoff d1d3d27e2f Merge pull request #216 from matrix-org/rav/fix_speculator_redirects
Add a host and scheme to Location headers in redirects
2015-12-07 10:26:38 +00:00
Richard van der Hoff f31a053995 Add a host and scheme to Location headers in redirects
Our apache reverse-proxy can't correctly rewrite relative Location headers, so
add the Host from the request into the Location.
2015-12-06 18:26:56 +00:00
Matthew Hodgson 78e04d662e add moi :( 2015-12-04 18:32:01 +00:00
Richard van der Hoff 1b7548d460 Make the speculator serve the spec from drafts branches. 2015-12-04 17:03:33 +00:00
Daniel Wagner-Hall 2f3a00fe34 Consistently spell homeserver as homeserver 2015-12-02 19:23:33 +00:00
Daniel Wagner-Hall 1ce3357927 continuserv: serve multiple paths 2015-12-02 14:57:28 +00:00
Daniel Wagner-Hall 97fd1fdd62 Embed client and server release numbers
Note that this also removes the changelog - I'm going to re-add the
changelog differently soon.
2015-12-01 17:08:02 +00:00
Daniel Wagner-Hall ebed3b60bd Add trailing slashes to links 2015-12-01 15:58:15 +00:00
Daniel Wagner-Hall a4668c1d8c Fix typo 2015-12-01 14:21:20 +00:00
Daniel Wagner-Hall c4eaf7458f 302 to spec/head/index.html rather than serving it on /spec/head
Otherwise relative links are broken
2015-12-01 14:19:31 +00:00
Daniel Wagner-Hall 6c66bfc755 Flatten out v1 and v2_alpha directories
As a side effect, I got rid of all of the horrible symlinks and just put
in all of the proper relative paths. Because the horrible symlinks were
horrible.
2015-11-30 11:22:57 +00:00
Daniel Wagner-Hall e401d3e262 Merge pull request #184 from matrix-org/daniel/splitspec
Split spec into page-per-section
2015-11-27 16:46:06 +00:00
Daniel Wagner-Hall 30ed918633 speculator: Allow spec viewing for multi-page spec 2015-11-27 16:45:53 +00:00
Daniel Wagner-Hall e171acf01f Split spec into page-per-section 2015-11-27 16:45:47 +00:00
Daniel Wagner-Hall f0c99a6925 Generate API docs from swagger 2015-11-27 15:03:22 +00:00
Richard van der Hoff 2aa4773cc1 Make the speculator serve up errors as plain text
... so that they are legible.
2015-11-27 12:01:03 +00:00
Daniel Wagner-Hall ec31c0f518 speculator: allow styling like matrix.org 2015-11-26 12:04:37 +00:00
Daniel Wagner-Hall cc4869e68a Merge pull request #174 from matrix-org/daniel/speculatorhardening
Several improvements to speculator to prepare it for actually being used by the masses, not just us devs
2015-11-23 18:35:55 +00:00
Daniel Wagner-Hall c432396079 Add comment 2015-11-23 17:26:32 +00:00
Daniel Wagner-Hall 866fa58276 Rename 2015-11-23 17:22:53 +00:00
Daniel Wagner-Hall e045f28b44 Pull out constant for permissions
Also, drop permissions from 0755 to 0700
2015-11-23 17:20:54 +00:00
Oddvar Lovaas 24356d864e Merge pull request #176 from matrix-org/daniel/gendoc
Tweaks to spec generation for matrix.org
2015-11-23 10:28:51 +00:00
Daniel Wagner-Hall 4ac85997f5 Fix check 2015-11-19 18:16:02 -05:00
Daniel Wagner-Hall da93317a78 Take dir not files as args 2015-11-19 18:13:40 -05:00
Daniel Wagner-Hall ca3a9e3562 exec gendoc outside of script 2015-11-19 17:38:54 -05:00
Daniel Wagner-Hall e041033048 Rename file 2015-11-19 17:38:49 -05:00
Daniel Wagner-Hall 8586744771 Add anchors to spec
This is currently done by a script on the prod serving machine.

We might as well keep the matrix.org spec and dev spec as similar as
possible.
2015-11-19 16:41:58 -05:00
Daniel Wagner-Hall 6f1d00097b Only bother trying to fetch if we need to 2015-11-19 16:15:13 -05:00
Daniel Wagner-Hall 8872e17f93 Fall back to last known HEAD sha if fetch fails 2015-11-19 16:14:22 -05:00
Daniel Wagner-Hall dd53847211 Include command stderr in error text 2015-11-19 16:11:19 -05:00
Daniel Wagner-Hall 9ad64b02d1 speculator: guard against concurrent git commands 2015-11-19 15:41:15 -05:00
Daniel Wagner-Hall 0f0359d9c1 speculator: Nessle up some more if statements 2015-11-11 15:13:34 +00:00
Daniel Wagner-Hall 740cc66a7c speculator: Fetch before deciding head is fresh 2015-11-11 14:01:45 +00:00
Daniel Wagner-Hall 27ffe7bacd Don't serve rst diffs as HTML 2015-11-10 15:35:10 +00:00
Daniel Wagner-Hall c3608b3a69 Merge branch 'master' into daniel/continuservconcurrency
Conflicts:
	scripts/continuserv/main.go
2015-11-09 16:11:34 +00:00
Daniel Wagner-Hall bbf9e229a7 continuserv: guard concurrent accesses to wg 2015-11-06 16:09:09 +00:00
Daniel Wagner-Hall 1be5b856bd Preserve text/plain for errors
Newlines are nice
2015-11-06 16:05:07 +00:00
Daniel Wagner-Hall 7f6eafdce5 continuserv: set Content-Type header 2015-11-06 14:46:55 +00:00
Daniel Wagner-Hall 937ff046d8 Force / to be HTML too 2015-11-05 19:21:16 +00:00
Daniel Wagner-Hall 559747e77a speculator: Sent Content-Type: text/html header
Go is auto-detecting that this is XML (because for some reason we
generate XHTML), and serving it with a Content-Type header text/xml.

This causes the browser to render it as XHTML, which gives interesting
quirks like extra newlines.

This forces the browser to interpret it as HTML.

What we should probably do instead of stop generating XHTML and start
generating HTML. But in the mean time, this will fix the rendering
issues.
2015-11-05 19:18:28 +00:00
Mark Haines 71874870c8 Enable syntax highlighting for example http requests 2015-10-26 17:25:33 +00:00
Daniel Wagner-Hall 1aeddac319 Cache spec output
Does not cache inability to generate spec. Does not cache diffs or
anything fancy. Just the raw spec generation.
2015-10-26 10:28:14 +00:00
Mark Haines df443c10ac Move css into a css subdirectory.
Add css to put a bar next to blockquotes.
2015-10-23 11:58:06 +01:00
Daniel Wagner-Hall 82d4ea199f Trust Leo 2015-10-22 16:09:01 +01:00
Kegsay e5559e4ea5 Merge pull request #106 from matrix-org/erikj/newline_gendoc_STOP_BEING_CRANKY
gendoc should just add newlines rather than complaining about the lack thereof
2015-10-15 09:56:04 +01:00
Erik Johnston 70704240dc gendoc should just add newlines rather than complaining about the lack thereof 2015-10-14 16:29:18 +01:00
Richard van der Hoff 013b6db895 Add a note on building the speculator
... because the wiki says you need to read the README on how to build it.
2015-10-14 14:42:52 +01:00
Richard van der Hoff 270e1d7aa8 Add richvdh to list of trusted pushers for spectulator
richvdh is awesome, he should have all the permissions.
2015-10-14 14:29:36 +01:00
Oddvar Lovaas 1cfe4f784f special css for spec/howto 2015-10-12 19:57:41 +01:00