Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
405b955
tweaks to besapi
jgstew Nov 18, 2022
5045c89
add get_bes_conn_using_config_file to besapi, update precommit, add test
jgstew Nov 18, 2022
77c319d
update actions, tag a new release.
jgstew Nov 18, 2022
2f144ee
create export_all_sites example script
jgstew Nov 18, 2022
51b14da
add comments
jgstew Nov 18, 2022
94cfb2f
rename folder
jgstew Nov 18, 2022
6363638
working example stop_open_completed_actions
jgstew Nov 18, 2022
c38ffc6
add another session relevane example
jgstew Nov 18, 2022
5407738
example to send message to all computers
jgstew Nov 18, 2022
599aedb
add examples
jgstew Nov 18, 2022
d643f6e
add examples
jgstew Dec 1, 2022
78b0aa7
fix indentation.
jgstew Dec 1, 2022
9ceae5e
update examples
jgstew Dec 1, 2022
e0e5058
tabs to spaces
jgstew Dec 1, 2022
f99b87f
add comment
jgstew Dec 2, 2022
ed62049
example session relevance in python reading and writing to files
jgstew Dec 2, 2022
a24765b
session relevance example json
jgstew Dec 2, 2022
6b4a476
non working example
jgstew Dec 6, 2022
94de7d9
working WoL example
jgstew Dec 7, 2022
909a03a
now working for multiple computer ids
jgstew Dec 7, 2022
0e0c792
remove debugging print statements. add comments
jgstew Dec 7, 2022
ef2a4b4
session relevance tweak
jgstew Dec 7, 2022
55cba76
rename variable
jgstew Dec 7, 2022
c952a64
update test build
jgstew Dec 7, 2022
3a42faa
get json results from session relevance using POST instead of GET.
jgstew Dec 7, 2022
ff145f0
tweak
jgstew Dec 7, 2022
0956e97
add get_upload function to besapi
jgstew Feb 16, 2023
10c008e
fix formatting
jgstew Feb 16, 2023
5697afc
formatting fixes
jgstew Feb 16, 2023
c7f6aef
bump for publish
jgstew Feb 16, 2023
9c9ac67
improved upload function implemented
jgstew Feb 16, 2023
6e302e1
bump version to publish implemented upload function improvements http…
jgstew Feb 16, 2023
04c9fda
proof of concept add mime field
jgstew Mar 13, 2023
3dfc844
add comments
jgstew Mar 13, 2023
7ce1bb1
example for getting resource uris from session relevance results.
jgstew Apr 10, 2023
d939661
Update __init__.py
jgstew Apr 11, 2023
48a711e
Update .flake8
jgstew Apr 11, 2023
3d1a6d9
export bes by relevance
jgstew Apr 11, 2023
b049f2d
some tweaks, added comments.
jgstew Apr 14, 2023
4f35c4c
add example to import bes file
jgstew Apr 27, 2023
6883f2e
add comment
jgstew Apr 27, 2023
1e2a1c9
added import bes function. Moved validator function.
jgstew May 3, 2023
62c07b4
pylint fixes, improve import
jgstew May 4, 2023
c1f74e0
tweak action
jgstew May 4, 2023
4856f2b
exclude examples folder
jgstew May 4, 2023
976d988
exclude self-run
jgstew May 4, 2023
0e72eb8
add script to import multiple files
jgstew May 8, 2023
b96569b
minor tweaks to examples
jgstew May 8, 2023
3083cf1
add output when about to import file
jgstew May 10, 2023
c1dbd58
example to create baseline based upon sesssion relevance result
jgstew May 24, 2023
aa79075
working baseline by relevance example
jgstew May 24, 2023
3977a02
update site ref
jgstew May 24, 2023
ca301b0
minor tweaks
jgstew May 25, 2023
bcebdfc
add ability to automatically create an offer action from generated ba…
jgstew May 27, 2023
6101830
add an async test, etc.
jgstew May 27, 2023
7bf11df
export using threads for multiprocessing
jgstew May 27, 2023
7017a54
trio async doesn't seem to work
jgstew May 27, 2023
585281f
working async exporting
jgstew May 28, 2023
7e244e3
tweak async
jgstew May 28, 2023
34658f1
tweak examples
jgstew May 28, 2023
a9ae98b
make the same
jgstew May 28, 2023
f16d575
tweak
jgstew May 28, 2023
223073f
add example
jgstew Jul 7, 2023
0947b6f
list mailbox files
jgstew Aug 11, 2023
9e07e1d
example to create mailbox file
jgstew Aug 11, 2023
33aa26f
Update setup.py
jgstew Aug 23, 2023
bb49902
Update __init__.py
jgstew Aug 23, 2023
6245b65
tweak examples
jgstew Sep 11, 2023
109b894
add upload files example, improve upload function
jgstew Oct 11, 2023
c9574b3
trigger new release
jgstew Oct 11, 2023
708a0bf
remove exception check for check_upload
jgstew Oct 11, 2023
500d88e
release improved upload function
jgstew Oct 11, 2023
8b791df
add back check for spaces.
jgstew Oct 11, 2023
15266a4
add working example to delete computers by file
jgstew Oct 14, 2023
55bf631
improve session relevance
jgstew Oct 14, 2023
b0ccf77
add comments
jgstew Oct 14, 2023
800dfb7
add example to use restapi using cmd args
jgstew Feb 21, 2024
ad74007
minor tweak, not needed.
jgstew Feb 21, 2024
6af60e2
add working client_query example
jgstew Feb 27, 2024
a1440a9
tweak
jgstew Feb 27, 2024
853e7a0
add comment
jgstew Feb 27, 2024
e46a964
comment out print statement used for debug
jgstew Feb 27, 2024
4c08327
add comments
jgstew Feb 27, 2024
99c53f8
add loop
jgstew Feb 27, 2024
cef1a9b
do not loop if not interactively run
jgstew Feb 27, 2024
60d0ebe
add comments
jgstew Feb 28, 2024
98260d3
Update besapi.py
jgstew Feb 28, 2024
23bc70c
Update __init__.py
jgstew Feb 28, 2024
27b22f8
add logging initialization only if run directly
jgstew Feb 29, 2024
8f6b9ee
add logging
jgstew Feb 29, 2024
7447efd
update pre-commits
jgstew Feb 29, 2024
85dc6d8
change where the version info is stored.
jgstew Feb 29, 2024
1799729
fix tests
jgstew Feb 29, 2024
13dfc74
Update besapi.py
jgstew Mar 7, 2024
68b875f
Update besapi.py
jgstew Mar 7, 2024
9afa1e1
Update baseline_by_relevance.py
jgstew Mar 12, 2024
a2447ca
add example baseline plugin
jgstew Mar 14, 2024
6d39a30
relevance tweaks
jgstew Mar 14, 2024
a83af31
improve trigger path handling
jgstew Mar 14, 2024
db17873
fix message
jgstew Mar 14, 2024
e2553c4
remove attempt at unusual baseline relevance
jgstew Mar 14, 2024
11f0597
improve logging
jgstew Mar 14, 2024
97b4527
add the site subscription relevance to baseline if over 100 components
jgstew Mar 14, 2024
014cfaa
fix overloaded site_name
jgstew Mar 14, 2024
66fa6df
improve baseline plugin
jgstew Mar 29, 2024
edc0e29
update requirements
jgstew Mar 31, 2024
ee1234e
add dashboard var get/set
jgstew Apr 1, 2024
c3f2f48
bump version again
jgstew Apr 1, 2024
1715624
update git actions
jgstew Apr 1, 2024
8f2a6a7
update actions
jgstew Apr 1, 2024
685f0b3
update git actions
jgstew Apr 1, 2024
5a98268
bump and release new version
jgstew Apr 1, 2024
2fa71c8
fix if logic
jgstew Apr 1, 2024
47cc21e
attempt to release a new version again
jgstew Apr 1, 2024
f47d258
add recommended files
jgstew Apr 1, 2024
5c0bda6
add example that uses new functionality
jgstew Apr 1, 2024
ffa8901
fix bug introduced in previous change
jgstew Apr 23, 2024
28cb450
allow baseline plugin to prompt for password
jgstew May 9, 2024
2fc220b
add serversettings restapi example
jgstew May 9, 2024
cc7f8f7
add comments
jgstew May 9, 2024
d0f4a86
add comment
jgstew May 9, 2024
99eb5af
add work in progress setup server plugin service
jgstew Jun 6, 2024
7ce0484
create MAG for server plugin service setup
jgstew Jun 6, 2024
e6e4218
add wake on lan medic
jgstew Jun 7, 2024
8377e3a
update relevance
jgstew Jun 21, 2024
5b97a69
removed unused import
jgstew Jun 21, 2024
f6552ea
wrap actionscript in cdata
jgstew Jun 21, 2024
1911b92
change to always log to console
jgstew Jun 21, 2024
066b119
remove unused global
jgstew Jun 21, 2024
d932aa5
update pylint
jgstew Jun 21, 2024
f3f2957
improved export all sites
jgstew Jun 25, 2024
52d59c7
fix export path for plugin
jgstew Jun 25, 2024
50ae207
tweak send message.
jgstew Aug 8, 2024
c29ba8a
tweak client query
jgstew Aug 8, 2024
9d39d58
tweak code to make it easier
jgstew Aug 8, 2024
6a15b15
make it easier to wake
jgstew Aug 8, 2024
f75056c
tweak the script
jgstew Aug 8, 2024
93fa58f
improve error handling
jgstew Aug 21, 2024
95210f3
add utility functions to make creating bigfix plugins easier
jgstew Aug 27, 2024
73b5642
fix test build
jgstew Aug 27, 2024
152f4e6
fix isort error, fix missing shell:bash
jgstew Aug 27, 2024
2f40812
update besapi version, cut release
jgstew Aug 27, 2024
04fec57
test publishing fix
jgstew Aug 27, 2024
bc7e78b
enhance plugin_utilities
jgstew Aug 27, 2024
98f3fe9
fix isort, fix tests
jgstew Aug 27, 2024
936bcb1
adding more utility functions for plugins
jgstew Aug 27, 2024
0169e8e
update export_all_sites to use new plugin_utilities to simplify
jgstew Aug 27, 2024
1648a39
add comment
jgstew Aug 28, 2024
578282a
add better logging, better logic
jgstew Aug 28, 2024
91ea1b8
fix path for log file
jgstew Aug 29, 2024
8871be3
fix isort
jgstew Aug 29, 2024
3a2d073
new release
jgstew Aug 29, 2024
c71cf30
tweak plugin utils for logging
jgstew Aug 29, 2024
74846ca
update pre-commit, dependabot
jgstew Aug 29, 2024
4923d84
add pre-commit action, remove isort action
jgstew Aug 29, 2024
4685a39
fix pre-commit trigger
jgstew Aug 29, 2024
e5f27e2
fix pre-commit trigger
jgstew Aug 29, 2024
d9d88c0
change logging function to return config
jgstew Aug 29, 2024
1f35bd2
new release
jgstew Aug 29, 2024
d433e02
rename logging config function
jgstew Aug 30, 2024
67090c7
add better error handling
jgstew Aug 30, 2024
058cb25
test get logging config
jgstew Aug 30, 2024
60e6520
improved tests
jgstew Aug 30, 2024
c36bd09
fix tests, change min python version
jgstew Aug 30, 2024
ba76f20
enhance tests
jgstew Aug 30, 2024
0504c82
tweak tests
jgstew Aug 30, 2024
dc44f18
fix tests
jgstew Aug 30, 2024
31a6aff
update version to reflect new minimum python version
jgstew Aug 30, 2024
05f0036
update example version
jgstew Aug 30, 2024
62c9665
Update besapi.py
jgstew Sep 27, 2024
6ef394b
add gitconfig defaults
jgstew Oct 16, 2024
164720f
add delete command, improve import command
jgstew Oct 21, 2024
aa90fab
Update besapi.py
jgstew Oct 22, 2024
aa0bdfd
Update setup_server_plugin_service.py
jgstew Jan 21, 2025
4f73614
add pre-commit hook
jgstew Jan 28, 2025
d791156
add better error handling for session_relevance_array
jgstew Feb 11, 2025
bf732ad
moving up minimum python version test
jgstew Feb 11, 2025
592b734
new release
jgstew Feb 11, 2025
6c807ff
minor tweaks
jgstew Feb 11, 2025
63a2606
revert change that broke things
jgstew Feb 11, 2025
60a5568
add to automatic tests
jgstew Feb 11, 2025
e6b655e
tweak test_build
jgstew Feb 11, 2025
7181b22
tweak test_build
jgstew Feb 11, 2025
6d88392
tweak test
jgstew Feb 11, 2025
ba3a106
enhance test_build
jgstew Feb 11, 2025
1e226f0
minor update
jgstew Feb 11, 2025
4693d35
refactor bescli
jgstew Feb 12, 2025
d0d4751
add smart tab completion for get/delete/post
jgstew Feb 12, 2025
95a36ce
strip whitespace just in case
jgstew Feb 12, 2025
8ed5677
new release
jgstew Feb 12, 2025
c7ebed9
add example for relay info
jgstew Feb 18, 2025
349868d
add print statement note
jgstew Feb 18, 2025
12daf37
add end session statement
jgstew Feb 20, 2025
adb946a
add relaynameoverride setting inspection
jgstew Feb 20, 2025
6e84ce3
add last report time filter
jgstew Feb 20, 2025
638a319
tweak comments
jgstew Feb 20, 2025
e849f7c
tweak example
jgstew Feb 20, 2025
9359bcb
fix logging method, get masthead parameters
jgstew Feb 20, 2025
1ea0353
add comment
jgstew Feb 20, 2025
c3e4199
add more info checks
jgstew Feb 21, 2025
66d4771
switch example to use plugin or config file for besapi creds
jgstew Feb 21, 2025
65c7a1c
first step for action monitor
jgstew Feb 24, 2025
5e5b39a
monitoring is working
jgstew Feb 24, 2025
1716a34
improve comments and logging
jgstew Feb 24, 2025
6377a69
handle missing success criteria
jgstew Feb 25, 2025
6864da8
add use case for custom relevance success criteria, simplify use of g…
jgstew Feb 25, 2025
54787b7
handle fixlet success criteria better
jgstew Feb 25, 2025
84c0a64
refactor action_and_monitor into function
jgstew Feb 25, 2025
2daa190
add example content
jgstew Feb 25, 2025
c6f202c
refactoring into functions action_and_monitor
jgstew Feb 25, 2025
9b6c2b4
add example usage comment
jgstew Feb 25, 2025
af91865
tweak logging info order
jgstew Feb 25, 2025
608340d
add typing for function input
jgstew Feb 25, 2025
ab85ea9
handle target xml
jgstew Feb 25, 2025
392fe20
add relay computer id to output
jgstew Feb 25, 2025
a65e366
some tweaks for targeting
jgstew Feb 25, 2025
116abc1
add example
jgstew Feb 25, 2025
f648dc5
rename example
jgstew Feb 25, 2025
1a7d15e
tweak comment
jgstew Feb 25, 2025
4d3a306
remove comment
jgstew Feb 25, 2025
075a7ff
tweak comments
jgstew Feb 25, 2025
089b59c
tweak logging level
jgstew Feb 26, 2025
452060b
add relay affiliation to relay info
jgstew Feb 26, 2025
7a43b6f
tweak relay select
jgstew Feb 26, 2025
66ff248
add ability to do single action
jgstew Feb 26, 2025
54456b9
add client seek list info
jgstew Feb 26, 2025
3115ba6
handle edge cases in targeting xml
jgstew Feb 28, 2025
35b1066
add boilerplate code to allow session relevance from file to take com…
jgstew Feb 28, 2025
8684a18
update pre-commit config
jgstew Feb 28, 2025
7cc9239
add manual workflow for harper cli grammar checker (#4)
jgstew Mar 2, 2025
f0fafda
test pre-commit hook
jgstew Mar 2, 2025
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
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Check http://editorconfig.org for more information
# This is the main config file for this project:
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
insert_final_newline = true

[*.py]
indent_size = 4

[*.{bes,bes.mustache}]
# bes files are XML, but the `actionscript` tag text must use crlf
end_of_line = crlf
indent_style = tab
indent_size = 3

[*.{bat,cmd}]
end_of_line = crlf
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ ignore = E127, E128, E203, E265, E266, E402, E501, E722, P207, P208, W503
exclude =
.git
__pycache__
examples
6 changes: 6 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[core]
hideDotFiles = true
[rebase]
autoStash = true
[pull]
rebase = true
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Set update schedule for GitHub Actions
version: 2

# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# Add assignees
assignees:
- "jgstew"
2 changes: 1 addition & 1 deletion .github/workflows/black.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: runner / black formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run black formatter checks
# https://github.com/rickstaa/action-black
uses: rickstaa/action-black@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
name: Python Lint Flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install flake8
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/grammar-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: grammar-check

on: workflow_dispatch

jobs:
grammar-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: x86_64-unknown-linux-gnu

- name: install harper grammar checker
run: cargo install --locked --git https://github.com/Automattic/harper.git --branch master --tag v0.23.0 harper-cli

- name: run harper grammar checker
run: harper-cli lint src/besapi/besapi.py
4 changes: 2 additions & 2 deletions .github/workflows/isort.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
name: runner / isort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install isort
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/misspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: misspell
if: ${{ !env.ACT }}
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"
reporter: github-check # Change reporter.
reporter: github-check # Change reporter.
17 changes: 17 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: pre-commit

on: pull_request

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# requites to grab the history of the PR
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1
with:
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
24 changes: 14 additions & 10 deletions .github/workflows/tag_and_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,47 @@ on:
- master
paths:
- "src/besapi/__init__.py"
- ".github/workflows/tag_and_release.yaml"
- "src/besapi/besapi.py"
# - ".github/workflows/tag_and_release.yaml"

jobs:
release_new_tag:
if: github.repository == 'jgstew/besapi'
name: Tag and Release
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: "actions/checkout@v1"
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install requirements
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Read VERSION file
id: getversion
run: echo "::set-output name=version::$(python ./setup.py --version)"

# only make release if there is NOT a git tag for this version
- name: "Check: package version has corresponding git tag"
# this will prevent this from doing anything when run through ACT
if: ${{ !env.ACT }}
if: ${{ !env.ACT }} && contains(steps.getversion.outputs.version, '.')
id: tagged
shell: bash
run: git show-ref --tags --verify --quiet -- "refs/tags/v${{ steps.getversion.outputs.version }}" && echo "::set-output name=tagged::0" || echo "::set-output name=tagged::1"
# wait for all other tests to succeed
# what if no other tests?
- name: Wait for tests to succeed
if: steps.tagged.outputs.tagged == 1
uses: lewagon/wait-on-check-action@v0.2
uses: lewagon/wait-on-check-action@v1.3.1
with:
ref: master
running-workflow-name: "Tag and Release"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30
- name: Install requirements
if: steps.tagged.outputs.tagged == 1
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Install build tools
if: steps.tagged.outputs.tagged == 1
run: pip install setuptools wheel build
Expand All @@ -66,6 +70,6 @@ jobs:
${{ steps.getwheelfile.outputs.wheelfile }}
- name: Publish distribution to PyPI
if: steps.tagged.outputs.tagged == 1
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
51 changes: 42 additions & 9 deletions .github/workflows/test_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: test_build
on:
push:
paths:
- "**.py"
- "src/**.py"
- "tests/**.py"
- "setup.cfg"
- "MANIFEST.in"
- "pyproject.toml"
Expand All @@ -13,7 +14,8 @@ on:
- ".github/workflows/tag_and_release.yaml"
pull_request:
paths:
- "**.py"
- "src/**.py"
- "tests/**.py"
- "setup.cfg"
- "MANIFEST.in"
- "pyproject.toml"
Expand All @@ -26,42 +28,73 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-13]
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
python-version: ["3.6", "3"]
python-version: ["3.9", "3"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install build tools
run: pip install setuptools wheel build pyinstaller

- name: Install requirements
shell: bash
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Read VERSION file
id: getversion
shell: bash
run: echo "$(python ./setup.py --version)"

- name: Run Tests - Source
run: python tests/tests.py

- name: Test invoke directly src/bescli/bescli.py
run: python src/bescli/bescli.py ls logout clear error_count version exit

- name: Test invoke directly src/besapi/besapi.py
run: python src/besapi/besapi.py ls logout clear error_count version exit

- name: Test invoke directly -m besapi
run: cd src && python -m besapi ls logout clear error_count version exit

- name: Test invoke directly -m bescli
run: cd src && python -m bescli ls logout clear error_count version exit

- name: Run build
run: python3 -m build

- name: Get Wheel File Path
id: getwheelfile
shell: bash
run: echo "::set-output name=wheelfile::$(find "dist" -type f -name "*.whl")"

- name: Test pip install of wheel
shell: bash
run: pip install $(find "dist" -type f -name "*.whl")

- name: Test python import besapi
shell: bash
run: python -c "import besapi"
run: python -c "import besapi;print(besapi.besapi.__version__)"

- name: Test python import bescli
shell: bash
run: python -c "import bescli"
run: python -c "import bescli;bescli.bescli.BESCLInterface().do_version()"

- name: Test python bescli
shell: bash
run: python -m bescli ls logout clear error_count version exit

- name: Run Tests - Pip
run: python tests/tests.py --test_pip
- name: Test pyinstaller

- name: Test pyinstaller build
run: pyinstaller --clean --collect-all besapi --onefile ./src/bescli/bescli.py

- name: Test bescli binary
run: ./dist/bescli ls logout clear error_count version exit
4 changes: 2 additions & 2 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
besapi.conf

tmp/

.DS_Store

# Byte-compiled / optimized / DLL files
Expand Down
24 changes: 17 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# https://github.com/pre-commit/pre-commit-hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-json
Expand All @@ -27,19 +27,29 @@ repos:
# - id: no-commit-to-branch
# args: [--branch, main]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
rev: v1.35.1
hooks:
- id: yamllint
args: [-c=.yamllint.yaml]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.2
hooks:
- id: check-github-workflows
args: ["--verbose"]
- id: check-dependabot
- repo: meta
hooks:
- id: check-useless-excludes
- id: check-hooks-apply
- repo: https://github.com/crate-ci/typos
rev: v1.30.0
hooks:
- id: typos
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[MESSAGES CONTROL]
disable = C0330, C0326, C0103, c-extension-no-member, cyclic-import, no-self-use, unused-argument
disable = C0103, c-extension-no-member, cyclic-import, no-self-use, unused-argument

[format]
max-line-length = 88
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"EditorConfig.EditorConfig",
"github.vscode-github-actions",
"ms-python.black-formatter",
"ms-python.python"
]
}
Loading
Loading