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

docs: template for spec and initial files #1856

Merged
merged 15 commits into from
May 31, 2023
Merged

Conversation

evan-forbes
Copy link
Member

@evan-forbes evan-forbes commented May 30, 2023

Overview

This is just the initial "get the ball rolling" on the specs by adding the template @staheri14 created in #1818 and the initial links to each README in the state machine code as discussed in the internal audit/spec call. This is not intented to be the final structure 🙂

closes #1818, #1555

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

evan-forbes and others added 2 commits May 30, 2023 12:01
Co-authored-by: Sanaz Taheri <staheri14@users.noreply.github.com>
@evan-forbes evan-forbes added documentation Improvements or additions to documentation specs directly relevant to the specs labels May 30, 2023
@evan-forbes evan-forbes self-assigned this May 30, 2023
@MSevey MSevey requested a review from a team May 30, 2023 17:15
@github-actions
Copy link

github-actions bot commented May 30, 2023

PR Preview Action v1.4.4
🚀 Deployed preview to https://celestiaorg.github.io/celestia-app/pr-preview/pr-1856/
on branch gh-pages at 2023-05-31 16:02 UTC

@rootulp
Copy link
Collaborator

rootulp commented May 30, 2023

I think we should add the new pages to these pages so that they show up in the PR preview: https://celestiaorg.github.io/celestia-app/pr-preview/pr-1856/

My impression was that the short term approach would be to copy + paste the contents of the x/module/README.md to specs/src/mint/module.md and in x/module/README.md have a link to the corresponding page in the specs. If that's the case, spec owners can do that after this merges.

@codecov-commenter
Copy link

codecov-commenter commented May 30, 2023

Codecov Report

Merging #1856 (c017e9f) into main (1ecde6d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1856   +/-   ##
=======================================
  Coverage   21.82%   21.82%           
=======================================
  Files         116      116           
  Lines       13247    13247           
=======================================
  Hits         2891     2891           
  Misses      10065    10065           
  Partials      291      291           

@staheri14
Copy link
Contributor

My impression was that the short term approach would be to copy + paste the contents of the x/module/README.md to specs/src/mint/module.md and in x/module/README.md have a link to the corresponding page in the specs. If that's the case, spec owners can do that after this merges.

[Suggestion] If we proceed with this approach, then each spec owner would be able (in addition to copying the old content from the x/module/README.md) to organize the content of the respective file based on the specs template.

staheri14
staheri14 previously approved these changes May 30, 2023
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀
[Optional] We could have a README file specifically for the specs folder. This README can provide high-level information about the structure of the specs folder, including details on how the specs are formatted. It can include a link to the template that the specs should follow, as well as any other relevant information (which can be kept concise for now and expanded upon later through iteration).

@evan-forbes
Copy link
Member Author

My impression was that the short term approach would be to copy + paste the contents of the x/module/README.md to specs/src/mint/module.md and in x/module/README.md have a link to the corresponding page in the specs.

this is what was originally suggested iirc, but I believe @MSevey suggested that we have the opposite mapping for now until we have some other setup that pulls the relevant readme's into that package. I'm open to suggestions about structure

@MSevey MSevey requested a review from a team May 30, 2023 19:39
Co-authored-by: Rootul P <rootulp@gmail.com>
@MSevey
Copy link
Member

MSevey commented May 30, 2023

My impression was that the short term approach would be to copy + paste the contents of the x/module/README.md to specs/src/mint/module.md and in x/module/README.md have a link to the corresponding page in the specs.

this is what was originally suggested iirc, but I believe @MSevey suggested that we have the opposite mapping for now until we have some other setup that pulls the relevant readme's into that package. I'm open to suggestions about structure

my initial naive thought was that we could just update the summary page to link to the actual pkg READMEs https://github.com/celestiaorg/celestia-app/blob/main/specs/src/SUMMARY.md?plain=1

then you the specs folder is really just a shell.

a second naive approach was that instead of the spec README having a link to the pkg README, the spec file itself was a symbolic link to the README in the pkgs.

Both are totally untested, so feel free to completely ignore me and do what makes the most sense to the team :-)

I was mostly just throwing out alternatives to help reduce duplication.

rootulp
rootulp previously approved these changes May 30, 2023
staheri14
staheri14 previously approved these changes May 30, 2023
@liamsi
Copy link
Member

liamsi commented May 31, 2023

I like what @MSevey suggested for the following reasons:

  • less duplication / no copy paste necessary
  • cosmos devs can still find docs where they would expect them (under x/modulename)
  • my intuition is that devs will feel more responsibility over the specs/docs if they are in the same directory as the code (might be completely wrong about this too)

liamsi
liamsi previously approved these changes May 31, 2023
Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

my initial naive thought was that we could just update the summary page to link to the actual pkg READMEs https://github.com/celestiaorg/celestia-app/blob/main/specs/src/SUMMARY.md?plain=1

I think we should just do this. Having directories with a file that just links to another file seems misleading. In the overview page where you lay out the contents of the spec, I would just do direct links to the readmes in the packages/modules we have. For the stuff that doesn't have a clear directory, like block validity rules, I would add those pages to the spec directory

@evan-forbes evan-forbes dismissed stale reviews from liamsi, staheri14, and rootulp via e20289c May 31, 2023 15:14
@MSevey MSevey requested a review from a team May 31, 2023 15:14
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

@MSevey MSevey requested a review from a team May 31, 2023 15:31
- [paramfilter](../../../x/paramfilter/README.md)
- [upgrade](../../../x/upgrade/README.md)

## Standard `cosmos-sdk` Modules
Copy link
Member Author

Choose a reason for hiding this comment

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

note: added all the sdk modules we're using clsoing #1555

@evan-forbes
Copy link
Member Author

@rootulp sorry, was just in the of refactoring when you reviewed. the readme should be up to date now

rootulp
rootulp previously approved these changes May 31, 2023
specs/src/README.md Outdated Show resolved Hide resolved
Co-authored-by: Rootul P <rootulp@gmail.com>
@MSevey MSevey requested a review from a team May 31, 2023 16:02
@evan-forbes
Copy link
Member Author

@cmwaters @MSevey
cool good idea, moved from having specific directories for state modules to just having links. I think the original thinking was that we would fill out more high level specs beyond the standard cosmos-sdk documentation, hence the specific directories for when we fill those out, but keeping those specs in their respective modules and linking in the readme as needed makes a lot of sense

@evan-forbes evan-forbes requested a review from cmwaters May 31, 2023 16:03
@evan-forbes evan-forbes linked an issue May 31, 2023 that may be closed by this pull request
Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

I do echo Rootul's concern of having a duplicated README.md and a SUMMARY.md but other than that am happy with this initial direction

- [distribution](https://github.com/celestiaorg/cosmos-sdk/blob/v1.14.0-sdk-v0.46.11/x/distribution/spec/README.md)
- [evidence](https://github.com/celestiaorg/cosmos-sdk/blob/v1.14.0-sdk-v0.46.11/x/evidence/spec/README.md)
- [feegrant](https://github.com/celestiaorg/cosmos-sdk/blob/v1.14.0-sdk-v0.46.11/x/feegrant/spec/README.md)
- [genutil](https://github.com/celestiaorg/cosmos-sdk/tree/v1.14.0-sdk-v0.46.11/x/genutil) (no spec)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really a module?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was tempted to not include it, but yeah it is and it can result in non-determinism for starting the genesis so I decided to include it.

https://github.com/celestiaorg/cosmos-sdk/blob/24903f4a983911f708fbf138a895ea4abc5dc752/x/genutil/module.go#L45-L53

@evan-forbes
Copy link
Member Author

evan-forbes commented May 31, 2023

I do echo Rootul's concern of having a duplicated README.md and a SUMMARY.md but other than that am happy with this initial direction

I agree and we can definitely change this stucture in the future, it doesn't make any sense to have two. I think this is just an mdbook thing, which we could also change.

This markdown file must be named SUMMARY.md.

https://rust-lang.github.io/mdBook/format/summary.html

@evan-forbes evan-forbes merged commit 3ec599e into main May 31, 2023
18 of 19 checks passed
@evan-forbes evan-forbes deleted the evan/spec-template branch May 31, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation specs directly relevant to the specs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new templates for the spec specs: define which sdk modules we are using
7 participants