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

Create command line tools to automate documentation #344

Closed
7 tasks done
xsebek opened this issue May 28, 2022 · 7 comments · Fixed by #769
Closed
7 tasks done

Create command line tools to automate documentation #344

xsebek opened this issue May 28, 2022 · 7 comments · Fixed by #769
Assignees
Labels
C-Low Hanging Fruit Ideal issue for new contributors. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Documentation This issue is about README or Wikis or Haddock or... Z-Meta This issue is about other Swarm issues or infrastructure.

Comments

@xsebek
Copy link
Member

xsebek commented May 28, 2022

It would be nice to have either a separate executable or a new parameter to generate documentation.

Some ideas:

@xsebek xsebek added C-Low Hanging Fruit Ideal issue for new contributors. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Documentation This issue is about README or Wikis or Haddock or... Z-Meta This issue is about other Swarm issues or infrastructure. labels May 28, 2022
@xsebek
Copy link
Member Author

xsebek commented Jun 3, 2022

Also, there are the identifier lists in editors/ that I did not update in a while 😅

  • VS Code: swarm.tmLanguage.json
    {
    "name": "keyword.operator",
    "match": "(<|>|==|<=|>=|!=|=|;|<-|-|\\+|\\*|\\^|\\$|/(?![/|*]))"
    },
    {
    "name": "keyword.other",
    "match": "\\b(?i)(noop|wait|selfdestruct|move|turn|grab|place|give|install|make|has|count|drill|build|salvage|reprogram|say|log|view|appear|create|whereami|blocked|scan|upload|ishere|whoami|random|run|if|inl|inr|case|fst|snd|force|return|try|raise|not)\\b"
    }
  • Emacs: swarm-mode.el
    (x-builtins '("if" "run" "return" "try" "raise" "force" "fst" "snd"))
    (x-commands
    '("noop" "wait" "selfdestruct" "move" "turn" "grab" "place" "give"
      "install" "make" "build" "salvage" "reprogram"
      "say" "log" "view" "appear" "create" "getx" "gety"
      "blocked" "scan" "upload" "ishere" "whoami"
      "random" "not"
      "left" "right" "back" "forward" "north" "south" "east" "west" "down"
      ))
    There is even a nice note: 🗒️
    ;; We should figure out how to autogenerate these, so we don't have
    ;; to edit the emacs mode every time we add new commands.

@xsebek
Copy link
Member Author

xsebek commented Jun 23, 2022

@TristanCacqueray here is my first attempt at the recipe tree:
image
I will play with Graphviz settings a bit and then I will push the branch 😉

mergify bot pushed a commit that referenced this issue Jun 24, 2022
- add `generate` subparser to the executable
- create a generator for a Graphviz entity dependencies graph
- part of #344 

You can interactively test this with:
```bash
$ cabal run swarm:swarm -- generate recipes \
 | sed -n '/^digraph/,$p' > docs/recipes.dot
$ xdot docs/recipes.dot
```
xsebek added a commit that referenced this issue Jul 1, 2022
mergify bot pushed a commit that referenced this issue Jul 1, 2022
mergify bot pushed a commit that referenced this issue Jul 4, 2022
@xsebek
Copy link
Member Author

xsebek commented Jul 4, 2022

We should figure out how to use vty terminal mocking or some other way to produce a text representation of the UI - this would be useful to draw recipes but also for testing and documentation.

@xsebek
Copy link
Member Author

xsebek commented Oct 21, 2022

I think I will resume this next so that we can keep the whole Wiki up to date.

Making the recipe graph more useful is a separate problem, that I will finish later. It involves:

@xsebek
Copy link
Member Author

xsebek commented Oct 24, 2022

@byorgey
Copy link
Member

byorgey commented Oct 24, 2022

Good question. We should ask @jtdaugherty.

@xsebek
Copy link
Member Author

xsebek commented Oct 30, 2022

@byorgey I created an upstream issue for it:

I wonder if there are other Widgets we would like to print.


However, I would like to close this issue and come back to the other improvements later. 🙂

@mergify mergify bot closed this as completed in #769 Oct 31, 2022
mergify bot pushed a commit that referenced this issue Oct 31, 2022
- generate wiki for:
  - entities
  - recipes (table and added recipe graph image)
  - capabilities (only table)
- properly parse command line argument for `generate cheatsheet`
- closes #344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Low Hanging Fruit Ideal issue for new contributors. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Documentation This issue is about README or Wikis or Haddock or... Z-Meta This issue is about other Swarm issues or infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants