- 
                Notifications
    You must be signed in to change notification settings 
- Fork 115
test(templates): test py-shiny templates #1998
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
            
            
          Conversation
  
    
      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
    
  
  
    
    Deleted the unused 'Any' import from typing to clean up the code in tests/playwright/shiny/components/data_frame/edit/app.py.
Added two deprecation warning messages related to DatetimeIndex.format and Series.__getitem__ to the app_allow_external_errors list, as these are triggered by the cufflinks package.
Added conditional steps to skip installing py-shiny-templates dependencies and running example app tests for Python 3.9, due to scikit-learn 1.7.0+ requiring Python 3.10 or higher.
Added a pytest skipif marker to skip test_external_templates on Python 3.9, as the required scikit-learn version is only supported on Python 3.10 and above.
              
                    schloerke
  
              
              reviewed
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
              
                    schloerke
  
              
              reviewed
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
              
                    schloerke
  
              
              reviewed
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
              
                    schloerke
  
              
              reviewed
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
              
                    schloerke
  
              
              reviewed
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
              
                    schloerke
  
              
              reviewed
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
      Comment on lines
    
      269
     to 
      270
    
  
  | error_locator = page.locator(".shiny-output-error") | ||
| expect(error_locator).to_have_count(0, timeout=ERROR_ELEMENT_TIMEOUT) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that this will check all apps for any output errors. 🎉 !
…t-dev/py-shiny into run-py-shiny-template-tests
              
                    schloerke
  
              
              approved these changes
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
              
                    schloerke
  
              
              reviewed
              
                  
                    Jul 21, 2025 
                  
              
              
            
            
      Comment on lines
    
      -116
     to 
      -120
    
  
  | # langsmith (needed for langchain_core) versions >= 0.3 | ||
| # (up to at least 0.3.2 as of 2025-01-29) | ||
| # cause an `argparse.ArgumentError` when running `pytest`. | ||
| # https://github.com/posit-dev/py-shiny/issues/1829 | ||
| "langsmith<0.3", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: #1829
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  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.
  
    
  
    
The most significant changes include adding support for the
py-shiny-templatesrepository, enhancing Playwright test configurations, and introducing new tests for external templates.Support for
py-shiny-templatesrepository:py-shiny-templatesrepository and install its dependencies for Python versions 3.10 and above.install-py-shiny-templates-depstarget to install dependencies from thepy-shiny-templatesrepository.Enhancements to Playwright test configurations:
SHINY_INIT_TIMEOUTandERROR_ELEMENT_TIMEOUT) and updated error handling to check for Shiny output errors, excluding known exceptions.New tests for external templates:
py-shiny-templatesrepository. The test is skipped for Python 3.9 due to dependency constraints and runs only on Chromium browsers.