X Tutup
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CogStack/CogStack-ModelServe
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: CogStack/CogStack-ModelServe
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature-phoevos-ruff-format
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 86 files changed
  • 1 contributor

Commits on Dec 19, 2024

  1. fix: Drop explicit ruff include list

    Allow ruff to discover all files, instead of hardcoding every path which
    can be error prone, e.g. including "tests/" in the list meant that
    nested Python files were not being linted, while other paths were stale.
    There is no need for this list since we truly want to lint all Python
    files, which ruff does by default.
    
    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 19, 2024
    Configuration menu
    Copy the full SHA
    77c4850 View commit details
    Browse the repository at this point in the history
  2. fix: Drop explicit ruff.format config

    Drop the explicit ruff.format configuration from the pyproject.toml file
    since it corresponds to ruff's default values, making it harder for
    someone familiar with the tool to tell deviations from the default
    behaviour. Given that ruff strives to maintain compatibility with black,
    these defaults are unlikely to change.
    
    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 19, 2024
    Configuration menu
    Copy the full SHA
    5057a88 View commit details
    Browse the repository at this point in the history
  3. fix: Cleanup ruff.lint configuration

    Drop configuration settings that match ruff's default values (also see
    previous commit for the changes in ruff.format).
    
    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 19, 2024
    Configuration menu
    Copy the full SHA
    9b75c48 View commit details
    Browse the repository at this point in the history
  4. fix: Catch E501 and E226 linting errors

    Drop E501 and E226 from ruff.lint's ignore list:
    * E226 does not appear in the codebase therefore there's no reason to
      include it there
    * Given that our line-length limit is already high, we shouldn't ignore
      E501
    
    Ignoring C901 is not a good idea; the only reason I'm leaving it in is
    because it would require a lot of refactoring to fix it. We should
    address this in the future.
    
    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 19, 2024
    Configuration menu
    Copy the full SHA
    67e9269 View commit details
    Browse the repository at this point in the history
  5. fix: Add isort to the list of ruff rules

    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 19, 2024
    Configuration menu
    Copy the full SHA
    b07f52d View commit details
    Browse the repository at this point in the history
  6. fix: Setup isort for ruff

    Imports are highly inconsistent throughout the project, using a mix of
    absolute as well as explicit and implicit relative imports. For this
    reason, we have to explicitly specify the known first-party and local
    folders for isort to work correctly.
    
    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 19, 2024
    Configuration menu
    Copy the full SHA
    14c98fd View commit details
    Browse the repository at this point in the history
  7. fix: Reduce the line-length for ruff.lint to 100

    I strongly believe that the limit should be reduced, but feel free to
    drop this commit if you disagree.
    
    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 19, 2024
    Configuration menu
    Copy the full SHA
    e74b6ec View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2024

  1. fix: Run ruff formatting and resolve issues

    Run 'ruff check --fix' followed by 'ruff format' and resolve remaining
    errors manually. For the most part, the manual changes involved one of
    the 3 following actions:
    * Split long strings into multiple lines wrapped with parentheses
    * Refactor code, e.g. retrieve dict values and evaluate conditionals
      before using the results in f-strings
    * Move long strings to files (this can be done in many more places
      around the codebase)
    
    Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
    phoevos committed Dec 23, 2024
    Configuration menu
    Copy the full SHA
    d63ba90 View commit details
    Browse the repository at this point in the history
Loading
X Tutup