Giter Club home page Giter Club logo

kiara.documentation's Introduction

PyPI status PyPI version PyPI pyversions Build Status Coverage Status Code style

kiara plugin: (documentation)

Kiara user documentation.

Description

TODO

Development

Requirements

  • Python (version >= 3.8)
  • conda
  • git

Prepare development environment

Using conda (recommended)

conda create -n kiara_documentation python=3.9
conda activate kiara_documentation
conda install -c conda-forge mamba   # this is optional, but makes everything install related much faster, if you don't use it, replace 'mamba' with 'conda' below
mamba install -c conda-forge -c dharpa kiara kiara_plugin.core_types kiara_plugin.tabular kiara_plugin.network_analysis

!!! note For Linux, if you experience errors, you might or might not have to also execute: mamba update -c conda-forge libstdcxx-ng.

Check out the source code

First, fork the kiara.documentation repository into your personal Github account.

Then, use the resulting url (in my case: https://github.com/makkus/kiara.documentation.git) to clone the repository locally:

https://github.com/<YOUR_FORKED_GITHUB_ID>/kiara.documentation

Install the kiara documentation package into it

cd kiara.documentation
pip install -e '.[all_dev]'

Install some pre-commit check tooling (optional)

This step is optional, but helps with keeping the code clean and CI from failing. By installing pre-commit hooks like here, whenever you do a git commit in this repo, a series of checks and cleanup tasks are run, until everything is in a state that will hopefully make Github Actions not complain when you push your changes.

pre-commit install
pre-commit install --hook-type commit-msg

In addition to some Python-specific checks and cleanup tasks, this will also check your commit message so it's in line with the suggested format: https://www.conventionalcommits.org/en/v1.0.0/

Try it out

If you followed the instructions above, you should see an additional doc subcommand when doing a kiara --help. Check out the available commands by using the --help flag.

The main command to use is serve, which builds and serves the current documenation website:

kiara doc serve
...
...

This will create the documentation, and run a webserver on http://localhost:8000 where you can preview the generated documentation site. The first startup will take a bit, because some of the pages use dynamically generated results to prevent the documentation becoming out-of-date easily (and as a test against regressions). Those results are cached though, so the 2nd time around startup should be quicker.

The 'serve' command will watch documents under docs, if any of them is changed, it will auto-create the changed documentation page, and reload the browser(s) that are viewing it.

Another important command is cache clear, which cleares the build cache of the dynamic commands that were executed while building the page for the first time.

make targets (Linux & Mac OS X)

  • init: init development project (install project & dev dependencies into virtualenv, as well as pre-commit git hook)
  • update-dependencies: update development dependencies (mainly the core kiara package from git)
  • flake: run flake8 tests
  • mypy: run mypy tests
  • test: run unit tests
  • docs: create static documentation pages (under build/site)
  • serve-docs: serve documentation pages (incl. auto-reload) for getting direct feedback when working on documentation
  • clean: clean build directories

For details (and other, minor targets), check the Makefile.

Running tests

> make test
# or
> make coverage

Copyright & license

This project is MPL v2.0 licensed, for the license text please check the LICENSE file in this repository.

kiara.documentation's People

Contributors

caro401 avatar makkus avatar stakats avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.