Closed johnlettman closed 3 weeks ago
It's worth noting the tools may need to be tweaked. It contains my opinionated modifications to 120-character lines, ditching the claustrophobic PEP8 80 characters.
As a result, the linter edits cause the following diff:
Lastly, if you go in this direction, I'll happily follow up with baking a full matching workflow.
I've added a commit for single-file static executable bundling. The commit message explains it a bit:
This commit adds a simple configuration for Pyinstaller to Poetry using poetry-pyinstaller-plugin. It results in poetry build
emitting a static binary target, easy for carrying along into restrictive environments without concern for the Python version or existence of dependencies.
poetry build
[...]
Preparing PyInstaller 6.10.0 environment /home/jlettman/.cache/pypoetry/virtualenvs/jockey-Msi6Fc7k-py3.10
Building binaries with PyInstaller Python 3.10 [manylinux_2_35_x86_64]
- Building jockey SINGLE_FILE
[...]
dist/pyinstaller/manylinux_2_35_x86_64/jockey --help
usage: jockey [-h] [--refresh] [-f FILE] object [filters ...]
Jockey - A Juju query language to put all your Juju objects at your fingertips.
[...]
file dist/pyinstaller/manylinux_2_35_x86_64/jockey
dist/pyinstaller/manylinux_2_35_x86_64/jockey: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=04804d3c31218f938502cbed5cdd1af09d59a8f0, for GNU/Linux 2.6.32, stripped
This should also close #27
It will attach the dist binaries for each OS to the workflow.
Closes #34 if CODECOV_TOKEN
is added to the repository secrets.
Added automatic documentation workflow using pdoc:
Wow, this is an enormous PR. Very nice.
I have some mixed feelings about the 120 character width linting. I happen to use a portrait monitor, so I like that narrower code look. But, I just tested it and I am able to fit 120 character lines without any issue, so I am okay with setting it as the convention for this project.
Let's modify that black lint I have in CI to use black -l 120
then get this huge PR merged.
Sorry about the enormity, haha. I aim to get the development environment in a nice place to help move away from the single-file Python file to a portable executable. Then, of course, there are the pipelines and documentation sites.
Let's modify that black lint I have in CI to use
black -l 120
then get this huge PR merged.
Would you like this as a separate PR for your existing ci.yml
?
This is currently implemented in the PR:
https://github.com/LCVcode/jockey/blob/a6f6eae4f0dc98c93a69c085d9f909c1b9eaf301/pyproject.toml#L56-L57
Closes #34 if
CODECOV_TOKEN
is added to the repository secrets.
Also, @LCVcode, as a note here: the new workflow(s) support automatically detects if CodeCov is enabled by checking for the CODECOV_TOKEN
repository action secret. It's free for FOSS repositories, such as this one, so it may be a helpful tool to track test coverage per #34.
Added snap capability per #7:
Sorry for the noise, the snapcraft action seems to act vastly different than the local version.
SUCCESS! The snaps are built correctly now, and they're in the workflow. Phew!
New workflow:
Artifacts:
You're a beast! Thank you for all the crazy contributions.
No problem! :D I'm happy to help (plus, I did say I'd contribute back at Canonical)
Et voila, this ends my PR spam for tonight.
This PR moves the repository to the Poetry Python dependency management and packaging system. Poetry helps manage the various development tools, keeping everything in one TOML config: https://python-poetry.org/
In other projects, I use it for relatively comprehensive workflows to check everything: https://github.com/johnlettman/jujucvetool/actions/runs/10425763665
Later down the road, this will also help with packaging.