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

Maintenance #74

Merged
merged 5 commits into from
Jul 7, 2024
Merged

Maintenance #74

merged 5 commits into from
Jul 7, 2024

Conversation

cbm755
Copy link
Collaborator

@cbm755 cbm755 commented Jul 7, 2024

Trying to Fix Issue #72... Following the nice directions at https://johannesjh.github.io/req2flatpak/main/development.html#ensuring-code-quality

So far:

  • pre-commit run --all
  • poetry update

cbm755 added 4 commits July 6, 2024 19:36
Running pre-commit seems to undo some of it...  Also, one of them was
recommending a alpha version of something so I didn't accept that.
@cbm755
Copy link
Collaborator Author

cbm755 commented Jul 7, 2024

In the docs, I don't know what this instruction means?

# 4. Remove `frozen: x.x.x` comments for unfrozen dependencies

How am I supposed to know which are frozen?

Note that step 1 pre-commit autoupdate --freeze has some of its changes undone by step 3 pre-commit run. Might be nice to clarify this part a bit more in the manual...

@johannesjh
Copy link
Owner

I have to say I am having a hard time myself following these instructions (despite the fact that I personally wrote them, if I remember well). I guess we need to improve and correct the instructions. Specifically, I think we can remove step 4 from the instructions.

@johannesjh
Copy link
Owner

I guess we should merge the two sections for updating poetry vs. pre-commit dependencies because they are rather intermingled. If I understand the workings of sync_with_poetry correctly, we should proceed as follows

first update poetry dependecies:

  1. manually bump the version constraints in pyproject.toml
  2. run poetry update to update packages and write the lock file
  3. run poetry install --with lint --all-extras to update the local python environment
  4. run git add pyproject.toml poetry.lock to stage the changes in git

then update pre-commit dependencies:

  1. run pre-commit install just to be sure that pre-commit is properly initialized
  2. run pre-commit autoupdate --freeze to update pre-commit's packages
  3. run git add .pre-commit-config.yaml to stage changes
  4. run pre-commit run to sync package versions from poetry to pre-commit. note, this is a one-way-sync, i.e., the package versions defined in the poetry lock file are copied over to the pre-commit yaml file.
  5. stage changes using git
  6. run pre-commit run to verify that pre-commit now happily leaves all files unchanged
  7. stage and commit all changes.

@cbm755
Copy link
Collaborator Author

cbm755 commented Jul 7, 2024

thanks very much, that is much clearer!

This should be ready to merge and fixes #74.

@cbm755 cbm755 requested a review from johannesjh July 7, 2024 07:11
@johannesjh johannesjh merged commit 7c5414e into main Jul 7, 2024
14 checks passed
@johannesjh johannesjh deleted the maint branch July 7, 2024 09:47
johannesjh pushed a commit that referenced this pull request Jul 7, 2024
* Updates dependencies
* Fixes #72
johannesjh pushed a commit to cbm755/req2flatpak that referenced this pull request Jul 7, 2024
* Updates dependencies
* Fixes johannesjh#72
@johannesjh johannesjh mentioned this pull request Jul 7, 2024
4 tasks
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