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

JST SH: Add suction cap MPNs and device name prefix #6

Merged
merged 2 commits into from
May 31, 2024

Conversation

nbes4
Copy link
Contributor

@nbes4 nbes4 commented May 30, 2024

SUMMARY

This PR adds:

  • MPNs for the BM variants that have a 'suction cap', indicated by an appended 'T' to the non-'suction cap' MPN
  • A StringAttribute FEATURES 'Suction Cap' for the new MPNs
  • Prefix all devices with 'JST ' (mind the whitespace)

See LibrePCB/librepcb-parts-generator#131 for the corresponding changes in the generator script

DATASHEETS / REFERENCES

none

OPEN QUESTIONS / UNRESOLVED ISSUES

none

CHECKLIST
  • I have read and followed the library conventions¹.
  • For packages, I followed IPC7351C (see details in library conventions).
  • For modified elements, I bumped their version number².
  • I already used the new library elements in a design and verified their correctness (optional).
  • I'm the copyright owner of the added content (i.e. the changes are made by myself, not copied/imported from somewhere else).
  • I agree to publish all my changes under the CC0 Public Domain License³, allowing everyone to use and modify the content without any restrictions.

¹ Library Conventions: https://docs.librepcb.org/#libraryconventions
² Minor version bump if only metadata was modified (e.g. "0.1" -> "0.1.1"), major version bump if functional changes were made (e.g. "0.1" -> "0.2")
³ CC0 Public Domain License: https://en.wikipedia.org/wiki/CC0

@nbes4
Copy link
Contributor Author

nbes4 commented May 30, 2024

I see it's the "non-canonical file" CI issue again, I thought I fixed it but forgot to run the librepcb-cli locally to verify. Will push an update.

Edit: Fixed now

Convert line endings from dos to unix for dot prefixed files, e.g. ".librepcb-pkg"
@ubruhin
Copy link
Contributor

ubruhin commented May 30, 2024

I see it's the "non-canonical file" CI issue again, I thought I fixed it but forgot to run the librepcb-cli locally to verify.

Ah, I suspect you are the first person using librepcb-parts-generator on Windows where it might generate CRLF line endings 🙈

Probably lines like this (in the entity classes):

with open(path.join(dir_path, '.librepcb-dev'), 'w') as f:

would need to be changed to this:

with open(path.join(dir_path, '.librepcb-dev'), 'w', newline='\n') as f:

to make it working correctly on Windows.

@ubruhin ubruhin changed the title Add suction cap MPNs and attrib; add 'JST ' dev prefix JST SH: Add suction cap MPNs and device name prefix May 31, 2024
@ubruhin ubruhin added enhancement Improving an existing library element. ready for review Waiting for review by maintainers. labels May 31, 2024
Copy link
Contributor

@ubruhin ubruhin left a comment

Choose a reason for hiding this comment

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

Diff looks good, thank you! 🎉

@ubruhin ubruhin merged commit 89d1e88 into LibrePCB-Libraries:master May 31, 2024
1 check passed
@nbes4
Copy link
Contributor Author

nbes4 commented May 31, 2024

Ah, I suspect you are the first person using librepcb-parts-generator on Windows where it might generate CRLF line endings 🙈

Yes, your suspicion is correct 😄 But usually git converts the line endings to LF upon commiting since I have core.autocrlf=true but it seems * -text inside the .gitattributes prevents this from happening. Maybe it'd be a good idea to change the .gitattributes to always use LF? Or use the code change you proposed with using newline='\n'.

Anyway, thanks for review & merge!

@ubruhin
Copy link
Contributor

ubruhin commented May 31, 2024

Maybe it'd be a good idea to change the .gitattributes to always use LF?

No, IMHO it's the responsibility of the tool (in this case librepcb-parts-generator) to generate the desired line endings, not the responsibility of Git. LibrePCB's file format clearly states that Unix line endings shall be used, so it's a bug in the generator not following this specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing library element. ready for review Waiting for review by maintainers.
Development

Successfully merging this pull request may close these issues.

2 participants