Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
4b01188
add bely command-line tool
echandler-anl May 8, 2026
8308842
moving entry code to different file, clean up argument names, prompt …
echandler-anl May 8, 2026
72e347a
bely-cli: cache login session
echandler-anl May 8, 2026
5c88392
bely-api: add config set command
echandler-anl May 8, 2026
d68e714
renaming settings.py to config.py
echandler-anl May 13, 2026
d65cb47
add -o option for writing files
echandler-anl May 13, 2026
3fc2fef
add doc name in generated entry file
echandler-anl May 13, 2026
4d5759b
moved files to bely-cli directory. changed system|template|type comm…
echandler-anl May 14, 2026
03bad3a
add unit tests, change the install script path
echandler-anl May 14, 2026
de42abc
beli-cli add run_test script
echandler-anl May 14, 2026
06a2973
update bely doc new and bely entry add to automatically open an edito…
echandler-anl May 21, 2026
7c75463
fill in build and test cicd jobs
echandler-anl Jun 10, 2026
c82a164
bely-cli: add global --format option (text/json/yaml)
iTerminate Jun 19, 2026
8b5c7b2
bely-cli: update tests for --format and add json-output case
iTerminate Jun 19, 2026
7890fb6
bely-cli: fix run_test.sh python typo and unittest discovery
iTerminate Jun 19, 2026
38f53c5
Add readme with instructions on usage of the CLI
iTerminate Jun 19, 2026
7039c45
Extend the settings file path and token path(via settings file) to be…
iTerminate Jun 19, 2026
14b1dc5
Add ability to have shared settings and user specific override.
iTerminate Jun 19, 2026
291c67d
BELY API import is quite large. Simple -h commands took 2+ seconds. I…
iTerminate Jun 19, 2026
a5de079
Format should show up and be applied to the commands that provide out…
iTerminate Jun 19, 2026
8bf53dc
Add a simpl TUI tool for lookiing up a log entry.
iTerminate Jun 19, 2026
f512a05
Use the terminal color pallete to ensure easy viability of the tui.
iTerminate Jun 19, 2026
152c243
Add tui performance improvements with caching and show esc delay.
iTerminate Jun 19, 2026
3d7e797
Allow navigation previous and next log entry when looking at the entr…
iTerminate Jun 19, 2026
63c4cff
add general exception handling in bely cli
echandler-anl Jun 22, 2026
b316872
rename bely to bely-cli
echandler-anl Jun 26, 2026
7d4068d
switch to raising exception for propagating errors
echandler-anl Jun 26, 2026
aae5249
add option to read entry data from stdin
echandler-anl Jun 26, 2026
dc9d54a
the no prompot should appear on the leaf node.
iTerminate Jul 9, 2026
43d008f
Add uv packagaing for publishing bely-cli to pypi and conda repo
iTerminate Aug 18, 2026
096f740
run `uv sync`
iTerminate Aug 18, 2026
7f1f210
Migrate to textual/rich for the TUI
iTerminate Aug 19, 2026
c6b8c34
use uv to run tests
iTerminate Aug 19, 2026
6bb8700
add claude.md
iTerminate Aug 19, 2026
c9d0ff5
Add a github workflow for bely-cli tests
iTerminate Aug 19, 2026
3d407f6
Expose the editing functionality of this CLI to the TUI as well.
iTerminate Aug 19, 2026
4ebadc9
Resolve issue where editor changes were not detected when using edito…
iTerminate Aug 19, 2026
e02bee3
Add buttons for the compose dialog.
iTerminate Aug 19, 2026
a0b7aa2
clean up comment.
iTerminate Aug 19, 2026
d216b09
Resolve issue where filter is not visible when looking up logbook or …
iTerminate Aug 19, 2026
60330b5
Resolve test issue
iTerminate Aug 19, 2026
2f5909e
Allow saving the theme.
iTerminate Aug 19, 2026
f080951
Add ability base functioanlity to parse out images from the markdown.
iTerminate Aug 20, 2026
e547583
Add confituration integration for selection of image protocol to disp…
iTerminate Aug 20, 2026
4d5a889
Integrate viewing images into the tui
iTerminate Aug 20, 2026
aadf771
Shorten comments
iTerminate Aug 20, 2026
3e50224
Add documentation and packaging for image support.
iTerminate Aug 20, 2026
81874a9
Resolve issue with going back to a blank screen and blank screen when…
iTerminate Aug 20, 2026
2faf007
Add a basic dialog with save and cancel with ctrl+s and escape key bi…
iTerminate Aug 20, 2026
cb144d4
Apply to picker and login screen
iTerminate Aug 20, 2026
a7edb36
Apply buttons for new document dialog
iTerminate Aug 20, 2026
6a8b24d
Integrate the configuration screen with the buttons
iTerminate Aug 20, 2026
89eb1e2
Prepare tree format for displaying replies.
iTerminate Aug 20, 2026
b1a4fba
Integrate replies into the browse screen.
iTerminate Aug 20, 2026
3c08899
Add ability to toggle replies
iTerminate Aug 20, 2026
51cb450
Restructure bely-api into uv packaging and clean up the cdb-cli stuff.
iTerminate Aug 21, 2026
b488b3a
Prepare for pypi packaging and follow the new api structure.
iTerminate Aug 21, 2026
35e5f8d
Add uv packaging to pypi for api and cli
iTerminate Aug 21, 2026
a9d9bc4
Add prepare release that will update all the necessary versions befor…
iTerminate Aug 21, 2026
6ef506d
Document the new functionality in readme and Makefile.
iTerminate Aug 21, 2026
a346c4c
Extend the pypi packaging to the mqtt framework
iTerminate Aug 21, 2026
f73f16b
add make help
iTerminate Aug 21, 2026
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
46 changes: 46 additions & 0 deletions .github/workflows/test-bely-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test BELY CLI

