Skip to content

Commit e3628b6

Browse files
committed
docs: refactor README into separate documentation files
split the project documentation into focused markdown files for easier navigation and maintenance - keep the main README focused on usage and command reference - move development and contribution guidelines to CONTRIBUTING.md - move packaging and release instructions to PACKAGING.md - add links between the documentation files - add a table of contents to the README
1 parent 1129cbe commit e3628b6

3 files changed

Lines changed: 194 additions & 117 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing
2+
3+
Thanks for contributing to Java Inventory.
4+
5+
## Development setup
6+
7+
Install the required tools listed in the [README](README.md#requirements), then initialize the project:
8+
9+
```shell
10+
python java_inventory.py setup
11+
```
12+
13+
Use the CLI directly while developing:
14+
15+
```shell
16+
python java_inventory.py --help
17+
```
18+
19+
## Before submitting changes
20+
21+
Run the linter against your staged changes:
22+
23+
```shell
24+
python java_inventory.py lint . --cached
25+
```
26+
27+
For changes to inventory or coverage behavior, also run the relevant command against the development test project.
28+
29+
For example:
30+
31+
```shell
32+
python java_inventory.py test-coverage \
33+
dev-test/src/main \
34+
dev-test/src/test
35+
```
36+
37+
If packaging code changes, verify a local build:
38+
39+
```shell
40+
python build.py
41+
```
42+
43+
## Pull requests
44+
45+
Keep changes focused and describe:
46+
47+
- what changed;
48+
- why it changed;
49+
- how it was tested.
50+
51+
Include generated reports or build artifacts only when they are specifically useful for reviewing the change.

‎PACKAGING.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Packaging
2+
3+
`java-inventory` can be packaged as a standalone executable with PyInstaller.
4+
5+
## Local build
6+
7+
```shell
8+
python package.py
9+
```
10+
11+
The build:
12+
13+
1. Creates `.venv` when needed.
14+
2. Installs PyInstaller in the build environment.
15+
3. Runs `python java_inventory.py setup`.
16+
4. Verifies the required Java artifacts.
17+
5. Packages the application and resources.
18+
19+
Output:
20+
21+
```shell
22+
dist/java-inventory
23+
```
24+
25+
On Windows:
26+
27+
```powershell
28+
dist\java-inventory.exe
29+
```
30+
31+
Run the packaged binary with:
32+
33+
```shell
34+
./dist/java-inventory --help
35+
```
36+
37+
Windows:
38+
39+
```powershell
40+
dist\java-inventory.exe --help
41+
```
42+
43+
## Options
44+
45+
Skip cleanup:
46+
47+
```shell
48+
python package.py --no-cleanup
49+
```
50+
51+
Use another PyInstaller spec:
52+
53+
```shell
54+
python package.py --spec path/to/custom.spec
55+
```
56+
57+
Enable debug output:
58+
59+
```shell
60+
python package.py --debug
61+
```
62+
63+
## Platform builds
64+
65+
PyInstaller produces a native executable for the platform where it runs. Build separately on each target platform.
66+
67+
Official releases use GitHub Actions to build platform-specific binaries and attach them to GitHub Releases.
68+
69+
The packaging environment requires Python, a JDK, and Maven because `setup` builds the Java components used by the application.

0 commit comments

Comments
 (0)