Skip to content

Commit

Permalink
Merge pull request #2199 from posit-dev/mm-shiny-express-entrypoint
Browse files Browse the repository at this point in the history
Add PyShiny entrypoint to Files list
  • Loading branch information
mmarchetti authored Aug 28, 2024
2 parents b4d98f4 + bae1225 commit 711e289
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions internal/inspect/detectors/pyshiny.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func (d *pyShinyDetector) InferType(base util.AbsolutePath, entrypoint util.Rela
} else {
cfg.Entrypoint = relEntrypoint.String()
}
cfg.Files = append(cfg.Files, relEntrypoint.String())

cfg.Type = config.ContentTypePythonShiny
// indicate that Python inspection is needed
cfg.Python = &config.Python{}
Expand Down
8 changes: 4 additions & 4 deletions internal/inspect/detectors/pyshiny_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (s *PyShinySuite) TestInferType() {
Type: config.ContentTypePythonShiny,
Entrypoint: filename,
Validate: true,
Files: []string{},
Files: []string{filename},
Python: &config.Python{},
}, configs[0])
}
Expand All @@ -66,7 +66,7 @@ func (s *PyShinySuite) TestInferTypeShinyExpress() {
Type: config.ContentTypePythonShiny,
Entrypoint: "shiny.express.app:app_2e_py",
Validate: true,
Files: []string{},
Files: []string{filename},
Python: &config.Python{},
}, configs[0])
}
Expand Down Expand Up @@ -95,7 +95,7 @@ func (s *PyShinySuite) TestInferTypeWithEntrypoint() {
Type: config.ContentTypePythonShiny,
Entrypoint: filename,
Validate: true,
Files: []string{},
Files: []string{filename},
Python: &config.Python{},
}, configs[0])
}
Expand Down Expand Up @@ -123,7 +123,7 @@ func (s *PyShinySuite) TestInferTypeWithExtraFile() {
Type: config.ContentTypePythonShiny,
Entrypoint: filename,
Validate: true,
Files: []string{},
Files: []string{filename},
Python: &config.Python{},
}, configs[0])
}

0 comments on commit 711e289

Please sign in to comment.