Cross-platform Python installation support scripts for DTU
Project description
pis-utils
Cross-platform Python Installation Support utilities for DTU
A PyPI-ready package providing command-line tools for installing and configuring development tools at DTU (Technical University of Denmark).
Features
- ๐ Miniforge3 Installer - Automated conda/mamba installation from philipnickel/miniforge
- ๐ VS Code Installer - Automated installation with extensions and settings
- ๐ง Cross-platform - Works on Windows, macOS (Intel & Apple Silicon), and Linux
- ๐ฆ Easy to use - Simple CLI commands with beautiful progress indicators
- ๐งช Well tested - Comprehensive test suite with 40 tests
- ๐ ๏ธ Clean Uninstall - Complete removal of tools and user data
Installation
For End Users
From GitHub (recommended for now):
# Install VS Code with extensions and settings
uvx --from git+https://github.com/PN-CourseWork/miniforge-DTU-PIS pis-utils install vscode
Future: From PyPI (once published):
uvx pis-utils install vscode
For Development
# Clone the repository
git clone https://github.com/PN-CourseWork/miniforge-DTU-PIS.git
cd PIS-Scripts-Utilities
# Install in editable mode with development dependencies
uv sync --all-extras
# Verify installation
pis-utils --version
Usage
Install Miniforge3 (Conda)
# Install latest stable release
pis-utils install conda
# Install development (prerelease) version
pis-utils install conda --prerelease
This will:
- Download the appropriate Miniforge3 installer for your platform
- Run the installer in batch mode with conda initialization
- Set up conda/mamba for Python package management
Note: Restart your terminal after installation to activate conda.
Install VS Code
# Install VS Code with extensions and settings
pis-utils install vscode
This will:
- Download and install VS Code for your platform
- Install Python development extensions (Python, Jupyter)
- Apply settings to disable AI features and the Python Environments extension
- Configure VS Code with optimal defaults for Python development
Note: The Python extension automatically installs Pylance and Python Debugger. The Python Environments extension is also installed but disabled via the python.useEnvironmentsExtension setting to maintain the classic environment selection experience.
Uninstall Tools
# Uninstall conda/Miniforge3
pis-utils uninstall conda
# Uninstall VS Code
pis-utils uninstall vscode
Available Commands
# Show help
pis-utils --help
# Show version
pis-utils --version
# Install commands
pis-utils install --help
pis-utils install conda
pis-utils install vscode
# Uninstall commands
pis-utils uninstall --help
pis-utils uninstall conda
pis-utils uninstall vscode
Development
Project Structure
PIS-Scripts-Utilities/
โโโ src/pis_utils/ # Main package
โ โโโ cli.py # CLI entry point
โ โโโ config.toml # Configuration (URLs, settings, extensions)
โ โโโ core/ # Core utilities
โ โ โโโ console.py # Rich console instance
โ โ โโโ platform.py # Platform/architecture detection
โ โ โโโ download.py # HTTP download utilities
โ โโโ commands/ # Command implementations
โ โโโ install.py # Install command group
โ โโโ uninstall.py # Uninstall command group
โ โโโ conda.py # Miniforge3 installer
โ โโโ vscode.py # VS Code installer
โโโ tests/ # Test suite
โ โโโ commands/ # Command tests
โ โโโ core/ # Utility tests
โ โโโ conftest.py # Pytest fixtures
โ โโโ test_cli.py # CLI tests
โโโ pyproject.toml # Package metadata
โโโ README.md
Running Tests
# Run all tests
pytest
# Run specific test file
pytest tests/commands/test_vscode.py
# Run specific test function
pytest tests/commands/test_vscode.py::test_get_download_url_windows
# Run with coverage
pytest --cov --cov-report=html
# View coverage report
open htmlcov/index.html # macOS
Code Quality
# Format code
ruff format .
# Lint code
ruff check .
# Auto-fix linting issues
ruff check --fix .
# Type check
mypy src/
Building and Testing Locally
# Build the package
uv build
# Verify build outputs
ls dist/
# Should see: pis_utils-0.1.0-py3-none-any.whl and pis_utils-0.1.0.tar.gz
# Test installation from wheel
uv pip install dist/pis_utils-0.1.0-py3-none-any.whl --force-reinstall
# Test the CLI
pis-utils --version
pis-utils install vscode
# Test via uvx (simulates end-user experience)
uvx --from . pis-utils install vscode
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and linting (
pytest && ruff check .) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE for details.
Maintainer
Philip Korsager Nickel - philipnickel@outlook.dk
Related Projects
This package is part of the DTU Miniforge3 ecosystem:
- DTU Miniforge3 - Customized Miniforge3 installers for DTU courses
- pis-utils (this repo) - Python installation support utilities
Legacy Installation Methods (from main DTU Miniforge3 repo)
For Miniforge3 and legacy VS Code installation scripts, see the main DTU Miniforge3 repository.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pis_utils-0.1.1.tar.gz.
File metadata
- Download URL: pis_utils-0.1.1.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cea09fbb086d041b98bf29529d70069ab8bc509de6c8541fe88f532e227091a4
|
|
| MD5 |
3a01aeb4e89e068b2bc942dfe3655810
|
|
| BLAKE2b-256 |
07c08ff8af783dc273af1c6d3c034b67659255bede09d7e6ade050742e24d3ac
|
Provenance
The following attestation bundles were made for pis_utils-0.1.1.tar.gz:
Publisher:
publish.yml on philipnickel/PIS-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pis_utils-0.1.1.tar.gz -
Subject digest:
cea09fbb086d041b98bf29529d70069ab8bc509de6c8541fe88f532e227091a4 - Sigstore transparency entry: 991620772
- Sigstore integration time:
-
Permalink:
philipnickel/PIS-utils@0c1735d7186d7290113ac445622515528359e74d -
Branch / Tag:
refs/heads/master - Owner: https://github.com/philipnickel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c1735d7186d7290113ac445622515528359e74d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pis_utils-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pis_utils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c59fa6fabd110609a9dfe6f1dc02a54199aac2781a9d34c57b8078aee8a4b1a
|
|
| MD5 |
7e7cae945438af6ea27865d2e7445463
|
|
| BLAKE2b-256 |
4c9f20b8ebaf5b3b60cbc591a438aaf9d8f5678039b367262e909725b8f4b026
|
Provenance
The following attestation bundles were made for pis_utils-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on philipnickel/PIS-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pis_utils-0.1.1-py3-none-any.whl -
Subject digest:
8c59fa6fabd110609a9dfe6f1dc02a54199aac2781a9d34c57b8078aee8a4b1a - Sigstore transparency entry: 991620774
- Sigstore integration time:
-
Permalink:
philipnickel/PIS-utils@0c1735d7186d7290113ac445622515528359e74d -
Branch / Tag:
refs/heads/master - Owner: https://github.com/philipnickel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c1735d7186d7290113ac445622515528359e74d -
Trigger Event:
push
-
Statement type: