Skip to content

Commit b3b98b7

Browse files
authored
Pre-release changes (#195)
* Deprecate fprime-util new --project * Declutter output of version-check * Update CodeQL action * spelling and formatting
1 parent d76b216 commit b3b98b7

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

.github/workflows/codeql-security-scan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
# Initializes the CodeQL tools for scanning.
3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@v2
32+
uses: github/codeql-action/init@v3
3333
with:
3434
languages: ${{ matrix.language }}
3535
config-file: ./.github/actions/codeql/security-pack.yml

src/fprime/util/commands.py

+19-6
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ def run_info(
5959
f"'{target}'": "" for target in build_info.get("global_targets", [])
6060
}
6161
build_artifacts = (
62-
build_info.get("auto_location")
63-
if build_info.get("auto_location") is not None
64-
else "N/A",
62+
(
63+
build_info.get("auto_location")
64+
if build_info.get("auto_location") is not None
65+
else "N/A"
66+
),
6567
build_info.get("build_dir", "Unknown"),
6668
)
6769
local_generic_targets.update(local_targets)
@@ -194,10 +196,10 @@ def run_version_check(
194196
try:
195197
import platform
196198

197-
print(f"Python version: {platform.python_version()}")
198199
print(f"Operating System: {platform.system()}")
199200
print(f"CPU Architecture: {platform.machine()}")
200201
print(f"Platform: {platform.platform()}")
202+
print(f"Python version: {platform.python_version()}")
201203
except ImportError: # Python >=3.6
202204
print("[WARNING] Cannot import 'platform'.")
203205

@@ -228,9 +230,20 @@ def run_version_check(
228230
return
229231

230232
print("Pip packages:")
233+
# Used to print fprime-fpp-* versions together if they are all the same to de-clutter the output
234+
fpp_packages = {}
231235
for tool in FPRIME_PIP_PACKAGES:
232236
try:
233237
version = pkg_resources.get_distribution(tool).version
234-
print(f" {tool}=={version}")
235-
except (OSError, VersionException) as exc:
238+
if tool.startswith("fprime-fpp-"):
239+
fpp_packages[tool] = version
240+
else:
241+
print(f" {tool}=={version}")
242+
except (OSError, VersionException, pkg_resources.DistributionNotFound) as exc:
236243
print(f"[WARNING] {exc}")
244+
if fpp_packages:
245+
if len(set(fpp_packages.values())) == 1:
246+
print(f" fprime-fpp-*=={list(fpp_packages.values())[0]}")
247+
else:
248+
for tool, version in fpp_packages.items():
249+
print(f" {tool}=={version}")

src/fprime/util/cookiecutter_wrapper.py

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" Cookie cutter wrapper used to template out components
22
"""
3+
34
import glob
45
import os
56
import shutil
@@ -227,6 +228,13 @@ def new_module(build: Build, parsed_args: "argparse.Namespace"):
227228
def new_project(parsed_args: "argparse.Namespace"):
228229
"""Creates a new F' project"""
229230

231+
print(
232+
"[DEPRECATED] This command is deprecated and will be removed in a future release."
233+
" Please use `fprime-bootstrap project` instead."
234+
" Install fprime-bootstrap with `pip install fprime-bootstrap`,"
235+
" or refer to https://nasa.github.io/fprime/INSTALL.html"
236+
)
237+
230238
# Check if Git is installed and available - needed for cloning F' as submodule
231239
if not shutil.which("git"):
232240
print(

src/fprime/util/help_text.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,8 @@
282282
283283
Usage:
284284
-- New Project --
285-
Generate a new F' project. This will create a Git repository and add F' as a submodule, optionally creating a new
286-
virtual environment. Defaults to current directory, but --path can be used to point to a different location.
287-
Using --overwrite will overwrite only the files that are generated by the new project.
285+
Generating a new project is now available through the fprime-bootstrap package. Please see the F´ Install Guide
286+
at https://nasa.github.io/fprime/INSTALL.html for instructions on how to install and use fprime-bootstrap.
288287
-- New Deployment --
289288
Generate a new F' deployment within a F' project. The new deployment command is expected to be ran at the root of
290289
the project and will create a new deployment in the current directory. Using --overwrite will overwrite only the

0 commit comments

Comments
 (0)