Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 37 additions & 17 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,44 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install runtime dependencies
run: |
pip3 install --user \
build \
twine

- name: Build Python package
run: |
set -x
python3 -m build
tar tvf dist/pydf-*.tar.gz
unzip -l dist/pydf-*-py3-none-any.whl
twine check --strict dist/pydf-*

- name: Install Python package
run: |
set -x
pip3 install --user .
echo ~/.local/bin | tee "${GITHUB_PATH}"

- name: Run smoke tests
run: |
export PS4=$'\n# '
set -x
./pydf
./pydf --help
./pydf --version
./pydf --all
./pydf --human-readable
./pydf --si
./pydf --block-size=1
./pydf --local
./pydf --kilobytes
./pydf --megabytes
./pydf --gigabytes
./pydf --blocks
./pydf --bw
./pydf --scale-bars
./pydf --mounts=/etc/mtab
./pydf --show-binds
./pydf --inodes
pydf
pydf --help
pydf --version
pydf --all
pydf --human-readable
pydf --si
pydf --block-size=1
pydf --local
pydf --kilobytes
pydf --megabytes
pydf --gigabytes
pydf --blocks
pydf --bw
pydf --scale-bars
pydf --mounts=/etc/mtab
pydf --show-binds
pydf --inodes
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist/
/pydf.egg-info/
2 changes: 1 addition & 1 deletion pydf
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def makecolour(clist):
return s

def version():
return '15'
return '15' # keep in sync with file "pyproject.toml"

def get_all_mountpoints():
"return all mountpoints in fs"
Expand Down
47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[project]
name = "pydf"
description = "df(1) clone with colour output"
version = "15" # keep in sync with function "version" in file "pydf"
readme = { file = "README", content-type = "text/plain" }
license = "CC-PDDC"
license-files = ["COPYING"]
authors = [
{ name = "Radovan Garabík", email = "garabik@kassiopeia.juls.savba.sk" },
]
requires-python = ">=3.10"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
requires-python = ">=3.10"
requires-python = ">=3.4"

According to vermin, 3.4 is the min version supported:

❯ uvx vermin --no-parse-comments -v .
Detecting python files..
Analyzing 2 files using 12 processes..
2.6, 3.0     /Users/kartik/GH/pydf/attic/gs.py
!2, 3.4      /Users/kartik/GH/pydf/pydf
Minimum required versions: 3.4
Incompatible versions:     2.x

where

❯ uvx vermin --no-parse-comments -vv .
[...]
!2, 3.4      /Users/kartik/GH/pydf/pydf
[...]
  'os.path.ismount' member requires !2, 3.4
[...]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k4rtik interesting command! I would like to stick to >=3.10 because <=3.9 is very dead: https://endoflife.date/python

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am aware of that. The INSTALL file currently says this project needs at least 3.1, so I thought there might be an interest in supporting older versions for a system utility like pydf.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My personal vote for killing all remains of <3.10 with fire. I see your point about things being in sync. The PR here is in sync with CI is currently doing. @garabik are you on board with me dropping official remains of <3.10 support (a) in here or (b) in a follow-up PR?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I very much agree with @k4rtik there is an interest in supporting older python versions (I am myself in such a position, I have accounts on some servers that Are Not To Be Touched with upgrades). Having said that, I agree with dropping <3.10 support officially, esp. for pypi, as long as we do not introduce syntax errors into the tool itself needlessly...

classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
Comment on lines +19 to +23
Copy link

@k4rtik k4rtik Jan 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",

I'd avoid these for maintainability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k4rtik adding support for 3.15 and dropping support for 3.10 needs touching some files in any case and this is a place where I would know to check and the fix being trivial: I'm touching these in a number of projects and that part has never been a personal pain point for me. I'm good with keeping or dropping them here, with a preference to keep. @garabik how do you feel about these?

"Programming Language :: Python :: 3 :: Only",
"Topic :: System",
"Topic :: System :: Filesystems",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
]
keywords = ["df", "disk space", "colours", "filesystems"]

[project.urls]
"Homepage" = "https://github.com/garabik/pydf"
"Git Repository" = "https://github.com/garabik/pydf"
"Issue Tracker" = "https://github.com/garabik/pydf/issues"

[tool.setuptools.data-files]
"bin" = ["pydf"]
"etc" = ["pydfrc"] # best effort
"share/man/man1" = ["pydf.1"]

[tool.setuptools.packages.find]
include = []

[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"