Skip to content
Snippets Groups Projects
  1. Feb 26, 2021
  2. Feb 25, 2021
  3. Feb 24, 2021
    • Robert Rosca's avatar
      Merge branch 'fix/pre-commit-whitespace' into 'master' · 63df5b2f
      Robert Rosca authored
      Fix/pre commit whitespace
      
      ## Description
      
      Applies whitespace fixes for pre-commit checks so that those stop being a source of errors in the future.
      
      Marked as WIP as this requires !417  to be merged first. I'll rebase (if needed) once that's done.
      
      First step of #36
      
      Ran `echo 'end-of-file-fixer trailing-whitespace mixed-line-ending' | xargs -n 1 pre-commit run --all-files`
      
      ## How Has This Been Tested?
      
      This change only does:
      
      - end-of-file-fixer
      - trailing-whitespace
      - mixed-line-ending
      
      None of which affect the code, so no real checks were performed.
      
      ## Relevant Documents (optional)
      <!-- Include any relevant screenshot, elogs, reports, if appropriate. -->
      
      ## Types of changes
      
      Formatting fixes
      
      ## Checklist:
      <!--- Go over all the following points, and uncomment all lines that apply: -->
      
      - My code ~~follows~~ implements the code style of this project.
      
      ## Reviewers
      
      @danilevc @ahmedk @hammerd
      
      See merge request detectors/pycalibration!433
      63df5b2f
    • Robert Rosca's avatar
      Whitespace fixes · fa88d7f0
      Robert Rosca authored
      Fix missed mixed line endings
      fa88d7f0
    • Robert Rosca's avatar
      Merge branch 'feat/pre-commit-checks' into 'master' · 9ab7db36
      Robert Rosca authored
      Feat/pre commit checks
      
      - Added pre-commit hooks which:
        - isort on `.py` and `.ipynb`
        - flake8 on `.py` and `.ipynb`
        - nbstripout
        - rstcheck
        - check-added-large-files
        - check-ast
        - check-json
        - check-yaml
        - check-toml
        - end-of-file-fixer
        - trailing-whitespace
        - check-docstring-first
        - check-merge-conflict
        - mixed-line-ending
      - Hooks run as part of the `check` stage in the CI
      - Fixed some of the issues:
        - EoF
        - Trailing whitespace
        - isort (but only for .py)
      
      I included a lot of other changes and fixes in the original MR (https://git.xfel.eu/gitlab/detectors/pycalibration/merge_requests/411) before figuring out how to get the checks to run only on changed files, which meant that the MR implementing pre-commit checks also refactored a decent chunk of code. It would be better to do that refactoring in separate MRs so I've closed the original one and opened this to replace it.
      
      @ahmedk @danilevc @hammerd feel free to review when you have time :smile:
      
      TODO:
      
      - [x] Add pre-commit to requirements.txt
      - [x] ~~Don't mutate the code during pre-commit checks~~ - changed my mind about this a few times, left it to mutate the code as that is only done on staged files, so any mutations can be reverted by undoing changes anyway. Added an explanation on this to the readme instead.
      - [x] Add info to the readme and to the wiki
      - [x] Add explanation of what each of the checks is for in more detail
      - [x] Add scripts to execute w/ diff-only (same as the CI pipeline)
      
      See merge request detectors/pycalibration!417
      9ab7db36
    • Robert Rosca's avatar
      commit b132f8c0 · e49dcbcf
      Robert Rosca authored
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Wed Feb 24 21:04:47 2021 +0100
      
          Add link to wiki dev guidelines to readme
      
      commit 0d902b2b
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 22:25:40 2021 +0100
      
          Add .git-blame-ignore-revs file preemptively
      
      commit 9e6030a3
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 18:55:55 2021 +0100
      
          Fix import order
      
      commit d7ca8e96
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 18:52:24 2021 +0100
      
          Add notes on skipping checks, set to allow failure true,  break import order again
      
      commit a6f43240
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 18:38:08 2021 +0100
      
          Fix import order
      
      commit 2854f22b
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 18:08:35 2021 +0100
      
          Add accidentally removed dependencies
      
      commit 9ecbc83e
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 18:06:45 2021 +0100
      
          Add additional details to the readme
      
      commit 6342f2e6
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 16:33:47 2021 +0100
      
          Export SHA var as it's used during pre-commit itself
      
      commit a142df25
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 15:50:24 2021 +0100
      
          Swap lines to make more sense
      
      commit 95183eb5
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 15:50:09 2021 +0100
      
          Add a script for easy execution of diff-only pre-commit checks
      
      commit b98fed75
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 14:11:13 2021 +0100
      
          Add todos, adjust headings
      
      commit d6b83d8b
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 13:49:16 2021 +0100
      
          Update README.rst
      
          Change to be compliant with RSTcheck
          Fix some heading orders and enumerated lists
          Update the setup instructions
      
      commit db768d61
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 12:12:29 2021 +0100
      
          Sort requirements
      
      commit 43122cd3
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 22 12:12:06 2021 +0100
      
          Add pre-commit to requirements
      
      commit 797af5db
      Author: Cyril Danilevski <cyril.danilevski@xfel.eu>
      Date:   Tue Feb 9 11:19:30 2021 +0100
      
          blabla
      
      commit 6179aaa5
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 8 11:22:54 2021 +0100
      
          Add comments to clarify non-standard sections
      
      commit cae49ef4
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 8 11:12:19 2021 +0100
      
          Use consistent isort version
      
      commit c4d550a2
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 8 11:09:45 2021 +0100
      
          Check if MR commit SHA is set
      
      commit aceded4b
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 8 10:52:12 2021 +0100
      
          Add pre-commit configuration
      
          Pretty standard setup
      
          Worth mentioning that flake8 is set to only run on the diff between current
          branch and merge target
      
          This will not work outside of a merge request
      
      commit c5b8d367
      Author: Robert Rosca <robert.rosca@xfel.eu>
      Date:   Mon Feb 8 10:50:37 2021 +0100
      
          Update CI to work with pre-commit
      
          Check stage tries to find the commit hash being merged into
      
          Uses that hash to get  a list of changed files
      
          Passes this list of files to pre-commit so that checks only run on
          modified files
      e49dcbcf
    • Thomas Kluyver's avatar
      31a8a929
    • Thomas Kluyver's avatar
      Fix parameter orders · cd410237
      Thomas Kluyver authored
      cd410237
    • Thomas Kluyver's avatar
      8c7029eb
    • Thomas Kluyver's avatar
      a3e6b6fa
    • Thomas Kluyver's avatar
      Quote argument with > in · 563c46f1
      Thomas Kluyver authored
      563c46f1
    • Thomas Kluyver's avatar
      f657691e
    • Thomas Kluyver's avatar
      isort test_webservice.py · 4858e3e4
      Thomas Kluyver authored
      4858e3e4
    • Thomas Kluyver's avatar
      Add unit test for wait_on_transfer · 1f64088b
      Thomas Kluyver authored
      1f64088b
    • Thomas Kluyver's avatar
      Add another missing await · 72e8daf1
      Thomas Kluyver authored
      72e8daf1
    • Thomas Kluyver's avatar
      Add the missing await · 5df5e468
      Thomas Kluyver authored
      5df5e468
    • Thomas Kluyver's avatar
      09b48f21
  4. Feb 22, 2021
  5. Feb 21, 2021
  6. Feb 18, 2021
  7. Feb 16, 2021
Loading