From e639b1104ec3f50b3944440119f2416aea6e31ac Mon Sep 17 00:00:00 2001 From: Bagus Tris Atmaja Date: Wed, 13 Mar 2024 16:47:51 +0900 Subject: [PATCH] add CLI ref --- docs/source/demo.md | 16 ++++++++++++++++ docs/source/index.rst | 10 +++++++++- docs/source/nkululeko.md | 8 ++++++++ docs/source/test.md | 18 ++++++++++++++++++ docs/source/usage.md | 21 ++++++++++----------- 5 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 docs/source/demo.md create mode 100644 docs/source/nkululeko.md create mode 100644 docs/source/test.md diff --git a/docs/source/demo.md b/docs/source/demo.md new file mode 100644 index 00000000..4dcdf946 --- /dev/null +++ b/docs/source/demo.md @@ -0,0 +1,16 @@ +# nkululeko.demo + +Module to generate predictions from unlabeled data using a pre-trained model. + +Usage: +```bash +python -m nkululeko.demo --config my_config.ini --list my_testsamples.csv --outfile my_results.csv +``` + +Example of a configuration file: +```ini +[EXP] +save = True +[MODEL] +save = True +``` \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index ef01a61f..ee7d9960 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -42,12 +42,20 @@ The examples only covers some important features of Nkululeko. For more details, hello_world_csv.md comparing +.. toctree:: + :maxdepth: 2 + :caption: CLI Reference (modules) + + nkululeko.md + test.md + demo.md + .. toctree:: :maxdepth: 1 :caption: Function Reference - calfem_reference + Indices and tables ================== diff --git a/docs/source/nkululeko.md b/docs/source/nkululeko.md new file mode 100644 index 00000000..8663cf3f --- /dev/null +++ b/docs/source/nkululeko.md @@ -0,0 +1,8 @@ +# nkululeko.nkululeko + +Module to run experiments with Nkululeko. + +Usage: +```bash +$ python -m nkululeko.nkululeko --config config_file.ini +``` diff --git a/docs/source/test.md b/docs/source/test.md new file mode 100644 index 00000000..39f154e2 --- /dev/null +++ b/docs/source/test.md @@ -0,0 +1,18 @@ +# nkululeko.test + +Module for testing the testing known datatast (has labels). + + +Usage: +```bash +python -m nkululeko.test --config mycoonfg.ini --outfile myresults.csv +``` + + +Example of `INI` file: +```ini +[DATA] +tests = ['my_testdb'] +my_testdb = /mypath/my_testdb +... +``` \ No newline at end of file diff --git a/docs/source/usage.md b/docs/source/usage.md index d9b10c37..f3da9779 100644 --- a/docs/source/usage.md +++ b/docs/source/usage.md @@ -8,7 +8,7 @@ python -m nkululeko.[MODULE] --config [CONFIG_FILE.ini] python -m nkululeko.nkululeko --config INI_FILE.ini ``` -where [INI\_FILE.ini]{.title-ref} is a configuration file. The only file +where [INI\_FILE.ini](ini_file.md) is a configuration file. The only file needed by the user is the INI file (after preparing the dataset). That\'s why we said this tool is intented without or less coding. The example of configuration file (INI\_FILE.ini) is given below. See [INI @@ -32,15 +32,14 @@ type = ['os'] type = xgb ``` -Besides [nkululeko.nkululeko]{.title-ref}, there are other functionalities. The completen functions are: +Besides [nkululeko.nkululeko], there are other functionalities. The completen functions are: -: - **nkululeko.nkululeko**: doing experiments - - **nkululeko.demo**: demo the current best model on command line - - **nkululeko.test**: predict a series of files with the current - best model - - **nkululeko.explore**: perform data exploration - - **nkululeko.augment**: augment the current training data - - **nkululeko.predict**: predict a series of files with a given - model +- **nkululeko.nkululeko**: doing experiments +- **nkululeko.demo**: demo the current best model on command line +- **nkululeko.test**: predict a series of files with the current + best model +- **nkululeko.explore**: perform data exploration +- **nkululeko.augment**: augment the current training data +- **nkululeko.predict**: predict a series of files with a given model -See the [API documentation](ini_file.md) for more details. \ No newline at end of file +See the CLI References (Modules) and [API documentation](ini_file.md) for more details. \ No newline at end of file