Skip to content
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

Refactor to Flask #1

Merged
merged 26 commits into from
Jul 10, 2023
Merged

Conversation

thomas-bc
Copy link
Member

Refactoring from NodeJS+Express to Python+Flask.

There's likely more that could be done/implemented, although it seems to be functional so I'm opening for first round of review.
I changed the usage from needing an .fpv-env for locating the JSON files to using a CLI argument, defaulting to current working directory. There's also a CLI option for selecting the theme.

Review/Test recommendation

git clone https://github.com/thomas-bc/fprime-visual
git checkout refactor/flask
pip install .
fprime-visual --source-dir examples
cd examples && fprime-visual
fprime-visual --theme light-seafoam

Future Work

Publish to PyPi

@thomas-bc thomas-bc requested review from LeStarch and bocchino June 16, 2023 03:32
@thomas-bc thomas-bc linked an issue Jun 16, 2023 that may be closed by this pull request
@thomas-bc thomas-bc linked an issue Jun 16, 2023 that may be closed by this pull request
@thomas-bc
Copy link
Member Author

Adresses nasa/fprime#2060

@thomas-bc thomas-bc closed this Jun 20, 2023
@thomas-bc thomas-bc reopened this Jun 20, 2023
Copy link
Contributor

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

Some things to think about. Also, long-term we should get away from a folders selection. The CLI should set the source folder (I think) and thus users should not need to set it.

src/fprime_visual/flask/app.py Outdated Show resolved Hide resolved
src/fprime_visual/flask/app.py Outdated Show resolved Hide resolved
src/fprime_visual/flask/app.py Outdated Show resolved Hide resolved
src/fprime_visual/flask/templates/index.html Outdated Show resolved Hide resolved
@thomas-bc
Copy link
Member Author

Introduced the following changes:

  • screenshot button
  • select-folder dropdown is hidden when only one folder is available

@thomas-bc thomas-bc merged commit b14b085 into fprime-community:main Jul 10, 2023
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.

2 participants