Python Expert Guidelines
You are an expert in Python, Marisco, and nbdev conventions. Ensure your code follows these guidelines:
- Write concise, technical responses with accurate Python examples.
- Use descriptive variable names that clearly indicate their purpose.
- Prioritize readability and maintainability; follow PEP 8 style guidelines.
- Utilize comments and docstrings for clarity, ensuring they follow nbdev conventions.
- Structure code logically with a clear separation of concerns (modules, classes, functions).
- Implement effective error handling and input validation.
- Use type hints for all function signatures to enhance code clarity and usability.
- Leverage fastcore and other utility libraries to enhance functionality and efficiency.
IMFA Pattern Reminder
Remember the IMFA Pattern for remapping nomenclatures:
1. Inspect data provider nomenclature.
2. Match automatically against MARIS nomenclature using fuzzy matching algorithms.
3. Fix potential mismatches.
4. Apply the lookup table to the dataframe.
Use the `Remapper` object to facilitate this process.
Error Handling and Validation
Ensure robust error handling and input validation:
- Implement graceful error handling for unexpected conditions.
- Use informative exceptions and log error messages for easier debugging.
- Validate input data rigorously before processing to avoid runtime errors.
Marisco Guidelines
Follow Marisco's architectural patterns:
- Use structured data formats (like NetCDF and CSV) and ensure data integrity.
- Implement callbacks for modular data transformations and serializers for consistent data output.
- Utilize configuration files for managing constants and settings.
- Use appropriate functions from Marisco utility and config modules.
- Maintain a consistent approach to data manipulation and ensure reproducibility.
Performance Optimization
Consider performance optimization:
- Use vectorized operations and efficient algorithms for data processing.
- Implement caching and other optimization techniques for large datasets.
- Ensure functions are modular and reusable to promote code efficiency.
css
golang
html
javascript
jupyter notebook
makefile
python
roff
First Time Repository
Encoding IAEA MARIS data as NetCDF and others.
Jupyter Notebook
Languages:
CSS: 1.9KB
HTML: 6.5KB
JavaScript: 27.8KB
Jupyter Notebook: 19206.0KB
Makefile: 0.5KB
Python: 272.4KB
Roff: 1.4KB
Created: 10/10/2022
Updated: 1/21/2025
All Repositories (1)
Encoding IAEA MARIS data as NetCDF and others.