Skip to content

Sequence Metadata w/ Arguments#30

Merged
zimri-leisher merged 10 commits intofprime-community:develfrom
FireflySpace:Lex-ari-sequence-meta
Apr 2, 2026
Merged

Sequence Metadata w/ Arguments#30
zimri-leisher merged 10 commits intofprime-community:develfrom
FireflySpace:Lex-ari-sequence-meta

Conversation

@Lex-ari
Copy link
Copy Markdown

@Lex-ari Lex-ari commented Mar 23, 2026

Related Issue(s) fprime#4662 fprime#4181 fpy#27
Has Unit Tests (y/n) y
Documentation Included (y/n) n

Change Description

Preliminary sequence argument addition to Fpy sequences.
This uses a high level definition to define metadata at the top of sequences, including arguments to sequences.

Rationale

As per customer request, Fpy sequences need support for in-place arguments that may be called from other Fpy sequences. This is the first step towards creating a specific "arg" keyword for use in Fpy sequences

Testing/Review Recommendations

Run pytest

Future Work

  • Need replacement of arguments with actual values called from other sequences
  • Figure out call syntax for sequences with arguments
  • Ensure drop-in replacement of arguments to sequence arguments
  • Write Documentation for how to use sequences with arguments, as well as Sequence() metadata behavior

zimri-leisher and others added 4 commits February 19, 2026 22:05
…rime-community#26)

Change Description
Switch off of using the fprime-gds type API
Split up the old types.py into state.py, visitors.py and dictionary.py
New type system in types.py
Add anonymous struct and array expressions, which can be used to skip calling type constructors
Use struct/array field defaults from dictionary
Fw.TimeInterval is an alias now for Fw.TimeIntervalValue
Use FwTimeBase/ContextStoreType from the dictionary
Properly load constants with enum values from the dictionary
Allow trailing commas in param/arg lists, anon struct/arrays
Properly handle more domain errors in model

Breaking changes
Fw.Time.timeBase now takes a TimeBase enum value
Rename Fw.Time.time_context to timeContext, time_base to timeBase
Comment thread test/fpy/test_sequence_metadata.py Fixed
Comment thread src/fpy/grammar.lark Outdated
Comment thread src/fpy/semantics.py Outdated
Comment thread src/fpy/semantics.py Outdated
Comment thread src/fpy/semantics.py Outdated
Comment thread src/fpy/semantics.py Outdated
Comment thread src/fpy/semantics.py Outdated
Comment thread src/fpy/semantics.py Outdated
Comment thread src/fpy/semantics.py Outdated
Comment thread test/fpy/test_sequence_metadata.py
Comment thread test/fpy/test_sequence_metadata.py
@Lex-ari Lex-ari requested a review from zimri-leisher March 25, 2026 19:26
@zimri-leisher
Copy link
Copy Markdown
Collaborator

@Lex-ari in order to help me review, can you please click "resolved" on any comments you have addressed? I think there are some that you haven't addressed too

@zimri-leisher
Copy link
Copy Markdown
Collaborator

Here's a question: should we consider:

def sequence():
   pass

like, can the user define a callable called sequence? It might get confusing

@Lex-ari
Copy link
Copy Markdown
Author

Lex-ari commented Apr 2, 2026

sequence should be a reserved word

On second thought, we'll revisit

Comment thread src/fpy/semantics.py
if not is_instance_compat(root_node, AstIdent):
# not a qualified name
# skip for now
if group == NameGroup.TYPE:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this was an existing bug. you could do x: 6 = 6 and it would crash the compiler

@zimri-leisher zimri-leisher merged commit bd8cbd0 into fprime-community:devel Apr 2, 2026
7 of 8 checks passed
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.

3 participants