FAIR4RS
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- tags: seminar --- # Week 6 - Documentation :::info **Topics for today:** - Understand the different types of documentation relevant to software projects - Start using essential documentation best practices - Review the readability of your code **What to expect** By the end of the seminar we would like you to have a documentation approach/system that fits your project requirements. ::: ## 📆 Seminar schedule - Welcome! - Reminder of the [**Code of Conduct**](/isBPjSUoRL6Kvr1LjaZe7Q) - Discuss previous assignments [20 min] - Introduce assignments [15 min] - Work on assignments [50 min] ## 🙋 Discussion and questions - Reflect on the fact that preparing a repo to become reproducible is already a documentation exercise. - You have already started working on dependency documentation and installation instructions. - Some have tests and notebook examples. - Readable code is documentation. :::warning **Some statements to provoke discussion:** - Documentation is everything - *What do you think is the main documentation source in a codebase?* - Code is for computer, comments are for humans. - *What is the role of comments in your code?* - Readable code is sufficient for good code documentation. - *Who should be reading your code?* - Different users approach your code differently. - *Can you think of different users and usecases?* - *Which documentation tools would you use?* ::: 👉 Go to [**collaborative document**](https://hackmd.io/@fair4rs/rJoEhe4zn). ## Assignments for Wednesday 26th of April The goal of the this week's challenges and assignments is to find a documentation system/approach that works for your project specific needs. :::success **💡 Tip:** Add the FAIR cards to your github board to as a reference for FAIR documentation. ::: ### FAIR card - Project documentation ```markdown _Essential_ - [ ] [README](https://github.com/18F/open-source-guide/blob/18f-pages/pages/making-readmes-readable.md) - [ ] [LICENSE](https://doi.org/10.5281/zenodo.4629662) - [ ] [CITATION](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files) _Recommended_ - [ ] Make use of [Github issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues) - [ ] [Code of conduct](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project) ``` ### FAIR card - Software documentation ```markdown _Essential_ - [ ] Installation instructions - [ ] User documentation - [ ] Developer documentation - [ ] Source code documentation ([docstrings](https://numpydoc.readthedocs.io/en/latest/format.html)) _Recommended_ - [ ] Examples and tutorials (Jupyter notebooks, videos, screencasts) - [ ] Automate documentation building with [sphinx](https://coderefinery.github.io/sphinx-lesson/) - [ ] Website ([github.io pages](https://pages.github.com/), [Readthedocs](https://readthedocs.org/), [JupyterBook](https://jupyterbook.org/intro.html) _Optional_ - [ ] Build [API reference](https://developer.lsst.io/python/numpydoc.html) from docstrings ``` ### Assignment 1 Add essential files that make your software project instantly more Accessible and Reusable: 1. LICENSE file The TU Delft released a high-level [Software Policy](https://zenodo.org/record/4629662#.ZD7vJnZByUk) that lists pre-approved open-source licenses. :::info For more information, detailed [TU Delft Research Software Guidelines](https://d2k0ddhflgrk1i.cloudfront.net/TUDelft/Over_TU_Delft/Strategie/TU%20Delft%20Research%20Software%20Guidelines.pdf) about licensing, registration, and commercialization are available. This document also details the required steps to reclaim the copyright to your software (page 27) as TU Delft by default holds the rights to the software created by its employees. ::: :::success **💡 Tip:** Licenses simplified by [Choose a license](https://choosealicense.com/licenses/) and [Software licenses in plain English](https://www.tldrlegal.com/) ::: 2. CITATION.cff file You can add a [CITATION.cff](https://citation-file-format.github.io/) file to the root of a repository to let others know how you would like them to cite your work. The citation file format is plain text with human- and machine-readable citation information. More information and compatible tools can be found in this [repository](https://github.com/citation-file-format/citation-file-format). ### Assignment 2 Now that we have the minimum required for FAIR documentation for research software, let's define a broader approach towards your project documentation. :::info **What do we mean by documentation system?** What no body tells you about documentation is that is not just one thing, but several. How-to-guides, tutorials, in-code documentation, knowledge-base and explanation of concepts can all be part of documentation. In the case of research software, Jupyter notebooks often are an essential documentation tool. [**Divio**](https://documentation.divio.com/) offers a great overview of the types of documentation. ::: 1. Define the documentation that you, your users, and your collaborators would need to understand and use your software. 2. Make a todo list (GitHub issues) based on these considerations. :::success **💡 Tip:** Think about a minimum approach that improves your current situation, and a more ambitious approach. ::: ### Assignment 3 [Readable code](https://raw.githack.com/mwakok/FAIR4RS/main/Readability.html) and [in-code documentation](https://coderefinery.github.io/documentation/in-code-documentation/) are important parts in making your code easy to understand To improve the readability of your code, you should consider: - Writing code comments that explain the **why** of the code and not the **what**. - Adding docstrings to (public) functions. - Using common naming conventions (check a style guide). - Adding whitelines and avoid compound statements. :::info Every major open-source project (e.g. [**Numpy**](https://numpydoc.readthedocs.io/en/latest/format.html)) has its own style guide: a set of conventions (sometimes arbitrary) about how to write code for that project. It is much easier to understand a large codebase when all the code in it is in a consistent style. ::: 1. Checkout a style guide for your Programming language and review your code for the readability considerations listed above. - Would it make sense to adopt a style guide for your project? - What conventions do you find useful? 2. Following style guides can be made easy with a [linter](https://github.com/caramelomartins/awesome-linters). Review your code by running a linter (e.g. `flake8` for Python, `checkcode` for MATLAB, `IntelliSense`for C++, or `lintr` for R) to identify conflicts with the style guide. 3. Make a todo list (GitHub issues) to improve the readability of your code. :::success **💡 Tip:** For Python, the recommended docstring styles are the [Numpy](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html) and [Google](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html#example-google) styles. Both can be interpreted by sphinx. ::: ### 💪 Extra (optional) Assignments - Build your documentation with sphinx - Check the [Code Refinery lesson](https://coderefinery.github.io/documentation/sphinx/) - Deploy your documentation to GitHub pages. - Check the [Code Refinery lesson](https://coderefinery.github.io/documentation/gh_workflow/) ## Materials - [Code Refinery lesson](https://coderefinery.github.io/documentation/) - [Quarto](https://quarto.org/) - [Myst parser](https://myst-parser.readthedocs.io/en/latest/) - [TU Delft Research Software Policy](https://zenodo.org/record/4629662#.ZD7vJnZByUk) - [TU Delft Guidelines on Research Software](https://d2k0ddhflgrk1i.cloudfront.net/TUDelft/Over_TU_Delft/Strategie/TU%20Delft%20Research%20Software%20Guidelines.pdf) - [CITATION.cff reference](https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md) **Sphinx** - [Theme gallery](https://sphinx-themes.org/) - [Jupyerbook](https://jupyterbook.org/en/stable/intro.html) <!-- ## Notes Sure, here is an outline for a code documentation workshop using Python as the main language: I. Introduction A. Overview of Code Documentation B. Importance of Code Documentation C. Types of Code Documentation 1. Inline Comments 2. Docstrings 3. External Documentation D. Why Python? II. Inline Comments A. Syntax of inline comments B. When to use inline comments C. Best practices for writing inline comments III. Docstrings A. Syntax of docstrings B. Types of docstrings 1. One-line docstrings 2. Multi-line docstrings a. Google-style docstrings b. NumPy-style docstrings C. When to use docstrings D. Best practices for writing docstrings IV. External Documentation A. Overview of external documentation B. Tools for generating external documentation 1. Sphinx 2. Read the Docs C. Best practices for writing external documentation V. Conclusion A. Review of key concepts B. Final thoughts and recommendations Note that you can add more content to each section based on the audience's needs and level of experience with Python and code documentation. -->

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully