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

Improve docs #27

Merged
merged 31 commits into from
Dec 13, 2015
Merged

Improve docs #27

merged 31 commits into from
Dec 13, 2015

Conversation

scottclowe
Copy link
Contributor

I was trying and failing to get a regex;(regex-pattern) mapping key to work in my schema, so I had a look at the documentation and tried the regex;(regex-pattern) example on its own, and that didn't work either. So I decided to fix the documentation to have a working example here.

When doing this I got a little carried away and started making other improvements to the documentation, including some spelling and grammar corrections, and changes to the ordering of sections in the Validation Rules file.

Hope this is all okay!

@Grokzen
Copy link
Owner

Grokzen commented Oct 5, 2015

LGTM :]

If you want before i merge this, you can add yourself to docs/Authors.md under the Documentation group (I think you have to make that group in that file). Also please add a line in ReleaseNotes.rst under a new section Next Release with short line describing the change. Something like improved documentation (scottclowe) Or something similar.

I will probably not make a new release right away after merging this and wait for some code change from elsewhere before doing it.

@scottclowe
Copy link
Contributor Author

Okay, done.

I made a new Documentation group and put you and me in it. :)

@scottclowe
Copy link
Contributor Author

Don't merge just yet.
I'm going to add a couple of examples to the matching-rule section, which doesn't have any yet.

@Grokzen
Copy link
Owner

Grokzen commented Oct 6, 2015

@scottclowe Ok, i will wait some, just ping when you feel it is ready to merge

@scottclowe
Copy link
Contributor Author

Sorry for the delay with the documentation. I did not have time to look at it for the last couple of weeks.

I am looking at it now and I was trying to understand what matching='*' was supposed to do, but I it doesn't seem to do what I expected. In fact, I think it is broken.

This succeeds:

# Data
- 55
# Schema
type: seq
matching: "*"
seq:
    - type: int
      range:
        min: 0
        max: 20

This breaks due to unspecified type in the subrule:

# Data
- 55
# Schema
type: seq
matching: "*"
seq:
    - range:
        min: 0
        max: 20

Can you explain what it is supposed to do?

@scottclowe
Copy link
Contributor Author

Ping @Grokzen

@@ -1,17 +1,15 @@
# Implemented validation rules
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottclowe What is the main reason to change from the markdown way of creating headings to use the rst way of creating headings? Also that you have mixed heading types inside the document, both md and rst O.o

I would prefer to stick with markdown as it works the best on github. Or do you have some other reason in mind?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The underline styles are all Markdown, not mixed.

They do not mention it in the GitHub Markdown Basics, but they do in the
official Markdown docs basics and detailed, and in this handy GitHub-centric cheat sheet.

You can see it renders correctly here.

If you prefer the atx-style headings with all #, I can swap them to that. The motivation was it made it a lot easier for me to tell the depth of the content when editing the unparsed .md file. I find the difference between ----------------- and ### is much more striking between ## and ###. But I am happy to change them back for internal consistency if you prefer that.

@Grokzen
Copy link
Owner

Grokzen commented Dec 9, 2015

Good links there. I allways assumed that the atx-style was the only one that was valid in markdown and that the ------- layout was RST specific and that you had to choose either MD or RST here on github. Another thing i have allways gone with is that most other projects that have some kind of readme that i have seen is using the atx-style syntax for .md files.

I do would like to change back to atx-style because of a few reasons. I saw that it renders properly and that is not really the problem. The main thing i like is the consistency across all MD files in the docs to use the same syntax. If that syntax would be MD or RST is not a big issue as long as there is some chosen standard.

However, one thing worth mention is that i have had plans on moving all this docs to a proper readthedocs page and i do think that those pages is done with RST so the pages will be rewritten to RST in the future anyway :]

If you change the heading i will merge it after that as it LGTM :]

The example given is an incomplete copy of a test case
tests/files/success/16s.yaml
but because the schema is incomplete and the data section is
complete, this breaks the test case. Consequently the example
code did not work.

I have fixed this by removing the leftover entry in Data so the
example Data is compliant with the existing Schema.
The example for regex key name matching is now more concise
to make the example clearer.
Only in the first few sections of text.
Move timestamps so it is a subsection of Types
Move all the seq and map only constraints so they are grouped
together at the bottom of the constraints section.
For consistency with matching-rule.
This will make it easier for new users to understand that the
schema does not need to go in the same file as the data, but
goes in a different file.
Previously had a schema section and no data.
Listed @Grokzen and @scottclowe in the Documentation section.
It doesn't make sense to introduce matching-rule before regex.
Now `True` and `False` everytime.
The "Important notes on version schema changes" section in
`README.md` was referenced in `ReleaseNotes.rst`, but has since
been removed from `README.md`. I have added the text back in the
place where the reference was, for posterity.
scottclowe and others added 9 commits December 12, 2015 20:56
- Make two map type definiton styles clearer
- Mention map specific constraints in the description of map type
- Emphasise that map keys are assumed to be optional and not required, as might
  be assumed.
Make the constraint (vs rule) terminology match the original
kwalify.
- Add an example
- Improve description
and not have a colon after them either, since they are headings.
@scottclowe
Copy link
Contributor Author

Fixed the headings so they are all # style now.

@Grokzen
Copy link
Owner

Grokzen commented Dec 13, 2015

Many thanks for this great work @scottclowe :]

Grokzen added a commit that referenced this pull request Dec 13, 2015
@Grokzen Grokzen merged commit dc2e8c6 into Grokzen:unstable Dec 13, 2015
@scottclowe scottclowe deleted the improve-docs branch February 18, 2016 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants