Skip to content

Commit

Permalink
Merge pull request #1218 from trws/reformat
Browse files Browse the repository at this point in the history
Reformat
  • Loading branch information
mergify[bot] committed Jul 11, 2024
2 parents fc4fcde + 806f8fc commit bc9e3e3
Show file tree
Hide file tree
Showing 148 changed files with 7,209 additions and 7,174 deletions.
38 changes: 0 additions & 38 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,6 @@ PenaltyBreakBeforeFirstCallParameter : 10000000
PenaltyReturnTypeOnItsOwnLine : 65000
PenaltyBreakString : 10

# preserve formatting of arguments to pack/unpack functions
# found by running: rg --only-matching --no-filename --no-line-number '(flux|json)(_[^ ,()]+)?_(un)?pack' | sort -u
WhitespaceSensitiveMacros :
- flux_conf_unpack
- flux_event_pack
- flux_event_publish_pack
- flux_event_unpack
- flux_job_result_get_unpack
- flux_jobspec1_attr_pack
- flux_jobspec1_attr_unpack
- flux_jobspec_info_unpack
- flux_jobtap_event_post_pack
- flux_kvs_lookup_get_unpack
- flux_kvs_lookup_unpack
- flux_kvs_txn_pack
- flux_lookup_get_unpack
- flux_mrpc_pack
- flux_msg_pack
- flux_msg_unpack
- flux_plugin_arg_pack
- flux_plugin_arg_unpack
- flux_plugin_args_unpack
- flux_plugin_conf_unpack
- flux_request_unpack
- flux_respond_pack
- flux_rpc_get_unpack
- flux_rpc_pack
- flux_shell_getopt_unpack
- flux_shell_info_unpack
- flux_shell_jobspec_info_unpack
- flux_shell_rank_info_unpack
- flux_shell_rpc_pack
- flux_shell_setopt_pack
- flux_shell_setopt_unpack
- flux_shell_task_info_unpack
- json_pack
- json_unpack

# treat foreach macros as for loops
ForEachMacros :
- json_array_foreach
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
uses: crate-ci/typos@bcafd462cb07ef7ba57e34abf458fe20767e808b # v1.19.0

python-format:
name: python format
runs-on: ubuntu-20.04
name: code formatting
runs-on: ubuntu-24.04
steps:
- uses: actions/setup-python@v5
with:
Expand All @@ -34,10 +34,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: install black
run: python3 -m pip install 'black==22.3.0' --force-reinstall
- name: check format
run: ./scripts/check-format
- name: install linting and formatting deps
run: pip install -r scripts/requirements-dev.txt
- name: format and linting checks
run: pre-commit run --all-files

python-lint:
name: python lint
Expand Down
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
files: '^(src|t|resource|qmanager)/.*(\.py|\.h|\.hpp|\.c|\.cpp)'
exclude: "^(.*((pyco|lib)tap|yggdrasil|jsongraph).*)|src/common/libutil/.*$"
repos:
- repo: meta
hooks:
- id: identity
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-shebang-scripts-are-executable
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending

- repo: local
hooks:
- id: black
name: black
language: python
types: [python]
entry: black

- repo: https://github.com/pre-commit/mirrors-clang-format
# this is the release of 18.1.6
rev: 'eb7205de69febb10d8d455ed9cc0a9fa6ac3a17a'
hooks:
- id: clang-format
14 changes: 7 additions & 7 deletions qmanager/config/queue_system_defaults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

namespace Flux {
namespace queue_manager {
const unsigned int MAX_QUEUE_DEPTH = 1000000;
const unsigned int DEFAULT_QUEUE_DEPTH = 32;
const unsigned int MAX_RESERVATION_DEPTH = 100000;
const unsigned int HYBRID_RESERVATION_DEPTH = 64;
} // namespace resource_model
} // namespace Flux
const unsigned int MAX_QUEUE_DEPTH = 1000000;
const unsigned int DEFAULT_QUEUE_DEPTH = 32;
const unsigned int MAX_RESERVATION_DEPTH = 100000;
const unsigned int HYBRID_RESERVATION_DEPTH = 64;
} // namespace queue_manager
} // namespace Flux

#endif // QUEUE_SYSTEM_DEFAULT_HPP
#endif // QUEUE_SYSTEM_DEFAULT_HPP

/*
* vi:tabstop=4 shiftwidth=4 expandtab
Expand Down
Loading

0 comments on commit bc9e3e3

Please sign in to comment.