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

Ensure regressionfiles.yaml is sorted by filename #194

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

berquist
Copy link
Member

No description provided.

@berquist
Copy link
Member Author

I need to migrate this repo from using the pre-commit.ci service to the GHA so jq can be installed. Or I could rewrite the script in pure Python...

@berquist berquist marked this pull request as ready for review October 16, 2024 23:17
@berquist berquist force-pushed the ensure-sorted-regressionfiles-yaml branch 2 times, most recently from c7dd886 to 9901920 Compare October 16, 2024 23:41
@berquist
Copy link
Member Author

Victory! https://github.com/berquist/cclib-data/actions/runs/11387492883/job/31682231057 below. If you want to run pre-commit locally, you'll need to `python -m pip install 'ruamel.yaml' or similar. I don't think there's a way to tell pre-commit to install a Python dependency in a venv for a shell-based hook.

[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/Mateusz-Grzelinski/actionlint-py.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/Mateusz-Grzelinski/actionlint-py.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Check hooks apply to the repository......................................Passed
Check for useless excludes...............................................Passed
check yaml...............................................................Passed
Sort regressionfiles.yaml................................................Failed
- hook id: sort-regressionfiles-yaml
- exit code: 1
- files were modified by this hook

difference found:
--- regressionfiles_nocomments.yaml	2024-10-17 14:53:20.185879852 +0000
+++ regressionfiles_sorted.yaml	2024-10-17 14:53:20.277880356 +0000
@@ -495,9 +495,10 @@
   - loc_entry: Gaussian/Gaussian09/water_gaussian.inp.log
   - loc_entry: Gaussian/Gaussian16/Benzene_anion.log
   - loc_entry: Gaussian/Gaussian16/C01_CC.log
-  - loc_entry: Gaussian/Gaussian16/co_pbe1pbe_631ppGss.log
   - loc_entry: Gaussian/Gaussian16/Ethane.mp5.log
   - loc_entry: Gaussian/Gaussian16/H3_natcharge.log
+  - loc_entry: Gaussian/Gaussian16/Pyridine_opt-eomccsd.log
+  - loc_entry: Gaussian/Gaussian16/co_pbe1pbe_631ppGss.log
   - loc_entry: Gaussian/Gaussian16/issue1153.log
   - loc_entry: Gaussian/Gaussian16/issue851.log
   - loc_entry: Gaussian/Gaussian16/issue962.log
@@ -505,7 +506,6 @@
   - loc_entry: Gaussian/Gaussian16/naturalspinorbitals_parsing.log
   - loc_entry: Gaussian/Gaussian16/output.txt.issue754.log
   - loc_entry: Gaussian/Gaussian16/water.log
-  - loc_entry: Gaussian/Gaussian16/Pyridine_opt-eomccsd.log
   - loc_entry: Gaussian/Gaussian98/C_bigmult.log
   - loc_entry: Gaussian/Gaussian98/NIST_CCCBDB_1himidaz_m21b0.out
   - loc_entry: Gaussian/Gaussian98/NIST_CCCBDB_1himidaz_m23b6.out
@@ -730,17 +730,17 @@
   - loc_entry: ORCA/ORCA4.1/single_atom_freq.out
   - loc_entry: ORCA/ORCA4.2/947.out
   - loc_entry: ORCA/ORCA4.2/MP2-gradient.out
+  - loc_entry: ORCA/ORCA4.2/a_DLPNO.txt
   - loc_entry: ORCA/ORCA4.2/casscf.out
   - loc_entry: ORCA/ORCA4.2/cope.out
   - loc_entry: ORCA/ORCA4.2/ligando-30-SRM1-S_ZINDO.out
   - loc_entry: ORCA/ORCA4.2/long-input.out
   - loc_entry: ORCA/ORCA4.2/longer-input.out
   - loc_entry: ORCA/ORCA4.2/water_dlpno_ccsd.out
-  - loc_entry: ORCA/ORCA4.2/a_DLPNO.txt
   - loc_entry: ORCA/ORCA5.0/ADBNA_Me_Mes_MesCz.log
+  - loc_entry: ORCA/ORCA5.0/Benzene_opt_etsyms.log
   - loc_entry: ORCA/ORCA5.0/dvb_soc.log
   - loc_entry: ORCA/ORCA5.0/steom_orbs.log
-  - loc_entry: ORCA/ORCA5.0/Benzene_opt_etsyms.log
   - loc_entry: Psi3/Psi3.4/dvb_sp_hf.out
     tests:
       - Psi3SPTest
patching file regressionfiles.yaml
Hunk #1 succeeded at 509 (offset 14 lines).
Hunk #2 succeeded at 520 (offset 14 lines).
Hunk #3 succeeded at 750 (offset 20 lines).
patch applied cleanly

actionlint...............................................................Passed
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/regressionfiles.yaml b/regressionfiles.yaml
index f4b08c3..82ac913 100644
--- a/regressionfiles.yaml
+++ b/regressionfiles.yaml
@@ -509,9 +509,10 @@ regressions:
   - loc_entry: Gaussian/Gaussian09/water_gaussian.inp.log
   - loc_entry: Gaussian/Gaussian16/Benzene_anion.log
   - loc_entry: Gaussian/Gaussian16/C01_CC.log
-  - loc_entry: Gaussian/Gaussian16/co_pbe1pbe_631ppGss.log
   - loc_entry: Gaussian/Gaussian16/Ethane.mp5.log
   - loc_entry: Gaussian/Gaussian16/H3_natcharge.log
+  - loc_entry: Gaussian/Gaussian16/Pyridine_opt-eomccsd.log
+  - loc_entry: Gaussian/Gaussian16/co_pbe1pbe_631ppGss.log
   - loc_entry: Gaussian/Gaussian16/issue1153.log
   - loc_entry: Gaussian/Gaussian16/issue851.log
   - loc_entry: Gaussian/Gaussian16/issue962.log
@@ -519,7 +520,6 @@ regressions:
   - loc_entry: Gaussian/Gaussian16/naturalspinorbitals_parsing.log
   - loc_entry: Gaussian/Gaussian16/output.txt.issue754.log
   - loc_entry: Gaussian/Gaussian16/water.log
-  - loc_entry: Gaussian/Gaussian16/Pyridine_opt-eomccsd.log
   - loc_entry: Gaussian/Gaussian98/C_bigmult.log
   - loc_entry: Gaussian/Gaussian98/NIST_CCCBDB_1himidaz_m21b0.out
   - loc_entry: Gaussian/Gaussian98/NIST_CCCBDB_1himidaz_m23b6.out
@@ -750,17 +750,17 @@ regressions:
   - loc_entry: ORCA/ORCA4.1/single_atom_freq.out
   - loc_entry: ORCA/ORCA4.2/947.out
   - loc_entry: ORCA/ORCA4.2/MP2-gradient.out
+  - loc_entry: ORCA/ORCA4.2/a_DLPNO.txt
   - loc_entry: ORCA/ORCA4.2/casscf.out
   - loc_entry: ORCA/ORCA4.2/cope.out
   - loc_entry: ORCA/ORCA4.2/ligando-30-SRM1-S_ZINDO.out
   - loc_entry: ORCA/ORCA4.2/long-input.out
   - loc_entry: ORCA/ORCA4.2/longer-input.out
   - loc_entry: ORCA/ORCA4.2/water_dlpno_ccsd.out
-  - loc_entry: ORCA/ORCA4.2/a_DLPNO.txt
   - loc_entry: ORCA/ORCA5.0/ADBNA_Me_Mes_MesCz.log
+  - loc_entry: ORCA/ORCA5.0/Benzene_opt_etsyms.log
   - loc_entry: ORCA/ORCA5.0/dvb_soc.log
   - loc_entry: ORCA/ORCA5.0/steom_orbs.log
-  - loc_entry: ORCA/ORCA5.0/Benzene_opt_etsyms.log
   - loc_entry: Psi3/Psi3.4/dvb_sp_hf.out
     tests:
       - Psi3SPTest
##[error]Process completed with exit code 1.

@berquist berquist requested a review from shivupa October 17, 2024 15:59
@berquist berquist force-pushed the ensure-sorted-regressionfiles-yaml branch from 5a87c9d to 28831b8 Compare October 20, 2024 20:51
runs-on: ubuntu-latest
steps:
- name: Success
run: "true"
Copy link
Member

Choose a reason for hiding this comment

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

not sure I understand why this needs to be here? Isnt this doing nothing?

Copy link
Member

Choose a reason for hiding this comment

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

Can you give me a little more context? This PR gets sorting working with pre-commit.ci and adds the framework for the switch to gha? If so LGTM, if not then I need a little more context

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR runs both pre-commit.ci (without sorting) and the "old" way of regular GHA (with sorting). The advantage to pre-commit.ci is the bot PRs that update the hook versions, but I'm eventually going to switch to Renovate, which does that and replaces Dependabot.

Copy link
Member Author

@berquist berquist Oct 21, 2024

Choose a reason for hiding this comment

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

not sure I understand why this needs to be here? Isnt this doing nothing?

It technically does nothing and just marks the final status of the workflow. See https://github.com/cclib/cclib/blob/110292d71d4a88b3e1c2ec37c5fc95d4abf5b4b7/.github/workflows/ci.yml#L24. It can be removed.

@berquist berquist force-pushed the ensure-sorted-regressionfiles-yaml branch from 28831b8 to e84770b Compare November 1, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants