-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat:doc: stub doc headers for database tables #2803
Conversation
Coverage of commit
|
09b8a40
to
13cbc8f
Compare
Coverage of commit
|
I'm not worried about this. If it turns out to be a problem later on, we can remove it from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went back and forth because the generated docs are pretty sparse. But you did advertise these as stubs, and they do have the potential to fix some broken links.
I'm good with this as-is. I'm also good with you updating the macro itself as you suggested in the PR description.
b7efcb0
to
b709b37
Compare
b709b37
to
92dba4e
Compare
`mix docs` doesn't generate anything for these modules if `@moduledoc false` is set, but we're using `TypedEctoSchema` now which _does_ generate type information, which can be surfaced by `ExDoc`. It's also impossible to link to modules in documentation if `@moduledoc false` is set.
should make it easier to find our database related code, and easier to navigate in the documentation
92dba4e
to
8d226f3
Compare
Coverage of commit
|
Coverage of commit
|
mix docs
doesn't generate anything for these modules if@moduledoc false
is set, but we're usingTypedEctoSchema
now which does generate type information, which can be surfaced byExDoc
.It's also impossible to link to modules in documentation if
@moduledoc false
is set.I've also created a ExDoc group which is enabled via setting the option on
@moduledoc
section: :ecto
, this should make it easier to find our database related code, and easier to navigate in the documentation.It is possible to do this automatically for Ecto schemas, by setting this attribute in the shared
Skate.Schema
module. I do think this is neat, but I'm not really certain(i.e., let's discuss) this is a good decision?I like that this means we don't need to remember to add
section: :ecto
to all new Ecto schemas, because we have a growing list of "conventions" which are difficult to keep all in your head. But on the other hand, putting the@module_doc
in the schema macro removes the choice later to easily change thesection: :ecto
value, I looked into making the@module_doc
setting conditional, but wasn't very successful on my first attempt.