CODE AUDITOR Make your research software ready for publishing! https://github.com/SS-NES/code-auditor Development funded by TDCC NES / NWO Serkan Girgin <
[email protected]>, Robert Ohuru, Manuel Garcia Alvarez, Angelina Momin, Zafer Öztürk, Marianna Avetisyan, Raoul Schram Publishing plays a critical role in the development, recognition, and sustainability of research software, particularly as software becomes a central output of scientific work. Following the best practices for research software development is fundamental for a modern, open, and sustainable research software. They also enable smoother integration and minimize redundant work by promoting interoperability and reuse. Best practices can be mastered… …or you can get help! Code Auditor can evaluate code quality and help ensure compliance with best practices for research software development. The project "Enabling Best Practices for Sustainable Software in the Natural and Engineering Sciences" with file number ICT.TDCC.002.001 of the research programme TDCC bottleneck projects is financed by the Dutch Research Council (NWO) However, implementing rapidly changing research software development best practices is challenging for research software developers*. A research software conformity check tool provides insights about the structure and content of a research software project. •Code and resource layout •Version control •License •Citation •Documentation •Code documentation •Packaging •Unit testing •Publishing •… HOW TO INSTALL? # Install the latest release pip install code-auditor # Install most up-to-date version from the repository pip install git+https://github.com/SS-NES/code-auditor # You can also install it as an isolated tool pipx install code-auditor HOW TO RUN ON THE TERMINAL? # Run a code audit on a local path and print the report to the terminal: codeauditor <path> # Run a code audit on the Code Auditor repository: codeauditor https://github.com/SS-NES/code-auditor # Run a code audit and save the report as a DOCX file: codeauditor <path> --format docx --output report.docx HOW TO RUN PROGRAMMATICALLY? # Import package import codeauditor # Generate the report report = codeauditor.audit("https://github.com/SS-NES/code-auditor") # Get the report output as Markdown out = report.output(format=codeauditor.report.OutputType.MARKDOWN) # Display output print(out) Code Auditor is composed of analysers and aggregators, which are dedicated to specific aspects of research software such as code quality, license, citation, version control, etc. Analysers analyse individual files in a project to extract metadata and identify file (or folder) specific issues. For example, Python code analyser analyses .py files and identifies if a specific well-know structure is used, if a coding style is consistently in use, if code documentation exists. Aggregators use the results of related analysers to provide a higher-level summary and identify issues that require information from multiple analysers. For example, code aggregator uses the results of Python, R, etc. analysers to provide overall source code completeness. Audit results can be obtained as humanand machine-readable reports in various formats, e.g. HTML, Markdown, JSON, YAML. Reports include summary of performed audit, identified best practices, identified issues, and suggestions for improvement. Audit results can be compared to reference metadata, e.g. SMP, to identify deviations. Audit results can be used as input to software templating tools to correct existing information or add additional ones. Audit results can also be used as input to SMP generation tools to update SMP according to the current state of software. Illustration by Storyset.com Illustration by Storyset.com Illustration by Storyset.com Illustration by Storyset.com Illustration by Storyset.com Illustration by Storyset.com