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

pre-commit inconsistent between local and remote execution #430

Open
ianmkenney opened this issue Nov 26, 2024 · 0 comments
Open

pre-commit inconsistent between local and remote execution #430

ianmkenney opened this issue Nov 26, 2024 · 0 comments

Comments

@ianmkenney
Copy link
Contributor

ianmkenney commented Nov 26, 2024

From a fresh clone of gufe, it seems like we're not getting consistent results between local and remote (bot) run pre-commit execution.

cd `mktemp -d`
git clone https://github.com/openfreeenergy/gufe && cd gufe
git checkout 10fef9b  # check out main as it currently is
micromamba create -p ../env/ python=3.11 pre-commit --yes  # keep the env out of pre-commits way
micromamba -p ../env/ run pre-commit run --all-files

From the output of the last step we see that it would reformat (many) files. I figured that the files would be consistent with the merge of #421, but that doesn't seem to be the case.

check for added large files..............................................Passed
check for case conflicts.................................................Passed
check that executables have shebangs.................(no files to check)Skipped
check for broken symlinks............................(no files to check)Skipped
check toml...............................................................Passed
check yaml...............................................................Passed
debug statements (python)................................................Passed
detect destroyed symlinks................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing .github/PULL_REQUEST_TEMPLATE/pull_request_template.md

trim trailing whitespace.................................................Passed
black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted gufe/chemicalsystem.py
reformatted gufe/mapping/atom_mapper.py
reformatted gufe/components/solventcomponent.py
reformatted gufe/components/explicitmoleculecomponent.py
reformatted gufe/custom_codecs.py
reformatted gufe/network.py
reformatted gufe/protocols/protocol.py
reformatted gufe/ligandnetwork.py
reformatted gufe/mapping/ligandatommapping.py
reformatted gufe/storage/externalresource/memorystorage.py
reformatted gufe/storage/externalresource/filestorage.py
reformatted gufe/settings/models.py
reformatted gufe/tests/test_chemicalsystem.py
reformatted gufe/tests/test_mapping.py
reformatted gufe/protocols/protocoldag.py
reformatted gufe/components/proteincomponent.py
reformatted gufe/tests/test_protocoldag.py
reformatted gufe/tests/conftest.py
reformatted gufe/tests/test_mapping_visualization.py
reformatted gufe/tests/test_ligandatommapping.py
reformatted gufe/tests/test_solvents.py
reformatted gufe/tests/test_proteincomponent.py
reformatted gufe/tests/test_serialization_migration.py
reformatted gufe/utils.py
reformatted gufe/tests/test_ligand_network.py
reformatted gufe/tests/test_transformation.py
reformatted gufe/transformations/transformation.py
reformatted gufe/vendor/pdb_file/PdbxReader.py
reformatted gufe/tests/test_tokenization.py
reformatted gufe/tests/test_protocol.py
reformatted gufe/vendor/pdb_file/element.py
reformatted gufe/tokenization.py
reformatted gufe/vendor/pdb_file/unitcell.py
reformatted gufe/vendor/pdb_file/pdbfile.py
reformatted gufe/visualization/mapping_visualization.py
reformatted gufe/vendor/pdb_file/pdbxfile.py
reformatted gufe/vendor/pdb_file/PdbxContainers.py
reformatted gufe/vendor/pdb_file/topology.py
reformatted gufe/vendor/pdb_file/pdbstructure.py

All done! ✨ 🍰 ✨
39 files reformatted, 38 files left unchanged.

black-jupyter............................................................Passed
isort....................................................................Failed
- hook id: isort
- files were modified by this hook

Fixing /tmp/tmp.G5QwXeH9YD/gufe/gufe/__init__.py
Fixing /tmp/tmp.G5QwXeH9YD/gufe/gufe/settings/__init__.py
Fixing /tmp/tmp.G5QwXeH9YD/gufe/gufe/tests/storage/test_externalresource.py
Fixing /tmp/tmp.G5QwXeH9YD/gufe/gufe/tests/test_models.py
Fixing /tmp/tmp.G5QwXeH9YD/gufe/gufe/tests/test_protocolunit.py

interrogate..............................................................Passed
pyupgrade................................................................Failed
- hook id: pyupgrade
- exit code: 1
- files were modified by this hook

Rewriting gufe/vendor/pdb_file/pdbstructure.py
Rewriting gufe/vendor/pdb_file/PdbxContainers.py

I get similar behavior when running some of the tools manually. Although it's not a required step for merging it is a bit of a headache. @jthorton might have more to add here as well.

Any idea why this might be happening @mikemhenry?

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

No branches or pull requests

1 participant