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

Ignore docs/ directory #373

Closed
wants to merge 1 commit into from
Closed

Ignore docs/ directory #373

wants to merge 1 commit into from

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Sep 8, 2017

Not sure if (m)any modules have a doc directory; also not sure whether we'd check in docs generated by puppet strings, or whether we want to ignore these. If we do want to ignore them, this PR will accomplish that.

@wyardley
Copy link
Contributor Author

wyardley commented Sep 8, 2017

FWIW, checked with @HAIL9000 and she said that the generated docs shouldn't be committed. however, there could be modules that have a doc dir.

Currently, puppet-r10k seems to be the only modulesynced module that has a doc/ directory.

@bastelfreak
Copy link
Member

Hi,
the selinux, mumble and autofs modules have a doc/ directory which contains the puppet-strings documentation. We want to publish them as github pages (which already works). Why shoudn't autogenerated docs be committed? Any other idea to publish them?

@ekohl
Copy link
Member

ekohl commented Sep 9, 2017

@bastelfreak generated files do not belong in git. It goes out of date or you get very ugly commits that change irrelevant files. It's also a great source of merge conflicts.

As for an idea to publish them: aren't github pages served from the gh-pages branch? I'd be fine with some hooks that autogenerate that branch but adding them and referring to http://www.puppetmodule.info/ sounds like a better idea.

@wyardley
Copy link
Contributor Author

wyardley commented Sep 9, 2017

@bastelfreak It's docs/, whereas my original PR (incorrectly) had doc/. I do think that some sort of process that automatically generates them to http://www.puppetmodule.info/ (or a Github page) is the best bet.

@bastelfreak
Copy link
Member

bastelfreak commented Sep 9, 2017

what about a travis hook thingy that regenerates and pushes the docs after each merge? I really love the work @domcleal put into http://www.puppetmodule.info/ and I would like to see more of our modules documented there - but also keep the docs in the module (which makes them automatically accessible via our website)

@wyardley wyardley changed the title Ignore doc/ directory Ignore docs/ directory Sep 9, 2017
@ekohl
Copy link
Member

ekohl commented Sep 10, 2017

You could add a badge like we do on https://github.com/Katello/puppet-pulp (and should do for other modules).

@bastelfreak
Copy link
Member

I'm against merging this. I think it is really nice to have all documentation for the modules easily available like:

I would like to have this official and link to those docs at our landing page.

IMO instead of merging this we should improve the generation of those docs, maybe via a github hook at each PR or via travis. And in addition publish to http://www.puppetmodule.info/

@ekohl
Copy link
Member

ekohl commented Sep 18, 2017

@bastelfreak I don't see how they have to be in the git repo to be available on those URLs.

@bastelfreak
Copy link
Member

Do you have any other idea to place them there?

@wyardley
Copy link
Contributor Author

FWIW, re: http://www.puppetmodule.info/, I don't think we have to publish, it seems to magically pull YARD docs, whether generated by strings or not. And I think once added there once, it should check that the docs are up to date when someone requests them?

What about the idea of using the gh-pages branch?

Presumably, Forge could display strings docs inline at some point as well.

@ekohl
Copy link
Member

ekohl commented Sep 18, 2017

Do you have any other idea to place them there?

On some local filesystem? I consider them caches and you don't commit caches to git.

@dhollinger
Copy link
Member

Can travis commit to a github-pages branch or repo?

This is what we're doing with internal module docs at work (though with Gitlab), we have a CI job that builds and deploys the docs to a URL.... no gh-pages branch, no docs dir in the repo

@ekohl
Copy link
Member

ekohl commented Sep 19, 2017

@dhollinger that's what I suggested in #373 (comment) so that'd work for me.

@wyardley
Copy link
Contributor Author

The gh-pages approach sounds like a very reasonable approach to me, if it will work.

@vinzent
Copy link
Contributor

vinzent commented Sep 19, 2017

every github repo has some option to set what to serve as github pages. an option is to have docs/ which we have choosen back then.

another option is to have a dedicated branch - gh-pages IMHO

puppetmodule.info IMHO compiles the pages itself with puppet strings.

@wyardley
Copy link
Contributor Author

I think a separate branch would be preferable to docs subdir, for the reasons mentioned by others, mostly dealing with the history, diffs between tags, etc.
If it's in a separate branch, I think it would be practical to have each merge rebuild as part of the Travis task, and then push to that branch, so that the docs branch would be kept up-to-date with master.

If we tag in the gh-pages branch with each release, presumably it would be possible to view docs for each version of a release still, right?

@ekohl
Copy link
Member

ekohl commented Sep 19, 2017

puppetmodule.info IMHO compiles the pages itself with puppet strings.

https://github.com/domcleal/puppetmodule.info does use puppet strings indeed.

@millerjl1701
Copy link

FWIW, having the docs folder in the repository lowers the cost of entry to using the module. Puppet strings being all new and shiny creates a perceived barrier for adoption if you have to generate them on your own. Also, module development work happens offline or with an air gap. The gh-pages URLs don't help all that much. Same thing happens when there is a new puppet release: I'm downloading the documentation tarball from Puppet for use on my laptop.

@wyardley
Copy link
Contributor Author

wyardley commented Oct 12, 2017

Personally, if I'm not viewing online, I'm more likely to just read the human readable docs in the manifest vs. opening up local html files. But this is one reason I'd like to see the README generated from strings long-term (and a way to select what info goes into the README).

Of the options suggested so far in this thread, though, I like the gh-pages branch option the best.

@bastelfreak
Copy link
Member

I got some positive feedback about the docs in our repos during puppetconf. IMO they should stay in docs/ and we automate their generation.

@wyardley
Copy link
Contributor Author

Since we're going to leave them in docs, does someone want to submit a PR for the actual plumbing to make this work automagically?

@ekohl
Copy link
Member

ekohl commented Oct 18, 2017

@bastelfreak could we ship docs in releases, but not in git versions. Would that be sufficient?

@vinzent
Copy link
Contributor

vinzent commented Oct 18, 2017 via email

@bastelfreak
Copy link
Member

@ekohl I would prefer it to have them in the repos and automatically update them regulary with any automation

@ekohl
Copy link
Member

ekohl commented Oct 18, 2017

We can still solve that via gh-pages. I'd really like to avoid autocommitting things to master and if you don't, they go out of sync. It creates a lot of noise and I'm already ignoring many updates from modules because it's too much. My biggest worry is that I'll need to spend too much time keeping up and decide not to keep up at all resulting in reduced involvement.

@bastelfreak
Copy link
Member

I don't want any more noise as well. There are multiple bots out there to automate github interaction. It should be possible to automate the generation of the docs.

@ekohl
Copy link
Member

ekohl commented Oct 18, 2017

I still feel strongly that we shouldn't autocommit generated to master, especially if we don't have to. It blows up the repository size more than needed and clutters the git log. As a user I often look at git logs to see how things changed.

@wyardley
Copy link
Contributor Author

Closing this PR, but created #397 to deal with discussion and / or tracking some mechanism to auto-push docs.

@wyardley wyardley closed this Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants