Skip to content

Commit

Permalink
[Internal]: Ensure all files end with a newline (#2227)
Browse files Browse the repository at this point in the history
This commit adds a pre-commit hook to ensure that
all text files end with a newline. Since some
editors add a newline automatically, enforcing all
files have one will help avoid unnecessary edits
as well as warnings in PR diffs.

Python files are already forced to have a newline
by ruff, so this change only affects non-Python
files (Markdown, YAML, etc).
  • Loading branch information
jvstme authored Jan 27, 2025
1 parent 3918689 commit 5b2b22e
Show file tree
Hide file tree
Showing 135 changed files with 130 additions and 135 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ body:
attributes:
label: Additional information
description: |
Any links, references or screenshots to have more context about the issue.
Any links, references or screenshots to have more context about the issue.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ body:
- 'Yes'
- 'No'
validations:
required: true
required: true
2 changes: 1 addition & 1 deletion .github/workflows/close-inactive-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
stale-pr-label: "stale"
stale-pr-message: "This PR is stale because it has been open for 14 days with no activity."
close-pr-message: "This PR was closed because it has been inactive for 7 days since being marked as stale. Please reopen the PR if it is still relevant."
exempt-issue-labels: no-stale,major
exempt-issue-labels: no-stale,major
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
repository-name: dstackai/dstackai.github.io
branch: gh-pages
token: ${{ secrets.GH_TOKEN }}
folder: site
folder: site
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ venv/
build/
.DS_Store
.fleet
.env
.env
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ repos:
language_version: 1.23.0 # Should match runner/go.mod
entry: bash -c 'cd runner && golangci-lint run'
stages: [manual]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
2 changes: 1 addition & 1 deletion contributing/AUTOSCALING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

`RPSAutoscaler` implements simple target tracking scaling. The target value represents requests per second per replica (in a 1-minute window).

`scale_up_delay` tells how much time has to pass since the last upscale or downscale event before the next upscaling. `scale_down_delay` tells how much time has to pass since the last upscale or downscale event before the next downscaling.
`scale_up_delay` tells how much time has to pass since the last upscale or downscale event before the next upscaling. `scale_down_delay` tells how much time has to pass since the last upscale or downscale event before the next downscaling.
2 changes: 1 addition & 1 deletion contributing/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ pre-commit install

## 6. Frontend

See [FRONTEND.md](FRONTEND.md) for the details on how to build and develop the frontend.
See [FRONTEND.md](FRONTEND.md) for the details on how to build and develop the frontend.
2 changes: 1 addition & 1 deletion contributing/GATEWAY.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ The Stats collector parses nginx `/var/log/nginx/dstack.access.log` to collect b

By default, it stores 5 minutes with 1-second resolution frames for each domain. It aggregates these frames in windows of the size 30 seconds, 1 minute, and 5 minutes, before sending to the server.

To increase performance, `StatsCollector` keeps position in file and read only new records. It can detect log rotation and reopen the log file.
To increase performance, `StatsCollector` keeps position in file and read only new records. It can detect log rotation and reopen the log file.
2 changes: 1 addition & 1 deletion contributing/GPUHUNT.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ Some providers offer extreme flexibility in possible configurations, but not all

The offline catalog is built in GitHub Actions every night. Every offline provider produces a CSV file with offers. Later, those files get compressed into a zip archive and uploaded to the public S3 bucket.

To ensure data quality, there is a catalog integrity testing step. It uses some simple heuristics to avoid empty catalog files, zero prices, or missing regions.
To ensure data quality, there is a catalog integrity testing step. It uses some simple heuristics to avoid empty catalog files, zero prices, or missing regions.
2 changes: 1 addition & 1 deletion contributing/RUNNER-AND-SHIM.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ All communication between the `dstack` server and `dstack-runner` happens via RE

`dstack-shim` must also be running next to the SSH server. The `dstack` server connects to this SSH server for interacting with both `dstack-shim` and `dstack-runner` since we use `host` networking mode for the Docker container. The CLI uses this SSH server as a jump host because the user wants to connect to the container.

> `host` networking mode would allow jobs to use any port at any moment for internal communication. For example, during distributed PyTorch training.
> `host` networking mode would allow jobs to use any port at any moment for internal communication. For example, during distributed PyTorch training.
2 changes: 1 addition & 1 deletion docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/lat
/opt/conda/condabin/conda config --prepend channels "nvidia/label/cuda-12.1.0" && \
/opt/conda/condabin/conda config --set always_yes true && \
/opt/conda/condabin/conda clean --all && \
echo "conda activate workflow" >> ~/.bashrc
echo "conda activate workflow" >> ~/.bashrc
2 changes: 1 addition & 1 deletion docker/base/devel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ ARG VERSION
FROM dstackai/base:py$PYTHON-$VERSION-cuda-12.1

RUN /opt/conda/condabin/conda install --name workflow cuda -y && \
/opt/conda/condabin/conda clean --all
/opt/conda/condabin/conda clean --all
2 changes: 1 addition & 1 deletion docker/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ For additional information and examples, see the following links:

## License

[Mozilla Public License 2.0](https://github.com/dstackai/dstack/blob/master/LICENSE.md)
[Mozilla Public License 2.0](https://github.com/dstackai/dstack/blob/master/LICENSE.md)
2 changes: 1 addition & 1 deletion docs/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dstack.ai
dstack.ai
2 changes: 1 addition & 1 deletion docs/assets/images/azure-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/datacrunch-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/discord-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/hotaisle-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/jb-toolbox-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/lambda-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/minus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/oci-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/images/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5b2b22e

Please sign in to comment.