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

Qiskit Metal - During CI, offer user method to reformat file to be yapf. #41

Open
priti-ashvin-shah-ibm opened this issue Mar 2, 2022 · 7 comments

Comments

@priti-ashvin-shah-ibm
Copy link

Description

During CI, offer user method to reformat file to be yapf. We require all files to be formatted by yapf so the code "looks" similar. If the file is not formattted, the CI will fail. So, it would be nice to offer to reformat for the user. There are some files that have code which developers don't want to be reformatted to yapf. The solution of this project needs to address developer's wishes.

Deliverables

If CI fails due to non-formatted yapf file, provide a user-friendly solution.

Mentors details

  • Mentor 1
    • Name: Priti Shah
    • GitHub ID: @priti Ashvin Shah
    • What they do: Developer for Qiskit Metal
  • Mentor 2
    • Name:
    • GitHub ID:
    • What they do:

Number of mentees

1

Type of mentees

  • Mentor 1
    • Required: Have experience committing to Qiskit Metal
      • item 1
    • Nice to have:
      • item 1
  • Mentor 2
    • Required:
      • item 1
    • Nice to have:
      • item 1
@priti-ashvin-shah-ibm
Copy link
Author

This is going to be worked on by Axel Ismirlian.

@axel ismirlian

@ismirlia
Copy link

ismirlia commented Mar 7, 2022

I would like to work on this project.

@priti-ashvin-shah-ibm
Copy link
Author

priti-ashvin-shah-ibm commented Apr 6, 2022

@HuangJunye , could you assign @axel ismirlian to this issue? I am not able to.

Post comment: I realized that the issues don't have people assigned. Please ignore my request.

@ismirlia
Copy link

ismirlia commented Apr 6, 2022

This is the power point for the first checkpoint.
qamp-checkpoint-1-axel-nick-gyeonghun-v2.pptx

@ismirlia
Copy link

ismirlia commented Apr 28, 2022

Checkpoint 2

I have changed the script for the pre-commit hook. It now only runs yapf on the staged files, which runs faster. I have cut down on the number of dependencies needed to utilize the pre-commit hook. I tested on mac, windows and github desktop.

Here are some screen shots of what the error messages a user might get on different platformts.

github desktop
github_desktop_screenshot

mac command line
terminal_screenshot

I updated the github and the web documentation to include usage of the new pre-commit hook. I am waiting for final review.

@ismirlia
Copy link

ismirlia commented Jun 8, 2022

@HuangJunye I was going to give a live short demo of my project tomorrow, so I don't have any slides to upload.

@ismirlia
Copy link

ismirlia commented Jun 9, 2022

@HuangJunye
Checkpoint 3
Here are some slides I threw together this morning.
qamp-checkpoint-3-axel.pptx

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

No branches or pull requests

3 participants