Skip to content

Conversation

@zmx27
Copy link
Contributor

@zmx27 zmx27 commented Apr 10, 2025

As instructed in the "Getting started with group infrastructure" document, I have added a bio for myself in the "people.yml" file.

@zmx27 zmx27 requested a review from sbillinge April 10, 2025 02:14
Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

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

The edits to people.yml look good, but there seem to be some unnecessary edits to other files too. I think these can be reset maybe if you run prettier in your local. This is a slightly annoying aspect of the current workflow that i would like to fix tbh.

@zmx27
Copy link
Contributor Author

zmx27 commented Apr 10, 2025

I tried reverting the changes, but I can't seem to avoid these "auto fixes from pre-commit hooks" commands from running again and modifying other unnecessary files. How should I go about this? If the "prettier" you are referring to is a file formatter, I don't imagine it will do much since these "auto fixes" will likely be ran again when I commit those changes.

@sbillinge
Copy link
Contributor

I tried reverting the changes, but I can't seem to avoid these "auto fixes from pre-commit hooks" commands from running again and modifying other unnecessary files. How should I go about this? If the "prettier" you are referring to is a file formatter, I don't imagine it will do much since these "auto fixes" will likely be ran again when I commit those changes.

If you can install prettier locally and run it on everything you may be able to fix most of these. Just give it a try

@zmx27
Copy link
Contributor Author

zmx27 commented Apr 14, 2025

Hi Professor Billinge, after I installed and ran Prettier on my local repository, here is the output of my command line after running "prettier --write ."
.github/workflows/publish.yml 78ms (unchanged)
.github/workflows/tests-on-pr.yml 15ms (unchanged)
.pre-commit-config.yaml 33ms (unchanged)
.prettierrc 87ms (unchanged)
db/citations.yml 3748ms (unchanged)
db/grants.yml 167ms (unchanged)
db/groups.yml 4ms (unchanged)
db/institutions.yml 566ms (unchanged)
db/jobs.yml 5ms (unchanged)
db/news.yml 4ms (unchanged)
db/people.yml 1138ms (unchanged)
db/presentations.yml 626ms (unchanged)
db/projects.yml 16ms (unchanged)
db/pronouns.yml 3ms (unchanged)
environment.yml 3ms (unchanged)
local/regolithrc.json 20ms (unchanged)
people_schema.md 55ms (unchanged)
README.md 29ms (unchanged)
regolithrc.json 92ms (unchanged)

Nothing seems to have changed. Did I do something wrong? Sorry for dragging out this issue for so long haha

@sbillinge
Copy link
Contributor

Hi Professor Billinge, after I installed and ran Prettier on my local repository, here is the output of my command line after running "prettier --write ." .github/workflows/publish.yml 78ms (unchanged) .github/workflows/tests-on-pr.yml 15ms (unchanged) .pre-commit-config.yaml 33ms (unchanged) .prettierrc 87ms (unchanged) db/citations.yml 3748ms (unchanged) db/grants.yml 167ms (unchanged) db/groups.yml 4ms (unchanged) db/institutions.yml 566ms (unchanged) db/jobs.yml 5ms (unchanged) db/news.yml 4ms (unchanged) db/people.yml 1138ms (unchanged) db/presentations.yml 626ms (unchanged) db/projects.yml 16ms (unchanged) db/pronouns.yml 3ms (unchanged) environment.yml 3ms (unchanged) local/regolithrc.json 20ms (unchanged) people_schema.md 55ms (unchanged) README.md 29ms (unchanged) regolithrc.json 92ms (unchanged)

Nothing seems to have changed. Did I do something wrong? Sorry for dragging out this issue for so long haha

haha, nothing wrong on your part. This is something I am, low-key, working on. We use yaml_dump to write the yaml and we have instituted the use of prettier for linting, and they are incompatible. We either have to change the behavior or yaml_dump or prettier. I think I favor the latter, but it is not completely straightforward. If you are interested in working on this it could be a bit help to me! It would mean you forking and cloning regro/regolith

@zmx27
Copy link
Contributor Author

zmx27 commented Apr 18, 2025

I'm interested in helping with this! What should I do beyond forking and cloning regro/regolith?

@sbillinge
Copy link
Contributor

something like this, but use your initiative:

  1. fork and clone regolith and install it in an env (you did this already)
  2. make a few small edits to a few files (you already did this)
  3. run prettier and see what changes it makes
  4. try and figure out exactly which things are in conflict between the yaml.dump that regolith does, which does some formatting to the yaml, and prettier, which also does formatting, but unfortunately slightly different. It will be things like enforcing single quotes and breaking lines or not if they are too long.
  5. make a note of this.
  6. We can have a conversation about whether to try and update the behavior of yaml.dump or whether to update the behavior of prettier or both (both of these can be done by setting parameters in config files etc.).
  7. when we decide the fix try and do it until they can both run without updating each others' updates, if you see what I mean.

@zmx27
Copy link
Contributor Author

zmx27 commented May 29, 2025

I was going through the "getting started" documents again to ensure that I didn't miss anything just to realize I never properly responded to you here... sorry! I saw that the main branch had some changes in the meantime, so I merged my fork with the main branch. Now, it seems like the issue was resolved and the yaml_dump doesn't have any conflicts with prettier anymore?

@sbillinge
Copy link
Contributor

Thanks for following up @zmx27

I will close this PR. Please could you redo it on a clean PR? Please could you also put in your educational information? You can copy form one of the other entries that have been filled in.

Thanks so much.

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.

2 participants