!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

405 Members
Discussion about documentation improvements around the Nix ecosystem80 Servers

Load older messages


SenderMessageTime
13 Jan 2024
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

As the author of rfc145 and the creator of https://noogle.dev i can say:

It is very much feasible to autogenerate documentation from doc-comments. At least the API descriptions of all functions in nixpkgs.

Roughly 95% of what is in Noogle currently could also be autogenerated by any other tool.

I think one of the next important steps is to migrate to "doc-comments" (/** {commonmark} */)

asymmetric I've briefly looked into nrd (nixos-render-docs), and opened this issue: https://github.com/NixOS/nixpkgs/issues/280514
See the reply of @pennae there. I dont fully understand yet how to change nrd to clear the path. I'd super thankfull if someone from the community could do it. Otherwise... it will take me quite while, because i'm super busy recently with work related stuff.

*

But who does the work to ensure that the doc comments match up with the actual code?

Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

09:10:32
@bzzm3r:matrix.org@bzzm3r:matrix.org *

But who does the work to ensure that the doc comments match up with the actual code?

Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...wouldn't that also be necessary for stuff like noogle, or auto-gen docs?

09:10:51
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this is might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

09:12:43
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host *

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

09:12:52
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host bzm3r: The rfc is not yet fully implemented. What currently works is all the stuff that you can right now see in noogle. 09:14:36
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

Ah, I think I see. Okay, so this is presumably also where we put type information? (does "lambda formal" have a more specific meaning outside of nix/nixos?)
09:14:40
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

* Ah, I think I see. Okay, so this is presumably also where we put type information too then? (does "lambda formal" have a more specific meaning outside of nix/nixos?)
09:15:00
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host

bzm3r: You could also verify if your comments show up in noogle.

If you point noogle's "nixpkgs-master" flake input to your fork of nixpkgs and then execute nix build .#ui
You'll end up with the static site in ./result/lib/node_modules/noogle/out which you can serve statically with any http server. (e.g. nodePackages.http-server)

09:21:21
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host *

bzm3r: You could also verify if your comments show up in noogle.

If you point noogle's "nixpkgs-master" flake input to your fork of nixpkgs and then execute nix build .#ui
You'll end up with the static site in ./result/lib/node_modules/noogle/out which you can serve statically with any http server. (e.g. nodePackages.http-server)

Note: building takes quite a while the first time, because i modfiy c++ nix and the nix-build takes ~15minutes on my notebook)

09:22:32
@danielsidhion:nixos.devdanielsidhion
In reply to @infinisil:matrix.org
No idea about the first, but the second one oh no..
I figured out the first: the highlighting library also provides aliases for languages, and shellsession is an alias for shell: https://github.com/highlightjs/highlight.js/blob/main/src/languages/shell.js#L13-L16
This isn't documented in the docs for that library.
I have no idea why the highlighting wasn't working before, but now it is, so everything's good
20:12:07
14 Jan 2024
@bzzm3r:matrix.org@bzzm3r:matrix.org I believe I came across some research yesterday---I have a vague memory that it might have been work done as part of the nixos-render-docs project---collating a list of function documentation styles currently used by the manuals. 05:54:11
@bzzm3r:matrix.org@bzzm3r:matrix.orgMight someone know what I am referring to, or something similar to this? I am having trouble finding it at the moment.05:54:31
@bzzm3r:matrix.org@bzzm3r:matrix.org * I believe I came across some research yesterday collating a list of function documentation styles currently used by the manuals. I have a vague memory that it might have been work done as part of the nixos-render-docs project. 06:04:21
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @johannes.kirschbauer:scs.ems.host

bzm3r: > Also, it seems the doc comments RFC left defining how function arguments ought to be recorded in doc strings as "future work"...

I think this might be common missunderstanding:

We specified it for "lambda-formals".

#### Lambda formals

```nix
/**Doc for the whole lambda function*/
{
 /**Doc for formal 'a'*/
 a
}:
 a              
```

https://github.com/NixOS/rfcs/pull/168
06:33:32
@bzzm3r:matrix.org@bzzm3r:matrix.org * Might someone know what I am referring to, or of something similar to this? I am having trouble finding it at the moment.07:25:56
@lennart:0520.chlennart (this account will be deactivated by 1st of may 2025)hej, I was Release Editor for 23.05 and 23.11; I guess it'd have some feedback to the editorial process; how do you all collaborate? are there meetings I could attend to give my thoughts? best lennart / riotbib on nixpkgs14:52:30
@otti0815:matrix.orgotti0815 set a profile picture.15:07:29
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host

Is there any tutorial how to develop on nixos-render-docs?
https://github.com/NixOS/nixpkgs/tree/528a4bb0ac5e5af73445472ec25945460add7768/doc#contributing-to-this-documentation
The only sentence there is:

The rendering tool is nixos-render-docs, sometimes abbreviated nrd.

I am not super familiar with the implied workflow python development on that package.

I'm Calling nix develop .#nixos-render-docs to load the build dependencies of the package in my shell.
But then executing pytest

Results in an error

....
    import nixos_render_docs as nrd
E   ModuleNotFoundError: No module named 'nixos_render_docs' 
17:32:45
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host *

Is there any tutorial how to develop on nixos-render-docs?
https://github.com/NixOS/nixpkgs/tree/528a4bb0ac5e5af73445472ec25945460add7768/doc#contributing-to-this-documentation
The only sentence there is:

