generated from iiasa/python-stub
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Add section 'requirements for processing modules' #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            8 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      91f8adf
              
                Add section 'requirements for processing modules'
              
              
                phackstock de172cb
              
                Set minimum python requirement to 3.10
              
              
                phackstock ccaddaa
              
                Move processing requirements into user guide
              
              
                phackstock faa03a7
              
                Limit heading depth to 1 for links
              
              
                phackstock 82df17e
              
                Remove requirements for processing modules after moving it in its own…
              
              
                phackstock 630f3de
              
                Apply suggestions from code review
              
              
                phackstock 79288fa
              
                Merge branch 'main' into feature/requirements-for-processing-modules
              
              
                danielhuppmann 3c7069a
              
                Reinsert section on local processing of workflows
              
              
                danielhuppmann File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| .. _processing-requirements: | ||
|  | ||
| Requirements for processing modules | ||
| =================================== | ||
|  | ||
| Any module (a.k.a. program, code or tool) must adhere to the following standards of | ||
| best-practice software development. The aim of these guidelines is to ensure reliability | ||
| of our services, minimize maintenance requirements, and guarantee reproducibility of | ||
| results across platforms. | ||
|  | ||
| General requirements | ||
| -------------------- | ||
|  | ||
| - The program, code or tool must be implemented in Python (≥3.10) or R; compiled | ||
| executables are not acceptable for security reasons | ||
| - Distribution of the source code | ||
| - via an online version-controlled repository | ||
| (preferably GitHub) to which the IIASA admin team has access; or | ||
| - installation via a package manager (pip, conda, CRAN). | ||
| - The program must run on Debian (preferably Ubuntu) | ||
| - The dependencies must be clearly stated, | ||
| e.g. as Dockerfile (describing execution environment, library dependencies etc.) | ||
| Python package dependencies according to packaging user guide (e.g. as environment.yml, requirements.txt etc.) | ||
| R dependencies | ||
| - The license must be clearly stated. | ||
| - The documentation of the program, code or tool must include: | ||
| - Purpose of the program and individual top-level functions | ||
| - Instructions how to run the program | ||
| - Expected input (variables, region mappings) and standard output | ||
| - Explanation of any settings and optional parameters | ||
|  | ||
| Application programming interface | ||
| --------------------------------- | ||
|  | ||
| **Option 1**: | ||
|  | ||
| The module is called via a command-line interface (CLI) | ||
| and take the following arguments: | ||
|  | ||
| - :code:`input`: path to an IAMC-formatted file (:code:`xlsx` or :code:`csv`) | ||
| - :code:`output`: path where to write an output file | ||
| (usually derived timeseries data) in the same format | ||
| - Any relevant settings and optional parameters must also be specified | ||
| via the CLI | ||
|  | ||
| e.g. :code:`"python process.py --input path-to-input-file.xlsx --output path-to-output-file.xlsx"` | ||
|  | ||
| **Option 2** (applicable for packages/functions written in Python): | ||
|  | ||
| Importable Python functions that take and return :class:`pandas.DataFrame` (with columns | ||
| folllowing the IAMC format) or :class:`pyam.IamDataFrame` objects can be called as part | ||
| of the processing workflow. Any settings or optional parameters must be given as keyword | ||
| arguments to the top-level function, preferably with the option to set them via a | ||
| settings or configuration file. | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.