Skip to content

Aliases 'api' commands to 'flask'. - #497

Closed
tdstein wants to merge 1 commit into
masterfrom
tdstein/491
Closed

tdstein wants to merge 1 commit into
masterfrom
tdstein/491

Conversation

@tdstein

@tdstein tdstein commented Oct 16, 2023 •

Copy link
Copy Markdown
Collaborator

Intent

Renames commands using the api nomenclature to use flask instead.

Closes #491

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

This change adds the flask target to the deploy and write-manifest commands and deprecates the api target. Since api is designed for flask functionality, a new AppMode is not required. Instead, the AppModes.PTYHON_API is reused.

The existing api commands are marked as deprecated to ensure backward compatibility.

Automated Tests

Existing tests for the api command are refactored to use flask.

Directions for Reviewers

  • Try deploying an application using deploy flask.
  • Try writing a manifest using write-manifest flask.

Checklist

  • I have updated CHANGELOG.md to cover notable changes.
  • I have updated all related GitHub issues to reflect their current state.

@github-actions

github-actions Bot commented Oct 16, 2023 •

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4296 2793 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/actions.py 34% 🟢
rsconnect/main.py 55% 🟢
rsconnect/models.py 76% 🟢
rsconnect/timeouts.py 100% 🟢
TOTAL 66% 🟢

updated for commit: 6b53f22 by action🐍

@tdstein
tdstein marked this pull request as ready for review October 16, 2023 17:48

@mmarchetti mmarchetti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. TIL about click's deprecated flag.

@kgartland-rstudio

Copy link
Copy Markdown
Contributor

since we have a fastapi deployment type should this instead be flaskapi?

@aronatkins

Copy link
Copy Markdown
Collaborator

We have used the rsconnect deploy api command for other types, including Bottle, Falcon, pycnic, and simple WSGI applications. Are we explaining that the flask subcommand is still appropriate for these other types?

Should we continue to allow api as a not-deprecated command? I appreciate that the flask command makes Flask deployment more discoverable, but we're left with a different type of ambiguity for the remaining targets.

@tdstein

tdstein commented Oct 16, 2023

Copy link
Copy Markdown
Collaborator Author

We have used the rsconnect deploy api command for other types, including Bottle, Falcon, pycnic, and simple WSGI applications. Are we explaining that the flask subcommand is still appropriate for these other types?

Should we continue to allow api as a not-deprecated command? I appreciate that the flask command makes Flask deployment more discoverable, but we're left with a different type of ambiguity for the remaining targets.

Oh - I did not know that. I was working under the assumption that it only deployed Flask applications.

Let me make another pass taking this into account.

@tdstein

tdstein commented Oct 16, 2023

Copy link
Copy Markdown
Collaborator Author

See @aronatkins's comment above. I will open a new pull request when that work is ready.

@tdstein tdstein closed this Oct 16, 2023
@aronatkins

Copy link
Copy Markdown
Collaborator

@tdstein - you may want to also coordinate with the posit.cloud folks in case they have documentation that needs updating. I did a quick look at https://posit.cloud/learn/guide, but may have missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: rename rsconnect deploy api command to rsconnect deploy flask

4 participants