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:
| File | Purpose |
|---|---|
*_sl.js | Suitelet JavaScript files |
*.html | HTML templates with Pyodide code |
/development/notebooks
Jupyter notebooks for local development:
| File | Purpose |
|---|---|
*_dev.ipynb | Development notebooks for each report |
tip
Use one notebook per report to keep things organized.
/development/test_data
Sample data exported from NetSuite:
| File | Purpose |
|---|---|
*_sample.json | Test data for each report |
README.md | Documents data structure |
/development/test_output
Generated Excel files for testing:
| File | Purpose |
|---|---|
*.xlsx | Generated test reports |
.gitkeep | Keeps 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
| Type | Pattern | Example |
|---|---|---|
| Suitelet | {prefix}_{name}_sl.js | issu_aging_report_sl.js |
| HTML | {prefix}_{name}.html | issu_aging_report.html |
| Notebook | {name}_dev.ipynb | aging_report_dev.ipynb |
| Test Data | {name}_sample.json | aging_data_sample.json |