pytorch / botorch
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
pt
in
cfg
txt
  • 18 extensions are included in analyses: py, ipynb, md, rst, svg, js, yml, sh, css, json, pt, in, cfg, gitignore, toml, txt, bat, yaml
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (16 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (14 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main21923 LOC (46%) 144 files
test23672 LOC (49%) 120 files
generated0 LOC (0%) 0 files
build and deployment260 LOC (<1%) 5 files
other1681 LOC (3%) 28 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 144 files match defined criteria (21,923 lines of code, 100.0% vs. main code):
    • 119 *.py files (17,214 lines of code)
    • 7 *.ipynb files (2,493 lines of code)
    • 5 *.css files (1,422 lines of code)
    • 9 *.js files (762 lines of code)
    • 1 *.yml files (10 lines of code)
    • 1 *.cfg files (9 lines of code)
    • 1 *.in files (7 lines of code)
    • 1 *.toml files (6 lines of code)
  • " *.py" is biggest, containing 78.52% of code.
  • " *.toml" is smallest, containing 0.03% of code.


*.py17214 LOC (78%) 119 files
*.ipynb2493 LOC (11%) 7 files
*.css1422 LOC (6%) 5 files
*.js762 LOC (3%) 9 files
*.yml10 LOC (<1%) 1 files
*.cfg9 LOC (<1%) 1 files
*.in7 LOC (<1%) 1 files
*.toml6 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
  • 120 files match defined criteria (23,672 lines of code, 108.0% vs. main code):
    • 119 *.py files (23,661 lines of code)
    • 1 *.sh files (11 lines of code)
  • " *.py" is biggest, containing 99.95% of code.
  • " *.sh" is smallest, containing 0.05% of code.


*.py23661 LOC (99%) 119 files
*.sh11 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
  • 5 files match defined criteria (260 lines of code, 1.2% vs. main code):
    • 4 *.sh files (233 lines of code)
    • 1 *.bat files (27 lines of code)
  • " *.sh" is biggest, containing 89.62% of code.
  • " *.bat" is smallest, containing 10.38% of code.


*.sh233 LOC (89%) 4 files
*.bat27 LOC (10%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]txt".
  • 28 files match defined criteria (1,681 lines of code, 7.7% vs. main code):
    • 7 *.md files (879 lines of code)
    • 14 *.rst files (529 lines of code)
    • 4 *.json files (222 lines of code)
    • 3 *.svg files (51 lines of code)
  • " *.md" is biggest, containing 52.29% of code.
  • " *.svg" is smallest, containing 3.03% of code.


*.md879 LOC (52%) 7 files
*.rst529 LOC (31%) 14 files
*.json222 LOC (13%) 4 files
*.svg51 LOC (3%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.py files are analyzed with PythonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.ipynb files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.css files are analyzed with CssAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.js files are analyzed with JavaScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.yml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.cfg files are analyzed with CfgAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.in files are analyzed with RustAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.toml files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-04-15 01:16