Skip to main content

Recommended Project Structure

Directory Layout​

netsuite_reports/
├── suitelet/
│ ├── xxxx_aging_report_sl.js
│ ├── xxxx_aging_report.html
│ └── xxxx_custom_report_sl.js
│
├── development/
│ ├── notebooks/
│ │ ├── aging_report_dev.ipynb # Jupyter development
│ │ └── table4_bb_dev.ipynb
│ │
│ ├── test_data/
│ │ ├── aging_data_sample.json # Exported from NetSuite
│ │ ├── table4_data_sample.json
│ │ └── README.md # Data structure notes
│ │
│ └── test_output/
│ └── .gitkeep
│
├── requirements.txt
└── README.md

File Descriptions​

/suitelet​

Contains production NetSuite files:

FilePurpose
*_sl.jsSuitelet JavaScript files
*.htmlHTML templates with Pyodide code

/development/notebooks​

Jupyter notebooks for local development:

FilePurpose
*_dev.ipynbDevelopment notebooks for each report
tip

Use one notebook per report to keep things organized.

/development/test_data​

Sample data exported from NetSuite:

FilePurpose
*_sample.jsonTest data for each report
README.mdDocuments data structure

/development/test_output​

Generated Excel files for testing:

FilePurpose
*.xlsxGenerated test reports
.gitkeepKeeps folder in Git (actual outputs ignored)

Requirements File​

requirements.txt
pandas>=1.5.0
xlsxwriter>=3.0.0
numpy>=1.23.0
jupyter>=1.0.0
openpyxl>=3.0.0

Install with:

pip install -r requirements.txt

Git Configuration​

.gitignore​

.gitignore
# Python
__pycache__/
*.py[cod]
*.pyo
.Python
venv/
.env

# Jupyter
.ipynb_checkpoints/
*.ipynb_checkpoints

# Test outputs (don't commit generated files)
development/test_output/*.xlsx

# IDE
.vscode/
.idea/

# OS
.DS_Store
Thumbs.db

Working with Multiple Reports​

When you have multiple reports, maintain parallel structures:

development/
├── notebooks/
│ ├── aging_report_dev.ipynb
│ ├── sales_report_dev.ipynb
│ └── inventory_report_dev.ipynb
│
└── test_data/
├── aging_data_sample.json
├── sales_data_sample.json
└── inventory_data_sample.json

Best Practices​

1. One Notebook Per Report​

Each report should have its own development notebook for isolation and clarity.

2. Version Test Data​

Keep test data files in version control so team members can run notebooks immediately.

3. Document Data Structure​

In test_data/README.md, document:

  • Expected columns
  • Data types
  • Sample values
  • How to export from NetSuite

4. Don't Commit Test Outputs​

Add generated Excel files to .gitignore to keep the repo clean.

5. Use Consistent Naming​

TypePatternExample
Suitelet{prefix}_{name}_sl.jsissu_aging_report_sl.js
HTML{prefix}_{name}.htmlissu_aging_report.html
Notebook{name}_dev.ipynbaging_report_dev.ipynb
Test Data{name}_sample.jsonaging_data_sample.json