Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SachidanandAlle committed Feb 2, 2019
1 parent 93cd0fb commit 055844f
Show file tree
Hide file tree
Showing 14 changed files with 391 additions and 321 deletions.
12 changes: 12 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Language: Cpp
BasedOnStyle: Google
DerivePointerAlignment: false
PointerAlignment: Right
IndentPPDirectives: AfterHash
Cpp11BracedListStyle: false
AlwaysBreakTemplateDeclarations: false
AllowShortCaseLabelsOnASingleLine: true
SpaceAfterTemplateKeyword: false
AllowShortBlocksOnASingleLine: true
...
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# How to Contribute

We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

## Contributor License Agreement

Information related agreement...

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.

## Community Guidelines

40 changes: 0 additions & 40 deletions docs/architecture.rst

This file was deleted.

100 changes: 63 additions & 37 deletions docs/build.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
..
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -28,54 +28,80 @@
Building
========

C++ Library
-----------

Build Requirements
++++++++++++++++++
Building C++ Client
-------------------

- [CMake](https://cmake.org/) (version >= 3.12.4)
- C++ 11 or higher
- For Windows Visual Studio 2017 [community version is free](https://visualstudio.microsoft.com/vs/community/)
Nvidia AI-Assisted Annotation SDK follows a client-server approach to integrate into an application. Once a user has been granted early access user can use either C++ or Python client to integrate the SDK into an existing medical imaging application.

Build Instructions
+++++++++++++++++++
.. code-block:: guess
It officially supports following 3 platforms
- Windows (Windows 10)
- Linux (Ubuntu16+)
- macOS (High Sierra and above)

git clone https://github.com/NVIDIA/ai-assisted-annotation-client.git NvidiaAIAAClient
# For Windows, checkout into shorter path like C:\NvidiaAIAAClient
# to avoid ITK build errors due to very longer path
cd NvidiaAIAAClient
mkdir build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ../
# If you have already ITK installed then
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DEXTERNAL_ITK_DIR=/home/xyz/install/lib/cmake/ITK-4.13 ../
# If you have already Poco installed then
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DEXTERNAL_Poco_DIR=/home/xyz/install/lib/cmake/Poco ../

Prerequisites
^^^^^^^^^^^^^
- `CMake <https://cmake.org>`_ (version >= 3.12.4)
- For Linux/Mac gcc which supports C++ 11 or higher
- For Windows `Visual Studio 2017 <https://visualstudio.microsoft.com/downloads>`_

For Linux/Mac run::
External Dependencies
^^^^^^^^^^^^^^^^^^^^^
- `ITK <https://itk.org>`_ (version = 4.13..1)
- `Poco <https://pocoproject.org>`_ (version = 1.9.0)
- `nlohmann_json <https://github.com/nlohmann/json>`_

.. note::
Above are source only dependencies for CMake project.
They will get downloaded and built as part of super-build project for AIAA Client.

Building Binaries
^^^^^^^^^^^^^^^^^
Following the below instructions to get the source code and build the project

make -j16
.. code-block:: bash
# To Install/Package
cd NvidiaAIAAClient-Build
make install
make package
git clone https://github.com/NVIDIA/ai-assisted-annotation-client.git NvidiaAIAAClient
cd NvidiaAIAAClient
mkdir build
cmake ../
# If ITK is installed locally
export MYINSTALL_DIR=/home/xyz/install
cmake -DITK_DIR=${MYINSTALL_DIR}/lib/cmake/ITK-4.13 ../
# If ITK and Poco are installed locally
cmake -DITK_DIR=${MYINSTALL_DIR}/lib/cmake/ITK-4.13 -DPoco_DIR=${MYINSTALL_DIR}/lib/cmake/Poco ../
.. note::
- Use Release mode for faster build.
- For Windows, use CMAKE GUI client to configure and generate the files.
- For Windows, if ITK is not externally installed, then use shorter path for *ROOT* Folder e.g. ``C:/NvidiaAIAAClient`` to avoid ``LongPath`` error.

For Windows::
Following are some additional CMake Flags helpful while configuring the project.
- ``ITK_DIR`` - use already installed ITK libraries and includes
- ``Poco_DIR`` - use already installed Poco libraries and includes
- ``AIAA_LOG_DEBUG_ENABLED`` - enable/disable Debug-level Logging (default: 0)
- ``AIAA_LOG_INFO_ENABLED`` - enable/disable Info-level Logging (default: 1)

msbuild NvidiaAIAAClient-superbuild.sln -m:4

#Install/Package
cd NvidiaAIAAClient-Build
Building the Documentation
--------------------------

> Open NvidiaAIAAClient.sln in IDE and run INSTALL/PACKAGE (currently works through IDE only)
> On Windows use CMAKE GUI client (and select Release for CMAKE_CONFIGURATION_TYPES) to configure and generate the files.
The Nvidia AI-Assisted Annotation Client documentation is found in the docs/ directory and is based
on `Sphinx <http://www.sphinx-doc.org>`_. `Doxygen <http://www.doxygen.org/>`_ integrated with `Exhale <https://github.com/svenevs/exhale>`_ is
used for C++ API docuementation.

To build the docs install the required dependencies::

$ apt-get update
$ apt-get install -y --no-install-recommends doxygen
$ pip install --upgrade sphinx sphinx-rtd-theme nbsphinx exhale

Then use Sphinx to build the documentation into the build/html
directory::

$ cd docs
$ make clean html
30 changes: 0 additions & 30 deletions docs/client.rst

This file was deleted.

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -52,7 +52,7 @@
# -- Project information -----------------------------------------------------

project = u'NVIDIA AI-Assisted Annotation Client'
copyright = u'2018, NVIDIA Corporation'
copyright = u'2019, NVIDIA Corporation'
author = u'NVIDIA Corporation'

version_long = u'0.0.0'
Expand Down
15 changes: 5 additions & 10 deletions docs/contribute.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
..
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -28,24 +28,19 @@
Contributing
============

Contributions to TensorRT Inference Server are more than welcome. To
Contributions to Nvidia AI-Assisted Annotation Client are more than welcome. To
contribute make a pull request and follow the guidelines outlined in
the `CONTRIBUTING
<https://github.com/NVIDIA/tensorrt-inference-server/blob/master/CONTRIBUTING.md>`_
<https://github.com/NVIDIA/ai-assisted-annotation-client/blob/master/CONTRIBUTING.md>`_
document.

Coding Convention
-----------------

Use clang-format to format all source files (\*.h, \*.cc, \*.proto) to
Use clang-format to format all source files (\*.h, \*.cpp) to
a consistent format. You should run clang-format on all source files
before submitting a pull request::

$ apt-get install clang-format clang-format-6.0
$ clang-format-6.0 --style=file -i *.proto *.cc *.h
$ clang-format-6.0 --style=file -i *.cpp *.h

For convenience there is a format.py script in tools/ that can be used
to clang-format all files within the repo::

$ cd .../tensorrt-inference-server # top-level of repo
$ python format.py *
Binary file removed docs/images/arch.png
Binary file not shown.
16 changes: 2 additions & 14 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ NVIDIA AI-Assisted Annotation Client
stable release click `here
<https://docs.nvidia.com/deeplearning/sdk/ai-assisted-annotation-client-guide/docs/index.html>`_.

.. include:: ../README.rst
:start-after: overview-begin-marker-do-not-remove
:end-before: overview-end-marker-do-not-remove

.. toctree::
:hidden:

Expand All @@ -50,17 +46,9 @@ NVIDIA AI-Assisted Annotation Client
:caption: User Guide

quickstart
install
client

.. toctree::
:maxdepth: 2
:caption: Developer Guide

architecture
contribute
build
test
tools
contribute

.. toctree::
:maxdepth: 2
Expand Down
Loading

0 comments on commit 055844f

Please sign in to comment.