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

SignalEntry with csv file + refactorings #7

Merged
merged 59 commits into from
Oct 13, 2023
Merged

Conversation

Saskia-K
Copy link
Collaborator

new

  • added option to read & write signal entries with csv files
  • changed writing of binary signal entries to match the reading

changed

  • moved channel naming and data type inference to separate methods
  • simplified _get_index and Entry.add_entry, CustomAttributes.to_element
    -> caution: stacked entries will still be removed only partially with remove_entry()
  • separated remove_entry method for unisens class
  • restricted read_unisens to internal use
  • fixed writability of attrib when passed at initialization
  • setting kwargs always with set_attrib independent of passing to init or set_data
  • removed cause for _autosave exception: always have a _parent attribute (even when copying)
  • removed unreachable code and removed 'return True' where raising exceptions instead of returning False
  • refactored paths: no addition of strings, using os.path...
  • many minor additions in formatting, typing, comments and docstrings

@skjerns
Copy link
Collaborator

skjerns commented Sep 26, 2023

(not sure if @jottenbacher actively reads github, maybe you want to shoot him an email instead referencing this PR)

@Saskia-K
Copy link
Collaborator Author

Saskia-K commented Oct 5, 2023

Updated description of changes:

new

  • added option to read & write SignalEntry with csv file

changed

  • moved channel naming and data type inference to separate methods
  • simplified Entry._get_index() and Entry.add_entry(), CustomAttributes.to_element()
    -> caution: stacked entries will still be removed only partially with Entry.remove_entry()
  • separate remove_entry method for Unisens class
  • fixed writability of attrib when passed at initialization
  • setting kwargs always with set_attrib independent of passing to __init__ or set_data
  • removed cause for exception in Entry._autosave(): always have a _parent attribute (even when copying)
  • removed unreachable code and removed 'return True' where raising exceptions instead of returning False
  • refactored paths: no addition of strings, using os.path...
  • many minor additions in formatting, typing, comments and docstrings

deprecated

  • read_unisens: will be restricted to internal use
  • SignalEntry.get_data() default value for argument scaled: will change from True to False, matching Java implementations SignalEntry.read() and SignalEntry.readScaled()
  • SignalEntry.get_data() argument return_type: argument is unused and will be removed
  • Entry subclass CustomAttribute: no use since it doesn't match CustomAttributes.add_entry(); usable alternative is CustomAttributes.set_attrib()

@Saskia-K
Copy link
Collaborator Author

Updates to the last description of changes:

new

  • added option to read & write SignalEntry with csv file

changed

  • moved channel naming and data type inference to separate methods
  • simplified Entry._get_index() and Entry.add_entry(), CustomAttributes.to_element()
    -> caution: stacked entries will still be removed only partially with Entry.remove_entry()
  • separate remove_entry method for Unisens class
  • fixed writability of attrib when passed at initialization
  • setting kwargs always with set_attrib independent of passing to __init__ or set_data
  • removed cause for exception in Entry._autosave(): always have a _parent attribute (even when copying)
  • removed unreachable code and removed 'return True' where raising exceptions instead of returning False
  • refactored paths: no addition of strings, using os.path...
  • many minor additions in formatting, typing, comments and docstrings

deprecated

  • read_unisens: will be restricted to internal use
  • SignalEntry.get_data() default value for argument scaled: will change from True to False, matching Java implementations SignalEntry.read() and SignalEntry.readScaled()
  • SignalEntry.get_data() argument return_type: argument is unused and will be removed
  • Entry subclass CustomAttribute: no use since it doesn't match CustomAttributes.add_entry(); usable alternative is CustomAttributes.set_attrib()
  • SignalEntry / ValuesEntry.set_data() will require channel names (deprecating the automatic naming). They can be supplied by passing the argument ch_names or by copying and passing the channel attribute from another entry. In the future, channels will be used to verify data orientation.

@Saskia-K Saskia-K merged commit 8a0a42b into Unisens:master Oct 13, 2023
12 checks passed
@Saskia-K
Copy link
Collaborator Author

@skjerns would you please add me as collaborator for the corresponding PyPI project or upload the new release yourself?

@skjerns
Copy link
Collaborator

skjerns commented Oct 16, 2023

sure, what's your username there?

also saskia-k?

@skjerns
Copy link
Collaborator

skjerns commented Oct 16, 2023

Might make sense to create a GitHub action for automatic wheel upload on release creation

e.g. using https://github.com/pypa/cibuildwheel

@Saskia-K
Copy link
Collaborator Author

Yes, my PyPI user name is Saskia-K too.
For the extensive version of an automatic upload, I currently don't have the capacity. I can set up a basic actions script though.

@skjerns
Copy link
Collaborator

skjerns commented Oct 23, 2023

Perfect, then I added the right Saskia-K. Let me know if there's anything else I can do.

@Saskia-K
Copy link
Collaborator Author

Sorry for the late reply. Shouldn't I have received an email or anything for the PyPI access? This is my account: https://pypi.org/user/Saskia-K/

@skjerns
Copy link
Collaborator

skjerns commented Oct 30, 2023

I think the invite expired. Try again

image

@Saskia-K
Copy link
Collaborator Author

Merci beaucoup :)

@Saskia-K
Copy link
Collaborator Author

Sorry, to bother you again. Do you have access to Settings / Security / Secrets and variables ? The actions workflow would need an API token (secrets.PYPI_API_TOKEN) which I don't have the rights to insert.

@skjerns
Copy link
Collaborator

skjerns commented Oct 30, 2023

Nope, @jottenbacher needs to do that or give you full repo admin rights.

@Saskia-K
Copy link
Collaborator Author

@mkirst just added my token for us. So we can test the workflow with the next release. I uploaded version 1.5.0 manually yesterday.

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