on:
pull_request:
paths:
- 'tools/developer_tools/bely-cli/**'
- '.github/workflows/test-bely-cli.yml'
workflow_dispatch:

jobs:
test:
name: Run BELY CLI Tests
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/developer_tools/bely-cli

strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']

env:
UV_PYTHON: ${{ matrix.python-version }}
# pyproject.toml pins bely-api to the ../python-client/packages/api directory,
# whose generated belyApi/ subpackage is gitignored and so absent on a fresh
# checkout. Resolve just that one package from PyPI instead. Job-level so
# `uv run` inside run_test.sh honours it too.
UV_NO_SOURCES_PACKAGE: bely-api

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: tools/developer_tools/bely-cli/uv.lock

- name: Install dependencies
run: uv sync

- name: Run tests
run: ./run_test.sh
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ tools/developer_tools/portal_testing/CdbFunctionalTester/nbproject/private/
/tools/developer_tools/python-client/*
/tools/developer_tools/python-client/**/.DS_Store
!/tools/developer_tools/python-client/generatePyClient.sh
!/tools/developer_tools/python-client/BelyApiFactory.py
!/tools/developer_tools/python-client/ClientApiConfig.yml
!/tools/developer_tools/python-client/cdbCli
!/tools/developer_tools/python-client/setup-cli.py
!/tools/developer_tools/python-client/setup-api.py
!/tools/developer_tools/python-client/test
!/tools/developer_tools/python-client/conda-recipe
!/tools/developer_tools/python-client/conda-build.sh
!/tools/developer_tools/python-client/data
## Conda API build
!/tools/developer_tools/python-client/pyproject.toml
!/tools/developer_tools/python-client/uv.lock
!/tools/developer_tools/python-client/README.md
!/tools/developer_tools/python-client/packages
/tools/developer_tools/python-client/packages/api/belyApi/
/tools/developer_tools/python-client/packages/**/__pycache__/
/tools/developer_tools/python-client/packages/**/dist/
/tools/developer_tools/python-client/conda-recipe/API/build
/tools/developer_tools/python-client/conda-recipe/API/src
/tools/developer_tools/python-client/conda-recipe/API/bely-api-env.txt

# Generated deployment specific config files
Expand Down Expand Up @@ -55,7 +57,6 @@ docs/python/_build/
/src/python/dist

# Temporary testing csv files
tools/developer_tools/python-client/cdbCli/service/cli/Spreadsheets/
.env
tools/developer_tools/bely-mqtt-message-broker/conda-bld
tools/developer_tools/bely-mqtt-message-broker/dev-config
Expand Down
50 changes: 50 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,62 @@ TOP = .
#SUBDIRS = irmis src
SUBDIRS = src

.PHONY: help
.PHONY: support support-mysql dev-config
.PHONY: db backup db-dev deploy-web-portal undeploy-web-portal deploy-web-service undeploy-web-service
.PHONY: db-dev backup-dev deploy-web-portal-dev undeploy-web-portal-dev deploy-web-service-dev undeploy-web-service-dev
.PHONY: prepare-release release-python-client

default:

help:
@echo "BELY - available make targets"
@echo ""
@echo "Setup:"
@echo " support Install support software (Java, Payara, MySQL, etc.)"
@echo " support-portal Install support software for the web portal only"
@echo " support-mysql Install MySQL and deploy mysqld"
@echo " support-netbeans Install NetBeans IDE"
@echo " dev-config Create development configuration"
@echo " configuration Create deployment configuration"
@echo " prepare-dev-env support + db + dev-config"
@echo ""
@echo "Database:"
@echo " clean-db Create a clean database with schema"
@echo " test-db Create a test database with test data"
@echo " db Create the database (interactive)"
@echo " backup Backup the database"
@echo ""
@echo "Build & Deploy:"
@echo " configure-web-portal Configure the web portal"
@echo " deploy-web-portal Deploy the web portal"
@echo " deploy-web-service Deploy the web service"
@echo " deploy-cdb-plugin Deploy a BELY plugin"
@echo " unconfigure-web-portal Unconfigure the web portal"
@echo " undeploy-web-portal Undeploy the web portal"
@echo " undeploy-web-service Undeploy the web service"
@echo ""
@echo "Testing:"
@echo " test Run the full test suite (backs up DB, deploys test DB,"
@echo " runs tests, restores DB)"
@echo " test-plugins Run plugin utility tests"
@echo ""
@echo "Release:"
@echo " prepare-release Bump the version across the repo and scaffold release notes"
@echo " release-python-client Build and publish bely-api, bely-cli, and"
@echo " bely-mqtt-framework to PyPI"
@echo ""
@echo "Development variants:"
@echo " Most Setup/Database/Build & Deploy targets above have a '-dev' counterpart"
@echo " (e.g. db-dev, backup-dev, deploy-web-portal-dev) that operates against the"
@echo " dev configuration/database instead of the production one."

prepare-release:
$(TOP)/sbin/bely_prepare_release.py

release-python-client:
$(TOP)/sbin/bely_release_pip.py

prepare-dev-env: support db dev-config

dev-config:
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,17 @@ source setup.sh
make test
```

# Preparing a Release

```sh
source setup.sh
make prepare-release # bumps the version everywhere and scaffolds release notes
# review the diff, then commit
make release-python-client # publishes bely-api, bely-cli, and bely-mqtt-framework to PyPI
```

See `tools/developer_tools/python-client/README.md` for the full build/publish/conda
procedure, including TestPyPI dry runs.

# License
[Copyright (c) UChicago Argonne, LLC. All rights reserved.](https://github.com/AdvancedPhotonSource/ComponentDB/blob/master/LICENSE)
Loading
Loading