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

Feat: Builds even if version number is too short (i.e. not x.y.z format) #187

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

Ced-C
Copy link
Contributor

@Ced-C Ced-C commented Aug 22, 2024

Closes #144 by adding the required number of ".0" to match x.y.z format. instead of exiting, kalamine now replaces the version number such as:
1 → 1.0.0
1.2 → 1.2.0
if no version is provided, default value will be used

Closes OneDeadKey#144 by adding the required number of ".0" to match x.y.z format.
instead of exiting, kalamine now replaces the version number such as:
   1 → 1.0.0
 1.2 → 1.2.0
if no version is provided, default value will be used
Copy link
Collaborator

@fabi1cazenave fabi1cazenave left a comment

Choose a reason for hiding this comment

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

LGTM. Unit tests would be nice to have but that can come in a follow-up.

I’ve left a suggestion but I haven’t tested it. Can you have a look please?

version_check = cfg["version"].split(".")
if len(version_check) > 3:
raise Exception(
f"Layout version number **must** follow `x.y.z` format\nCurrently got `version={cfg['version']}`"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
f"Layout version number **must** follow `x.y.z` format\nCurrently got `version={cfg['version']}`"
f"""Layout version number **must** follow `x.y.z` format
Currently got `version={cfg['version']}`"""

Copy link
Contributor Author

Choose a reason for hiding this comment

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

suggestion works fine as well if “Currently“ is at the beginning of the line and not indented.

@fabi1cazenave fabi1cazenave merged commit b10d2fe into OneDeadKey:main Nov 12, 2024
15 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.

[klc] add .0 to the version number rather than exiting
2 participants