The rendering tool is nixos-render-docs, sometimes abbreviated nrd.

I am not super familiar with the implied workflow python development on that package.

I'm Calling nix develop .#nixos-render-docs to load the build dependencies of the package in my shell.
But then executing pytest

Results in an error

ImportError while importing test module 'nixos-render-docs/src/tests/test_asciidoc.py'.
....
    import nixos_render_docs as nrd
E   ModuleNotFoundError: No module named 'nixos_render_docs' 
17:33:41
@johannes.kirschbauer:scs.ems.host@johannes.kirschbauer:scs.ems.host *

Is there any tutorial how to develop on nixos-render-docs?
https://github.com/NixOS/nixpkgs/tree/528a4bb0ac5e5af73445472ec25945460add7768/doc#contributing-to-this-documentation
The only sentence there is:

The rendering tool is nixos-render-docs, sometimes abbreviated nrd.

I am not super familiar with the implied workflow python development on that package.

I'm Calling nix develop .#nixos-render-docs to load the build dependencies of the package in my shell.
But then executing pytest

Results in an error

ImportError while importing test module 'nixos-render-docs/src/tests/test_asciidoc.py'.
....
    import nixos_render_docs as nrd
E   ModuleNotFoundError: No module named 'nixos_render_docs' 

Any ideas ?

17:34:23
@danielsidhion:nixos.devdanielsidhion
In reply to @lennart:0520.ch
hej, I was Release Editor for 23.05 and 23.11; I guess it'd have some feedback to the editorial process; how do you all collaborate? are there meetings I could attend to give my thoughts? best lennart / riotbib on nixpkgs
We have meetings! Every monday and thursday, details on time+timezone and links are here: https://github.com/NixOS/nix.dev/tree/master/maintainers#team-meetings
(links are also in this matrix room's description)
Outside meetings, I think anything else happens either in writing in this room or through PR reviews (at least that's what I'm aware of)
20:19:13
@danielsidhion:nixos.devdanielsidhion(btw - I added a point to next meeting's agenda that came from a discussion here, and also links of PRs ready for merging. I can't attend on mondays, but hope you can look at the PRs at least!)20:21:57
@danielsidhion:nixos.devdanielsidhion
In reply to @johannes.kirschbauer:scs.ems.host

Is there any tutorial how to develop on nixos-render-docs?
https://github.com/NixOS/nixpkgs/tree/528a4bb0ac5e5af73445472ec25945460add7768/doc#contributing-to-this-documentation
The only sentence there is:

The rendering tool is nixos-render-docs, sometimes abbreviated nrd.

I am not super familiar with the implied workflow python development on that package.

I'm Calling nix develop .#nixos-render-docs to load the build dependencies of the package in my shell.
But then executing pytest

Results in an error

ImportError while importing test module 'nixos-render-docs/src/tests/test_asciidoc.py'.
....
    import nixos_render_docs as nrd
E   ModuleNotFoundError: No module named 'nixos_render_docs' 

Any ideas ?

Just spent some time looking into this. You need to run python -m pytest instead of pytest because of this: https://docs.pytest.org/en/7.4.x/explanation/pythonpath.html#invoking-pytest-versus-python-m-pytest
20:54:42
15 Jan 2024
@mightyiam:matrix.org@mightyiam:matrix.orgUpdate: the Nix doctester is still being worked on at four hours per week.15:11:33
@mcdonc:matrix.orgChris McDonoughI've made the changes to https://github.com/NixOS/nixpkgs/pull/277534 that we talked about during today's docs meeting, hopefully mergeable at this point when CI is done.16:32:27
@mcdonc:matrix.orgChris McDonoughRedacted or Malformed Event19:15:50
@mcdonc:matrix.orgChris McDonough * The rebuild impact of https://github.com/NixOS/nixpkgs/pull/275701 (the patch by cwp that fixes Python binary wrappers) is pretty huge. About half of everything depended upon in the devenv examples must be recompiled. Everything works so far, but I can imagine pushing that PR through into nixpkgs master is going to take a good long while due to its impact. I think maybe we should think about using our own makeWrapper in devenv itself that produces fixed Python binary wrappers in the meantime? Basically just kinda copy over the stuff from python/wrapper.nix and use it instead of the stuff in nixpkgs?19:16:37
@danielsidhion:nixos.devdanielsidhion Is there a preferred manpage resource that I can use to link directly to the manpage of a command inside the nixpkgs manual? I did a search on the manual, but only found text like ...can be found in the dyld(1) manpage without any links to any manpage. 22:01:45
@danielsidhion:nixos.devdanielsidhionArch has e.g. man.archlinux.org which they use a lot in their docs to link to manpages. I'm wondering if there's something similar for nixpkgs/nixos that I can use. Otherwise I'll just keep it without a link22:02:41
@bzzm3r:matrix.org@bzzm3r:matrix.org
In reply to @danielsidhion:nixos.dev
Arch has e.g. man.archlinux.org which they use a lot in their docs to link to manpages. I'm wondering if there's something similar for nixpkgs/nixos that I can use. Otherwise I'll just keep it without a link
I haven't run into any such thing yet, no. On the Discord people often end up linking to man.archlinux.org, or even wiki.archlinux.org
22:08:58

Show newer messages


Back to Room ListRoom Version: 6