Skip to main content

Parser tools for generating CCS Java documentation

Project description

CCS command documentation helper

License CI PyPI

List the available commands information such as the name, the level, the type and the description.

Usage

parse

Use the command-line tool ccsdoc to list the commands and configuration parameters either on a given file or in a directory.

  • on a single file
    ccsdoc parse --path JavaFile.java
    
  • on a full directory to process recursively all .java files
    ccsdoc parse --path java_project_dir
    

Commands or configuration parameters can be output to a directory.

ccsdoc parse --path JavaFile.java --to javafile_commands.csv

By default, both commands and configuration parameters are returned. In case only one of them is desired, pass in the corresponding flag: --commands or --params.

Use ccsdoc parse -h for details about the available options.

convert

The CSV table containing the commands can be converted to the desired format using pandoc

# e.g. here to Microsoft Word
ccsdoc convert javafile_commands.csv --to docx

Examples

Working examples

$ ccsdoc parse --path simulation/SimuEPOSController.java
SimuEPOSController: simulation/SimuEPOSController.java

Command[name=setPosition, type=ACTION, level=ENGINEERING1, desc='For simulator only : update position with a position given as argument.', args=(int actualPosition)]
Command[name=checkFault, type=QUERY, level=ENGINEERING1, desc='Check if the controller is in fault.']
Command[name=enableAndWriteRelativePosition, type=ACTION, level=ENGINEERING3, desc='Enable controller and go to relative position. Doesn't check condition. Danger !!!!', args=(int pos)]
$ ccsdoc parse --path Autochanger.java --params
Autochanger: Autochanger.java

ConfigurationParameter[name=timeToUpdateProtectionSystem, type=long, desc='Time to wait until protection system signals are updated', category=autochanger, units=milliseconds, range=[UNDEFINED, UNDEFINED]]
ConfigurationParameter[name=waitTimeForBrakeOC, type=int, desc='Time to wait between activatebrake and disableoperation for online clamps', category=autochanger, units=milliseconds, range=[UNDEFINED, UNDEFINED]]
ConfigurationParameter[name=waitTimeForBrakeLR, type=int, desc='Time to wait between activatebrake and disableoperation for linear rails', category=autochanger, units=milliseconds, range=[UNDEFINED, UNDEFINED]]

Missing argument example

$ ccsdoc parse --path SimuLoaderStandalonePlutoGateway.java
SimuLoaderStandalonePlutoGateway:
=> simulation/SimuLoaderStandalonePlutoGateway.java: issue at line 39: Missing command argument 'description'.

Installation

pip install ccsdoc

Author

Alexandre Boucaud aboucaud@apc.in2p3.fr (CNRS/IN2P3)

License

BSD 3-Clause license, see the LICENSE file for more information

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccsdoc-0.1.1.zip (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccsdoc-0.1.1-py2.py3-none-any.whl (11.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ccsdoc-0.1.1.zip.

File metadata

  • Download URL: ccsdoc-0.1.1.zip
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.4

File hashes

Hashes for ccsdoc-0.1.1.zip
Algorithm Hash digest
SHA256 2e3115de09750d303682cb975a69119eac8fa5c634d221bb2482baf7acbdf83a
MD5 4eb32dda096ab2ca6517d50e4297c4c0
BLAKE2b-256 35a2c069ded650aacde62d127653aad01abda6303be0b83613c7a3ce7e116322

See more details on using hashes here.

File details

Details for the file ccsdoc-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: ccsdoc-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.4

File hashes

Hashes for ccsdoc-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c380742d03bb5e252991784128ae85319f87f469a401cc2218eb962a19259852
MD5 68a8a398f0ed453359298abbc8c04785
BLAKE2b-256 dad6cbc848a67c945425bb315b3b58c43f390c55673fdf464b9fd2a38a74f060

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page