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

[fix] Update contracts variable and function names #193

Closed
adrianvrj opened this issue Nov 6, 2024 · 23 comments · Fixed by #244
Closed

[fix] Update contracts variable and function names #193

adrianvrj opened this issue Nov 6, 2024 · 23 comments · Fixed by #244
Assignees
Labels
easy good first issue Good for newcomers help wanted Extra attention is needed

Comments

@adrianvrj
Copy link
Member

adrianvrj commented Nov 6, 2024

Is your feature request related to a problem? Please describe.
Currently we are using mixed snake and camel case for the functions and variables names.

Describe the solution you'd like
In cairo, camel case is normally used, please update all of the variable and functions that use camel case to use snake case

@adrianvrj adrianvrj added good first issue Good for newcomers help wanted Extra attention is needed easy labels Nov 6, 2024
@raizo07
Copy link
Contributor

raizo07 commented Nov 6, 2024

@adrianvrj Kindly assign me to work on this issue.

ETA: One day

@anonfedora
Copy link

anonfedora commented Nov 6, 2024

I'm Eleazar, a fullstack Blockchain developer.
From the problem statement all snake_cased properties need to be refactored to camelCase, Can I take this from here?

@jaiminRaiyani
Copy link

Let me handle this issue!

@Iwueseiter
Copy link

Hi @adrianvrj, can I work on this?

@martinvibes
Copy link

martinvibes commented Nov 6, 2024

holla @adrianvrj i'm a forntend developer and a blockchain dev

i will:

  • Audit: Review all function and variable names, identifying those using snake_case.
  • Refactor: Change each to camelCase to match Cairo conventions, ensuring consistent style.
  • No Functional Changes: Only rename—avoid altering any function logic or parameters.
  • Test: Run all tests to confirm that only names were changed and functionality remains intact.

May I be assigned to this?
ETA: 12HRS

@No-bodyq
Copy link

No-bodyq commented Nov 6, 2024

May I take care of this?
ETA is one day

@NueloSE
Copy link
Contributor

NueloSE commented Nov 6, 2024

I'd like to handle this task.

@Akshola00
Copy link

Akshola00 commented Nov 6, 2024

@adrianvrj I’d like to resolve this.
I would find all the places where snake casing is being used and I will change all functions and variables to camel casing
please assign this to me :)

@tasneemtoolba
Copy link

I would like to contribute further in this project! So such a task would help me familiarise myself with the project itself and its structure

@ShantelPeters
Copy link
Contributor

Can i please be assigned to this issue @adrianvrj

@JosueBrenes
Copy link
Contributor

Hi, I'm Josué Brenes and I'll be working on issue.
I'm Dojo Coding member. ⛩️

I estimate this will take 1 day to complete.

Proposed Solution for Name Formatting Change

I would address this as follows:

  1. Initial Analysis: Review the code to identify all variables and functions currently using snake_case.

  2. Refactoring: Change all identified variable and function names to camelCase, following the recommended standard in Cairo.

  3. Automation: Utilize search and replace tools or scripts to automate part of the process, ensuring consistency.

  4. Testing: Conduct thorough testing to confirm that the name changes do not affect code functionality.

@casweeney
Copy link
Contributor

I can quickly tackle on this issue.

I will update the functions and variable names this will also affect the test cases; therefore, I will also update the tests to make sure all tests are passing as they should.

@Kaminar-i
Copy link

hey @adrianvrj i'm a fullstack dev and i would love to work on this issue please kindly assign :)

1. Audit Current Naming Conventions

Start by reviewing all the function and variable names in the codebase, especially focusing on any instances where snake_case is used.
Make a list or mark each function and variable that needs renaming. This helps track what’s changed and reduces the chance of missing anything.

2. Refactor Names to Camel Case

Update each identified snake_case function and variable to camelCase, adhering to Cairo's convention.
Ensure consistency across the board; for instance, set_user_data should become setUserData, and user_address should become userAddress.

3. Ensure No Functional Changes

This issue is solely focused on refactoring names. Be cautious not to alter the function logic or parameters in any other way.
Make sure you’re only changing names and not unintentionally modifying functionality.

4. Review and Test

After renaming, review each change thoroughly to ensure all instances are updated. Use “Find and Replace” as needed.
Run tests to confirm everything functions as expected after the refactor. Unit tests and integration tests should still pass, verifying that the changes are superficial (naming-only) rather than functional.

Eta: 12hrs

@Mystic-Nayy
Copy link

@adrianvrj can I please work on this?

@pheobeayo
Copy link

Mind if I try this one?

@derianrddev
Copy link
Contributor

Hi, I'm Derian, a fullstack developer and member of Dojo Coding, and I will be working on issue #193.

I estimate it will take me 12 hours to complete.

Here's how I will approach this issue: I would change all variables and functions that are in camel case to snake case, following the Cairo style standard.

@joanne-cmd
Copy link

Hello, my name is Joanne. I would love to work on this issue. I have a strong background in Rust and a good understanding of Cairo, and I am familiar with the concept of snake_case. I look forward to working on these issue.

@sotoJ24
Copy link
Contributor

sotoJ24 commented Nov 6, 2024

Hello, I have a solid background in Cairo, as well as experience refactoring codebases to ensure adherence to best practices. I understand the implications of naming conventions for both readability and project standards. By systematically updating these names, I can contribute to a cleaner and more intuitive codebase that aligns with the Cairo community's norms,

Josue From Dojo Coding,
Regards

@jorgezerpa
Copy link
Contributor

hello! @adrianvrj can I take this? should be fast

@wheval
Copy link
Contributor

wheval commented Nov 6, 2024

Hello @adrianvrj,
I'm Wheval, a Frontend developer and Cairo developer.

To solve this issue, I would change each variable and function name to use Camel Case (like this, functionName). I would also update imports to the changed camel case names to ensure consistent camel case naming.
I would also avoid altering any function logic.
Finally, i would ensure all tests passes and nothing breaks.
I would love to work on this. Thank you.

ETA is 5 hours.

@Kaminar-i
Copy link

Please, is this still available ?

@EmmanuelAR
Copy link
Collaborator

@sotoJ24 any update on this issue?

@EmmanuelAR EmmanuelAR linked a pull request Nov 12, 2024 that will close this issue
5 tasks
@PedroCo3lho
Copy link

Hello @EmmanuelAR, is this issue still open for collaboration? Please let me know, and I’ll raise a PR by tomorrow.

@EmmanuelAR EmmanuelAR linked a pull request Nov 15, 2024 that will close this issue
5 tasks
This was referenced Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet