aws / sagemaker-python-sdk
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
txt
jsonl
pt
pb
ini
in
proto
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.

main84824 LOC (27%) 519 files
test181778 LOC (58%) 769 files
generated0 LOC (0%) 0 files
build and deployment45 LOC (<1%) 3 files
other46225 LOC (14%) 306 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 519 files match defined criteria (84,824 LOC, 100.0% vs. main code):
    • 516 *.py files (84,620 LOC)
    • 1 *.proto files (104 LOC)
    • 1 *.toml files (86 LOC)
    • 1 *.in files (14 LOC)
  • " *.py" is biggest, containing 99.76% of LOC.
  • " *.in" is smallest, containing 0.02% of LOC.


*.py84620 LOC (99%) 516 files
*.proto104 LOC (<1%) 1 file
*.toml86 LOC (<1%) 1 file
*.in14 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
jsonl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[-]test[-].*".
  • 769 files match defined criteria (181,778 LOC, 214.3% vs. main code):
    • 737 *.py files (177,172 LOC)
    • 5 *.jsonl files (2,090 LOC)
    • 4 *.ipynb files (2,058 LOC)
    • 17 *.yaml files (369 LOC)
    • 5 *.sh files (83 LOC)
    • 1 *.java files (6 LOC)
  • " *.py" is biggest, containing 97.47% of LOC.
  • " *.java" is smallest, containing 0% of LOC.


*.py177172 LOC (97%) 737 files
*.jsonl2090 LOC (1%) 5 files
*.ipynb2058 LOC (1%) 4 files
*.yaml369 LOC (<1%) 17 files
*.sh83 LOC (<1%) 5 files
*.java6 LOC (<1%) 1 file
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 ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 3 files match defined criteria (45 LOC, 0.1% vs. main code):
    • 1 *.bat files (28 LOC)
    • 2 *.sh files (17 LOC)
  • " *.bat" is biggest, containing 62.22% of LOC.
  • " *.sh" is smallest, containing 37.78% of LOC.


*.bat28 LOC (62%) 1 file
*.sh17 LOC (37%) 2 files
Other Code
pb
txt
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]pb".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 306 files match defined criteria (46,225 LOC, 54.5% vs. main code):
    • 91 *.json files (23,603 LOC)
    • 167 *.rst files (14,234 LOC)
    • 3 *.md files (4,589 LOC)
    • 4 *.pb files (2,231 LOC)
    • 39 *.txt files (1,388 LOC)
    • 2 *.ini files (180 LOC)
  • " *.json" is biggest, containing 51.06% of LOC.
  • " *.ini" is smallest, containing 0.39% of LOC.


*.json23603 LOC (51%) 91 files
*.rst14234 LOC (30%) 167 files
*.md4589 LOC (9%) 3 files
*.pb2231 LOC (4%) 4 files
*.txt1388 LOC (3%) 39 files
*.ini180 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-03 23:53