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

Use 🏡️ for added/updated annotations #1802

Open
4 tasks done
realpixelcode opened this issue Sep 20, 2024 · 4 comments
Open
4 tasks done

Use 🏡️ for added/updated annotations #1802

realpixelcode opened this issue Sep 20, 2024 · 4 comments
Labels
emoji Gitmoji proposals.

Comments

@realpixelcode
Copy link

Emoji symbol

🏡️

Emoji code

🏡️

Emoji description

Added/Updated annotations, decorators etc.

Describe the use case of your emoji

Sometimes, all you do in a commit is updating annotations/decorators of methods or fields, especially something like @NonNull , @Nullable, @Contract, @Getter, @Setter etc. Using the 🏡️ emoji, which represents artistic rosette ornaments present on tiles, statues, building facades and the like for decorative purposes, would fit this job quite well.

The currently best-fitting Gitmoji would probably be ♻️, but β€œrefactoring” does not accurately describe modifying annotations specifically.

Is this use case covered by an existing emoji?

No ❌

Does this emoji fall into the "how" or the "what" category?

  • This proposal do not describe "how" a commit was made, but does in fact describe "what" is the contents of the commit about.

Examples

  • 🏡️ Add @NonNull
  • 🏡️ Update @Contracts
  • 🏡️ Override @Getters

Validations

@realpixelcode realpixelcode added the emoji Gitmoji proposals. label Sep 20, 2024
@jorenham
Copy link

jorenham commented Dec 6, 2024

I use gitmoji for scipy-stubs, the official typing stubs package for SciPy. Because it's a stubs-only package, most of the commits are either additions or changes to annotations. But I don't really find it useful to annotate all of those with 🏡️.
I can imagine that there are more stubs-only packages that feel this way too.

So perhaps we could split this up into e.g. additions, changes, deletions or annotations, and perhaps also one for a refactoring/cleanup of code related to static typing?

Given the original meaning of "annotation", and considering the static and formal nature of type annotations, we could for instance use πŸ“Ž for additions, βœ’οΈ for updates, βœ‚οΈ for deletions, and perhaps πŸ“ for refactoring/cleanup.

@realpixelcode
Copy link
Author

realpixelcode commented Dec 7, 2024

most of the commits are either additions or changes to annotations. But I don't really find it useful to annotate all of those with 🏡️.

There are already plenty of Gitmojis that don't differentiate between adding, updating and removing:

  • πŸ“ = Add or update documentation.
  • πŸ’„ = Add or update the UI and style files.
  • βœ… = Add, update or pass tests.
  • πŸ” = Add or update secrets.
  • πŸ‘· = Add or update CI build system.
  • πŸ“ˆ = Add or update analytics […]
  • πŸ”§ = Add or update configuration files.
  • πŸ”¨ = Add or update development scripts.
  • πŸ“¦οΈ = Add or update compiled files […]
  • πŸ“„ = Add or update licence.
  • 🍱 = Add or update assets.
  • πŸ’‘ = Add or update comments […]
  • πŸ’¬ = Add or update text and literals.
  • πŸ”Š = Add or update logs.
  • πŸ‘₯ = Add or update contributors.
  • πŸ₯š = Add or update an Easter egg.
  • πŸ™ˆ = Add or update .gitignore.
  • πŸ“Έ = Add or update snapshots.
  • 🏷️ = Add or update types.
  • 🌱 = Add or update seed files.
  • 🚩 = Add, update or remove feature flags.
  • πŸ’« = Add or update animations and transitions.
  • πŸ‘” = Add or update business logic.
  • 🩺 = Add or update health check.
  • 🧡 = Add or update concurrency.
  • 🦺 = Add or update validation.

Considering the fact that there are many test-only repos, UI-only repos, licence-only repos, documentation-only repos, assets-only repos etc. out there, I believe that adding 🏡️ as β€œAdding or updating annotations and decorators” would still fit the overall Gitmoji theme, even though 🏡️ wouldn't be too useful to scipy-stubs.

In other words, if your entire code is just annotations, then you should probably use βœ¨β™»οΈπŸ”₯⚰️, because it would be obvious that you're referring to annotations. (Similarly, test-only repos shouldn't bother using βœ…πŸ§ͺ either.)

we could for instance use πŸ“Ž for additions, βœ’οΈ for updates, βœ‚οΈ for deletions, and perhaps πŸ“ for refactoring/cleanup

I think there three options:

  1. Using πŸ“Žβœ’οΈβœ‚οΈπŸ“ exclusively for annotations. I'm not a fan of this, because these emoji are too generic for that purpose.
  2. Using πŸ“Žβœ’οΈβœ‚οΈπŸ“ not just for annotations but as generic Gitmojis for any code changes. Though, refactoring is already covered by ♻️, and removals are covered by πŸ”₯. πŸ“Ž for additions would still be useful even though ✨ exists, because not all additions necessarily introduce new features (depending on your perception of the term).
  3. Introducing πŸ“Žβœ’οΈβœ‚οΈπŸ“ as modifiers that can be added to existing Gitmojis, for example:
  • βœ…πŸ“Ž = adding a passing test
  • πŸ΅οΈβœ’οΈ = updating an annotation
  • πŸ’„πŸ”₯ = removing a UI file
  • πŸ“ˆβ™»οΈ = refactoring analytics

In my own repos, I already do sometimes combine two or three Gitmojis to make a more precise statement, so I would be fine with the third option. But it would be a major change to the core concept of Gitmoji and would very likely face harsh resistance from other Gitmoji users and would facilitate incompatibility bugs for Gitmoji scripts.

Therefore, I would prefer option two and propose using πŸ“Žβœ’οΈπŸ”₯♻️ instead of πŸ“Žβœ’οΈβœ‚οΈπŸ“.

Given the original meaning of "annotation", and considering the static and formal nature of type annotations

Could you perhaps elaborate on this? I proposed 🏡️ specifically with Java annotations in mind, as I'm not too familiar with annotations/decorators in other languages, especially not in Python.

Basically, in Java, @NonNull means that a class field (variable) must never be null (undefined), and if it is null at some point, the program will exit. @Getter will automatically (at compile time) create a getter method for an annotated class field. That's some use cases I had in mind when creating this proposal.

@jorenham
Copy link

jorenham commented Dec 9, 2024

Wow, thanks for the elaborate response @realpixelcode 🀯!


In my own repos, I already do sometimes combine two or three Gitmojis to make a more precise statement, so I would be fine with the third option. But it would be a major change to the core concept of Gitmoji and would very likely face harsh resistance from other Gitmoji users and would facilitate incompatibility bugs for Gitmoji scripts.

Therefore, I would prefer option two and propose using πŸ“Žβœ’οΈπŸ”₯♻️ instead of πŸ“Žβœ’οΈβœ‚οΈπŸ“.

I really like this idea. It kinda makes me wonder what the optimal set of "atomic" gitmoji's would be, with which all of the current ones could be expressed using a combination of such atomic gitmoji's πŸ€”. I suppose that they'd be more like tags then labels that way.


Could you perhaps elaborate on this? I proposed 🏡️ specifically with Java annotations in mind, as I'm not too familiar with annotations/decorators in other languages, especially not in Python.

Java is statically typed language, but Python is a gradually typed language, meaning that type annotations are optional, and they don't even need to be valid for the "program" (script) to run. Type-checking is done via 3rd party static type-checkers.
A consequence of this is that not all Python libraries annotate their codebase. And if you need to use such unannotated library, but still want to annotate your own code, then you're going to have to use typing stubs. An example of this is scipy, which is unannotated mainly because it predates the introduction of gradual typing into Python. Since I care about typing and frequently use scipy in several of my projects, I developed 'scipy-stubs' as a separate, stubs-only package, so that anyone can benefit from the improved IDE support and type-hinting that these type-annotations result in.

@cruzdanilo
Copy link

some previous discussion about multiple emojis: #1334 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emoji Gitmoji proposals.
Projects
None yet
Development

No branches or pull requests

3 participants