-
Notifications
You must be signed in to change notification settings - Fork 3
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
How should we create documentation of the operations, modules, datatypes a plugin provides? #2
Comments
Agree with everything said here, thanks for the write-up!
A minimal navigation would probably good, with an overview page of what components are available in a plugin and a short description, and links to more detailed information. One thing that would be really good to have is every component having it's own predictable url (or url & anchor), something like
I'd also lean towards svelte/svelte-kit. It's easy to pick up, very powerful, actively developed, and has a high user satisfaction. streamlit is nice in that it is Python only, but my experience working with it makes me think it'll be too inflexible for our needs, since a lot of the stuff we are doing UI wise is not a trivial top-to-bottom app. @MariellaCC has experience with Plotly Dash, so she could comment on that. My instinct is going for a full JS framework though, because in the end it just gives us the most flexibility and powerful features without having to worry about yet another intermediate layer.
Given our focus on reproducability/lineage/metadata, I do think it would be good to keep the history. We haven't really talked about how we version plugins, but keeping one version of documentation per git tag would be good.
Interesting question, didn't cross my mind yet. We could maybe maintain a database with all modules/data types versions and their metadata by feeding into it at every release of a plugin? That way, we could present that information in any way that becomes useful? A database like that might also prove useful for other metadata related features later on, for example we wouldn't need to have a running kiara service for some type of information rendering... Hmmmmmmmmm, something to mull over....
I guess, depending on how much effort it is, maybe we could use the i8n features that come with our selected framework, but only implement English for now? But that's mainly a trade-off between how much resources we can afford to spend on this now, against how likely it is in the future that we'll need it and how much more difficult it would be to implement it without this sort of preparation. I guess a question to answer once we have a rough plan and priorities? It would be best practice to prepare for it I guess. Speaking about best practices, what should/can we do about accessibility? I don't have much experience in that field, but my guess is it's much easier to not have to retro-fit that, but consider it from the beginning. |
Great idea! like a permalink for a component. Would/could this also include version information? Could the plugin package be able to communicate what the base URL for its docs is, for non-core plugins that can't use
My one concern with JS is testing - not applicable so much to these docs, but definitely to other kinds, how do we make sure the code contained in the docs runs and is correct. IIRC there's already something that does this for the existing mkdocs implementation, but I'm not sure how I'd do that via JS
this would be a kind of deploy once and leave running without ever changing thing? Does a git tag correspond to a python package version that can be installed? How do we know what version(s) of kiara core it could be installed alongside to get the documentation from the plugin via kiara's API? It would be good to document how we do versioning, and what versions (of packages and of other things?) mean for end users, so they can know whether they can safely update things they are depending on. I'd kind of assumed it was something like semver at the python package level, but that's not the case? I'll add a note to the 'concepts' bit of the core docs outline to remind me this needs doing - 5aaba0b Re permalinks for things, would it then look like
A database is a nice idea but not something I'd feel confident maintaining. Would something like a json/yaml file in the docs github repo be able to achieve something similar without needing to maintain a database server? We could consider publishing changelogs for each package alongside this documentation, so users can get summaries of what changed in each version? Requires a bunch of effort to write for the plugin authors, but I think would be really useful for end users. (I keep getting tripped up by changes in the names of operations in the network analysis plugin, being able to see a list of what changed between versions and maybe something like a migration guide would be super useful)
sounds good. It would be nice to make it easy to do translations in the future, but this isn't something I have any expertise in (technically or linguistically! my other languages are not fluent enough to write technical docs in).
Sorry I forget accessibility is even a question! I'll make sure that's done to the best of my ability from the start - I know a decent amount and care a lot. For our purposes, it will mostly look like generating semantic HTML, making sure everything is possible and logical to navigate with a keyboard, and using a clear colour scheme. Might also be worth adding an accessibility statement, to the effect of we're doing our best as a small team, tell us if something isn't working for your needs? |
Proposal for the technical side of how to make a start on this in #3, but I'll leave this issue open since there's still a bunch of open questions. Having done some research, it seems that there isn't a particularly good solution for translation in sveltekit at the moment. Since kiara's internal docs are also only in English, and the team has very limited resources, I think we should not consider translations for now, and wait until there's a need from kiara's users, more dev capacity and hopefully the sveltekit community has settled on a decent approach to take. |
Yeah, I think that would be best. Depending on how we version the docs themselves, it might just be a matter of
Yes, currently I've hardcoded dharpa.org in the template I think, but that would be easy enough to change and add to the metadata of the project.
The only piece of information we have is the
I guess that depends on the framework we are using in part, and whether we link to our 'central' site, or each plugins documentation directly for the permalinks. The latter would have the advantage of automatically also working for external plugins. But would mean that we would not link to our 'central' official doc, but each plugin independently. Maybe if we go with the first option it would work for both cases? |
Yeah, as we talked about earlier, I think that is a great idea, and much better.
Yes, I think we can partially automate that by establishing best practices for git commits, and then automatically generating those changelogs. It's going to be messy and incomplete either way though, I fear. As for changes in operation names, this is something that happens at the moment because I don't have enough experience yet to have a sense of how to design modules well from the beginning, but I really want to minimize/discourage/forbid that sort of change, if at all possible. Modules should have a stable interface, and if a change is needed, the old module should stay in place and a new one with a different name created. Maybe we can be a bit smarter and have those module sub-versions and do some basic dependency resolution, but that goes back to our problem with having enough time and resources. |
@caro401 I agree that Streamlit comes with too many limitations as soon as the scope of the app is beyond a certain level of complexity (it is difficult to give a precise scale). Still, I found it helpful for prototyping purposes or to create quick dashboards up to a certain level of complexity. For my needs in the past, Streamlit was not flexible enough, so I experimented with Plotly Dash. Before that, I had experimented with Flask combined with React (which remains my preferred experience in terms of flexibility but the choice of tech was quite arbitrary). As I am not specialised in front-end development, it is difficult to have an opinion on a suitable solution. My comment is only about the flexibility needed from past experiments, and I agree that, in general, Streamlit is too inflexible for sustainable mini-apps. |
This documentation existing is really important for end-users as it tells them what each plugin can do for them. The content of this documentation is contained in the python code for each plugin, and can be accessed via the kiara API.
Existing examples of this documentation are here, and the content comes directly from the module code eg this datatype docstring
There's a distinction between plugins created by the internal team, and those created by external people. We probably want documentation for internal plugins to live in one place, alongside the main docs, assuming this matches with @MariellaCC's survey results.
But we also need external plugins to be able to create standalone docs, as they currently do. The plugin template should come with a github action that deals with building and publishing these docs automatically, with no intervention from the developer.
Because we can get all the content via Kiara's API and the docs can be built in Github actions, we aren't constrained to just using a python-based solution for this. It may be advantageous to use a javascript-based solution, using at least some of the technologies we use for the mini-apps to enable component and styling reuse. This would probably be Svelte for components, and possibly SvelteKit for site building.
There's some vague prototypes of what this could look like in this repo which could have some code that could be adapted into components, or a static site builder, but it isn't currently good, tested or documented.
Open questions I can think of
The text was updated successfully, but these errors were encountered: