Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicating Bikeshed metadata #23

Closed
domenic opened this issue Mar 29, 2017 · 6 comments
Closed

Deduplicating Bikeshed metadata #23

domenic opened this issue Mar 29, 2017 · 6 comments
Assignees

Comments

@domenic
Copy link
Member

domenic commented Mar 29, 2017

Here is my vision:

Group: WHATWG
Title: Streams Standard
H1: Streams
Shortname: streams
Text Macro: TWITTER streamsstandard
Abstract: ...

I would like this to generate the following additional metadata:

Repository: whatwg/streams
Status: LS
Boilerplate: omit conformance, omit feedback-header
No Editor: true
Logo: https://resources.whatwg.org/logo-streams.svg
!Participate: <a href="https://github.com/whatwg/streams">GitHub whatwg/streams</a> (<a href="https://github.com/whatwg/streams/issues/new">new issue</a>, <a href="https://github.com/whatwg/streams/issues">open issues</a>)
!Participate: <a href="https://wiki.whatwg.org/wiki/IRC">IRC: #whatwg on Freenode</a>
!Commits: <a href="https://github.com/whatwg/streams/commits">GitHub whatwg/streams/commits</a>
!Commits: [SNAPSHOT-LINK]
!Commits: <a href="https://twitter.com/streamsstandard">@streamsstandard</a>
!Tests: <a href="https://github.com/w3c/web-platform-tests/tree/master/streams">web-platform-tests streams/</a> (<a href="https://github.com/w3c/web-platform-tests/labels/streams">ongoing work</a>)

Almost all of this is inferred from the shortname.

Is that possible, @tabatkins? By editing defaults.include? The shortname substitution and the macro interaction I'm particularly unsure about.

@tabatkins
Copy link

I don't currently have a way to generate metadata from other metadata. (Metadata processing is the very first thing that happens, before anything else.) But this sounds interesting!

Most likely it would have to be more complex than just dumb string substitution, which makes me lean towards adding a new Python hook for this.

@domenic
Copy link
Member Author

domenic commented Jul 14, 2017

OK, this seems to have worked pretty well; I finally got around to trying it. Here are the minor issues:

Regarding speced/bikeshed#1058 and the above tests issue, here's one idea: You have to explicitly place your computed metadata. So e.g. my example from the OP would become

Group: WHATWG
Title: Streams Standard
H1: Streams
Shortname: streams
Text Macro: TWITTER streamsstandard
Abstract: ...
Computed Metadata Here: !Participate, !Commits, !Tests
!Demos: ...
!Translation (non-normative): ...

(Then, MIME Sniffing would do Computed Metadata Here: !Participate, !Commits)

I'm not sure that's the best solution, as it does add boilerplate to the spec (which the whole point of this issue is to avoid), but it definitely adds flexibility...

In general the conflation between metadata and headers is starting to feel a bit strange to me.

@annevk
Copy link
Member

annevk commented Jul 15, 2017

If we get a Python hook it should be easy to have some "has legacy issues" metadata in the input and generate the correct output.

domenic added a commit to whatwg/url that referenced this issue Dec 18, 2017
See https://blog.whatwg.org/copyright-license-change for the former and
whatwg/meta#23 plus
speced/bikeshed#1155 for the latter. The new
boilerplate includes the new copyright license, so this commit just
removes it from the source file, as it does many other things that are
now deduplicated into the Bikeshed boilerplate.
@domenic domenic self-assigned this Dec 19, 2017
@domenic
Copy link
Member Author

domenic commented Dec 19, 2017

This is in progress and seems to be working really nicely in whatwg/url#360 + speced/bikeshed#1155.

My plan was just to update the existing WHATWG boilerplate in place then do a ton of pull requests all at once to all specs.

However we're somewhat blocked on whatwg/sg#51 (which is a non-technical issue).

@domenic
Copy link
Member Author

domenic commented Jan 5, 2018

This has largely been done! whatwg/encoding#132 is the lone holdout, but we can track that there. It's lovely! Thanks @tabatkins for being responsive to the small bugs I found as I finalized things.

@tabatkins
Copy link

I'm rather impressed at how minimal you were able to get the per-spec metadata!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants