Skip to content

Commit eea871a

Browse files
rename project to sqtop
1 parent f296f97 commit eea871a

11 files changed

Lines changed: 83 additions & 48 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ jobs:
5555
if [[ "${GITHUB_REF_TYPE}" != "tag" ]]; then
5656
VERSION="manual-${GITHUB_RUN_NUMBER}"
5757
fi
58-
PKG="s-top-${VERSION}-${{ matrix.label }}"
58+
PKG="sqtop-${VERSION}-${{ matrix.label }}"
5959
mkdir -p "dist/${PKG}"
60-
cp "target/${{ matrix.target }}/release/s-top" "dist/${PKG}/s-top"
60+
cp "target/${{ matrix.target }}/release/sqtop" "dist/${PKG}/sqtop"
6161
cp README.md README.zh-CN.md LICENSE config.example.toml "dist/${PKG}/"
6262
tar -C dist -czf "dist/${PKG}.tar.gz" "${PKG}"
6363
echo "asset_path=dist/${PKG}.tar.gz" >> "$GITHUB_OUTPUT"
@@ -72,9 +72,9 @@ jobs:
7272
if ($env:GITHUB_REF_TYPE -ne "tag") {
7373
$version = "manual-$env:GITHUB_RUN_NUMBER"
7474
}
75-
$pkg = "s-top-$version-${{ matrix.label }}"
75+
$pkg = "sqtop-$version-${{ matrix.label }}"
7676
New-Item -ItemType Directory -Path "dist/$pkg" -Force | Out-Null
77-
Copy-Item "target/${{ matrix.target }}/release/s-top.exe" "dist/$pkg/s-top.exe"
77+
Copy-Item "target/${{ matrix.target }}/release/sqtop.exe" "dist/$pkg/sqtop.exe"
7878
Copy-Item README.md, README.zh-CN.md, LICENSE, config.example.toml "dist/$pkg/"
7979
Compress-Archive -Path "dist/$pkg/*" -DestinationPath "dist/$pkg.zip" -Force
8080
"asset_path=dist/$pkg.zip" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append

Cargo.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "s-top"
3-
version = "0.1.7"
2+
name = "sqtop"
3+
version = "0.1.8"
44
edition = "2024"
55
description = "Interactive terminal monitor for Slurm clusters"
66
license = "MIT"

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# s-top
1+
# sqtop
22

33
[English](./README.md) | [中文](./README.zh-CN.md)
44

@@ -7,7 +7,9 @@
77
![Platform](https://img.shields.io/badge/Platform-Linux%20%2F%20Slurm-2f855a)
88
![Data Path](https://img.shields.io/badge/Data%20Path-text%20Slurm%20commands-805ad5)
99

10-
`s-top` is a terminal monitor for Slurm clusters. It is designed for ordinary cluster users who need a readable, continuously refreshed view of partitions, queues, users, and jobs without relying on `slurmrestd` or Slurm JSON output.
10+
`sqtop` is a terminal monitor for Slurm clusters. It is designed for ordinary cluster users who need a readable, continuously refreshed view of partitions, queues, users, and jobs without relying on `slurmrestd` or Slurm JSON output.
11+
12+
The project was previously published as `s-top`. The executable, crate, and conda package name are now `sqtop`.
1113

1214
![Overview](docs/screenshots/overview-hero.png)
1315

@@ -127,30 +129,37 @@ cargo install --path .
127129

128130

129131
```bash
130-
cargo install s-top
132+
cargo install sqtop
131133
```
132134

133135
### Install with conda
134136

135137

136138
```bash
137-
conda install -c wubeizhongxinghua s-top
139+
conda install -c wubeizhongxinghua sqtop
140+
```
141+
142+
If you want `conda install sqtop` to work without `-c`, add the channel once:
143+
144+
```bash
145+
conda config --add channels wubeizhongxinghua
146+
conda install sqtop
138147
```
139148

140149
## Usage
141150

142151
### Run
143152

144153
```bash
145-
./target/release/s-top
154+
./target/release/sqtop
146155
```
147156

148157
### Common Options
149158

150159
```bash
151-
./target/release/s-top --interval 2
152-
./target/release/s-top --once
153-
./target/release/s-top --debug-dump
160+
./target/release/sqtop --interval 2
161+
./target/release/sqtop --once
162+
./target/release/sqtop --debug-dump
154163
```
155164

156165
### CLI Options

README.zh-CN.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# s-top
1+
# sqtop
22

33
[English](./README.md) | [中文](./README.zh-CN.md)
44

@@ -7,13 +7,15 @@
77
![Platform](https://img.shields.io/badge/Platform-Linux%20%2F%20Slurm-2f855a)
88
![Data Path](https://img.shields.io/badge/Data%20Path-text%20Slurm%20commands-805ad5)
99

10-
`s-top` 是一个面向 Slurm 集群的终端监控工具。它关注的是调度与队列视角,而不是底层硬件遥测。项目设计目标是在普通 HPC 用户环境中,提供持续刷新、结构清晰、可交互的集群状态视图。
10+
`sqtop` 是一个面向 Slurm 集群的终端监控工具。它关注的是调度与队列视角,而不是底层硬件遥测。项目设计目标是在普通 HPC 用户环境中,提供持续刷新、结构清晰、可交互的集群状态视图。
1111

1212
![Overview](docs/screenshots/overview-hero.png)
1313

1414
## 项目简介
1515

16-
`s-top` 主要回答以下问题:
16+
项目此前以 `s-top` 名义发布;当前二进制、crate 和 conda 包名称均为 `sqtop`
17+
18+
`sqtop` 主要回答以下问题:
1719

1820
- 哪些分区当前最紧张
1921
- 当前用户与其他用户分别占用了多少资源
@@ -128,29 +130,36 @@ cargo install --path .
128130
### 从 crates.io 安装
129131

130132
```bash
131-
cargo install s-top
133+
cargo install sqtop
132134
```
133135

134136
### 通过 conda 安装
135137

136138
```bash
137-
conda install -c wubeizhongxinghua s-top
139+
conda install -c wubeizhongxinghua sqtop
140+
```
141+
142+
如果你希望后续直接执行 `conda install sqtop`,可以先把 channel 加入本地配置:
143+
144+
```bash
145+
conda config --add channels wubeizhongxinghua
146+
conda install sqtop
138147
```
139148

140149
## 使用方法
141150

142151
### 启动
143152

144153
```bash
145-
./target/release/s-top
154+
./target/release/sqtop
146155
```
147156

148157
### 常用方式
149158

150159
```bash
151-
./target/release/s-top --interval 2
152-
./target/release/s-top --once
153-
./target/release/s-top --debug-dump
160+
./target/release/sqtop --interval 2
161+
./target/release/sqtop --once
162+
./target/release/sqtop --debug-dump
154163
```
155164

156165
### 命令行参数

config.example.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
interval = 2.0
2-
user = "myli"
2+
user = "your-user-name"
33
all_jobs_enabled = true
44
start_in_all_jobs = false
55
history_window = "24h"

recipe/meta.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{% set version = environ.get("ST_VERSION", "0.1.7") %}
1+
{% set version = environ.get("ST_VERSION", "0.1.8") %}
22

33
package:
4-
name: s-top
4+
name: sqtop
55
version: {{ version }}
66

77
source:
@@ -12,13 +12,12 @@ build:
1212

1313
requirements:
1414
build:
15-
- {{ compiler('c') }}
1615
- {{ compiler('rust') }}
1716
- {{ stdlib('c') }}
1817

1918
test:
2019
commands:
21-
- s-top --help
20+
- sqtop --help
2221

2322
about:
2423
home: https://github.com/Wubeizhongxinghua/s-top

src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ pub fn print_debug_dump(dump: &DebugDump) -> Result<()> {
24572457

24582458
pub fn print_once_summary(snapshot: &ClusterSnapshot) {
24592459
println!(
2460-
"s-top summary | host {} | user {} | sampled {} ms | degraded {}",
2460+
"sqtop summary | host {} | user {} | sampled {} ms | degraded {}",
24612461
snapshot.hostname, snapshot.current_user, snapshot.sample_duration_ms, snapshot.degraded
24622462
);
24632463
println!("partitions:");

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl HistoryWindow {
5959

6060
#[derive(Debug, Parser)]
6161
#[command(
62-
name = "s-top",
62+
name = "sqtop",
6363
version,
6464
about = "Interactive Slurm partition and queue monitor"
6565
)]

src/config.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct FileConfig {
2121

2222
impl FileConfig {
2323
pub fn load() -> Result<Option<Self>> {
24-
let Some(path) = config_path() else {
24+
let Some(path) = preferred_existing_config_path() else {
2525
return Ok(None);
2626
};
2727

@@ -38,5 +38,23 @@ impl FileConfig {
3838
}
3939

4040
fn config_path() -> Option<PathBuf> {
41+
dirs::config_dir().map(|path| path.join("sqtop").join("config.toml"))
42+
}
43+
44+
fn legacy_config_path() -> Option<PathBuf> {
4145
dirs::config_dir().map(|path| path.join("s-top").join("config.toml"))
4246
}
47+
48+
fn preferred_existing_config_path() -> Option<PathBuf> {
49+
let current = config_path()?;
50+
if current.exists() {
51+
return Some(current);
52+
}
53+
54+
let legacy = legacy_config_path()?;
55+
if legacy.exists() {
56+
return Some(legacy);
57+
}
58+
59+
Some(current)
60+
}

0 commit comments

Comments
 (0)