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
11 changes: 5 additions & 6 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ SFTP-like command line client for Mediaflux and S3 (Pawsey). Python >= 3.6, stan
## Build, test, run

- Run: `python3 pshell.py [-c config] [-v 0|1|2] [-i script] [-o failed_script] [-u url -t mflux|s3] ["cmd1 && cmd2"]`
- All tests: `./test_all` (runs the four main test modules and `test_runner.py` with `python3`; release bundle tests are separate)
- Single module: `python3 test_parser.py` (also `test_mfclient.py`, `test_s3client.py`, `test_pshell.py`)
- The four main test modules use `unittest` with a custom `__main__` that builds the suite from a `test_class_list`. Single method: `python3 -m unittest test_s3client.s3client_standard.test_convert` — except `test_s3client.py`/`test_mfclient.py`, whose `setUp` uses a client global created in `__main__` (and `test_pshell.py`, which uses `config`, `python`, `script`, `verbosity` globals); for those, edit `test_class_list` and run as a script.
- `test_mfclient.py` / `test_s3client.py` use dummy clients (no server needed); `test_pshell.py` runs `pshell.py` as a subprocess and checks exit codes.
- No linter configured. GitHub Actions runs the full suite and release bundle tests on Python 3.9, 3.12 and 3.6 (in a container). The older Bitbucket pipeline only runs `python test_mfclient.py` on python:3.6.
- All tests: `./test_all` (runs the four main test modules and `tests/test_runner.py` with `python3`; release bundle tests are separate)
- Single module: `python3 tests/test_parser.py` (also `tests/test_mfclient.py`, `tests/test_s3client.py`, `tests/test_pshell.py`)
- The four main test modules use `unittest` with a custom `__main__` that builds the suite from a `test_class_list`. Single method: `python3 -m unittest tests.test_s3client.s3client_standard.test_convert` — except `tests/test_s3client.py`/`tests/test_mfclient.py`, whose `setUp` uses a client global created in `__main__` (and `tests/test_pshell.py`, which uses `config`, `python`, `script`, `verbosity` globals); for those, edit `test_class_list` and run as a script.
- `tests/test_mfclient.py` / `tests/test_s3client.py` use dummy clients (no server needed); `tests/test_pshell.py` runs `pshell.py` as a subprocess and checks exit codes.
- No linter configured. GitHub Actions runs the full suite and release bundle tests on Python 3.9, 3.12 and 3.6 (in a container).
- Packaging: `build_test` calls `build_release`, which uses `release_main.py` as `__main__.py` and bundles `pshell.py`, `parser.py`, `mfclient.py`, `s3client.py`, `util.py`, `LICENSE`, `NOTICE`, and both dependency sets into an executable zip. Add new application modules to the file list in `build_release`. The release script stamps the `build` line in its staged copy of `pshell.py`.
- `v3/` is a legacy/experimental tree (FUSE mount, older mfclient); `keystone.py` is a standalone helper. Main code is at the repo root.

## Architecture

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: ./build_test

- name: Test executable bundle
run: python test_release.py
run: python tests/test_release.py

test-python-36:
name: Python 3.6
Expand All @@ -63,4 +63,4 @@ jobs:
--volume "$GITHUB_WORKSPACE:/workspace" \
--workdir /workspace \
python:3.6.15-bullseye \
bash -ec 'python -m pip install -r requirements.txt && ./test_all && python test_release.py'
bash -ec 'python -m pip install -r requirements.txt && ./test_all && python tests/test_release.py'
29 changes: 0 additions & 29 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The build includes separate dependency sets for Python 3.6-3.12 and Python
Python runtime.

Run it with `./release/pshell`.
After building, run `python3 test_release.py` to check the packaged executable.
After building, run `python3 tests/test_release.py` to check the packaged executable.


### Docker
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require a compatible boto3 installation.

### How do I run the tests? ###

Run test_all
Run `./test_all`

### Command line client ###

Expand Down
13 changes: 0 additions & 13 deletions bitbucket-pipelines.yml

This file was deleted.

3 changes: 3 additions & 0 deletions build_release
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
set -e

# run from the repository root regardless of invocation directory
cd "$(dirname "$0")"

echo "Building a zip bundle with version timestamp for release"

# stage the application and its dependencies outside the release directory
Expand Down
2 changes: 1 addition & 1 deletion build_test
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -e

echo "Building a zip bundle for testing - use build_release for artifact publishing"
./build_release
"$(dirname "$0")/build_release"

23 changes: 0 additions & 23 deletions data/.mf_config

This file was deleted.

Empty file removed data/__init__.py
Empty file.
11 changes: 0 additions & 11 deletions docker/Dockerfile.py2env

This file was deleted.

11 changes: 0 additions & 11 deletions docker/Dockerfile.py3env

This file was deleted.

199 changes: 0 additions & 199 deletions keystone.py

This file was deleted.

Loading
Loading