Skip to content

Commit 06eed97

Browse files
Michael HallikMichael Hallik
Michael Hallik
authored and
Michael Hallik
committed
Removed obsolete Makefile targets & updated two docs
1 parent 8bc5948 commit 06eed97

File tree

4 files changed

+4
-171
lines changed

4 files changed

+4
-171
lines changed

Makefile

Lines changed: 3 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,19 @@ PYTHON_VERSION ?= 3.10
33
VENV_HOME := /c/Python-virt-envs
44

55
# Declare targets that don't represent actual files.
6-
.PHONY: help install lint type format unit coverage robot check requirements keydoc unit_doc robot_doc structure meta doc clean setup test-install list-envs delete-env
6+
.PHONY: help lint type format unit robot check requirements keydoc
77

88
# Show a list of the Make targets available in this file.
99
help:
1010
@echo "Commonly used commands:"
11-
@echo " make install Install project dependencies via Poetry"
1211
@echo " make lint Run Pylint on source and test code"
1312
@echo " make type Run Pyright for static type checking"
1413
@echo " make format Check code formatting using Black"
1514
@echo " make unit Run unit tests with pytest"
16-
@echo " make coverage Open the pytest coverage report in the browser"
1715
@echo " make robot Run integration tests with Robot Framework"
1816
@echo " make check Wrapper: run linting, type checks, format checks and all tests"
1917
@echo " make requirements Export requirements.txt and requirements-dev.txt"
2018
@echo " make keydoc Generate Robot Framework keyword documentation"
21-
@echo " make unit_doc Generate overview of unit test cases"
22-
@echo " make structure Analyze project structure and write to file"
23-
@echo " make meta Establish code metrics and write to file"
24-
@echo " make doc Wrapper: create all docs"
25-
@echo " make clean Remove temporary files and test artifacts"
26-
@echo " make setup Install, export and setup pre-commit hooks"
27-
@echo " make test_install Create a virtual env, install the library and run basic checks"
28-
@echo " make delete-env Delete a virtual environment."
29-
30-
# Install dependencies from pyproject.toml, locked to versions in poetry.lock.
31-
install:
32-
@echo "Running poetry install..."
33-
@poetry install
3419

3520
# Run linting with Pylint on the src/ directory.
3621
lint:
@@ -52,10 +37,6 @@ unit:
5237
@echo "Running unit tests..."
5338
@poetry run pytest --cov=src --cov-report=html --cov-branch test/
5439

55-
coverage:
56-
make unit
57-
@python -m webbrowser C:\\Projects\\robotframework-xmlvalidator\\htmlcov\\index.html
58-
5940
# Run integration tests using Robot Framework.
6041
robot:
6142
@echo "Running integration tests..."
@@ -69,7 +50,7 @@ check:
6950
make format
7051
make unit
7152
make robot
72-
@echo "All checks passed!"
53+
@echo "All checks done!"
7354

7455
# Export dependencies to requirements files for pip compatibility.
7556
requirements:
@@ -80,106 +61,4 @@ requirements:
8061
# Generate the Robot Framework keyword documentation.
8162
keydoc:
8263
@echo "Generating Robot Framework keyword documentation with Libdoc..."
83-
cd src && python -m robot.libdoc xmlvalidator ../docs/XmlValidator.html
84-
85-
# Generate an overview of unit test cases and write to file.
86-
unit_doc:
87-
@echo "Exporting overview of unit test cases"
88-
python tools_extract_doc_unit_test.py
89-
90-
# Generate an overview of integration test cases and write to file.
91-
robot_doc:
92-
@echo "Exporting overview of integration test cases"
93-
python tools_extract_doc_integration_test.py
94-
95-
# Generate an overview of the project/repo structure and write to file.
96-
structure:
97-
@echo "Exporting the project structure"
98-
python tools_extract_project_structure.py
99-
100-
# Establish basic code metrics and write to file.
101-
meta:
102-
@echo "Exporting basic code metrics"
103-
python tools_code_analyzer.py
104-
105-
# Wrapper that generates all docs.
106-
doc:
107-
@echo "Exporting all project documentation ..."
108-
make requirements
109-
make keydoc
110-
make unit_doc
111-
make robot_doc
112-
make structure
113-
make meta
114-
@echo "All documentation exported!"
115-
116-
# Clean up compiled files, caches and test output.
117-
clean:
118-
@echo "Clean up repository..."; \
119-
echo ""; \
120-
pycache_count=0; pyc_count=0; csv_count=0; artifact_count=0; \
121-
removed_paths=""; \
122-
echo "Searching for __pycache__ directories..."; \
123-
for dir in $$(/usr/bin/find . -type d -name "__pycache__"); do \
124-
echo " Removing: $$dir"; \
125-
rm -r "$$dir"; \
126-
removed_paths="$$removed_paths\n$$dir"; \
127-
pycache_count=$$((pycache_count + 1)); \
128-
done; \
129-
echo "Searching for .pyc files..."; \
130-
for file in $$(/usr/bin/find . -type f -name "*.pyc"); do \
131-
echo " Removing: $$file"; \
132-
rm "$$file"; \
133-
removed_paths="$$removed_paths\n$$file"; \
134-
pyc_count=$$((pyc_count + 1)); \
135-
done; \
136-
echo "Removing CSV test reports..."; \
137-
for file in $$(/usr/bin/find test/_data/integration -type f -name "*.csv" 2>/dev/null); do \
138-
echo " Removing: $$file"; \
139-
rm "$$file"; \
140-
removed_paths="$$removed_paths\n$$file"; \
141-
csv_count=$$((csv_count + 1)); \
142-
done; \
143-
echo "Removing test & coverage artifacts..."; \
144-
for path in .pytest_cache .coverage htmlcov .mypy_cache results dist; do \
145-
if [ -e "$$path" ]; then \
146-
echo " Removing: $$path"; \
147-
rm -rf "$$path"; \
148-
removed_paths="$$removed_paths\n$$path"; \
149-
artifact_count=$$((artifact_count + 1)); \
150-
fi; \
151-
done; \
152-
echo ""; \
153-
echo "Clean complete."; \
154-
echo ""; \
155-
echo "Stats:"; \
156-
echo " - __pycache__ directories removed: $$pycache_count"; \
157-
echo " - .pyc files removed: $$pyc_count"; \
158-
echo " - CSV files removed: $$csv_count"; \
159-
echo " - Other artifacts removed: $$artifact_count"; \
160-
echo ""; \
161-
echo "All removed paths:"; \
162-
printf "$$removed_paths\n" | sed '/^$$/d; s/^/ - /'
163-
164-
# Create and activate a virt env, install the library and run some checks.
165-
test-install:
166-
cmd /c install-xmlvalidator.bat $(ENV) $(VER)
167-
168-
# Get all current virtual environments
169-
list-envs:
170-
@echo "Available virtual environments in $(VENV_HOME):"
171-
@ls -1 "$(VENV_HOME)" | grep -v '^\s*$$'
172-
173-
# Delete a virtual environment.
174-
delete-env:
175-
@if [ -z "$(NAME)" ]; then \
176-
echo "Please provide the environment name: make delete-venv NAME=your-env"; \
177-
else \
178-
echo "Deleting environment: $(VENV_HOME)/$(NAME)"; \
179-
if [ -d "$(VENV_HOME)/$(NAME)" ]; then \
180-
rm -rf "$(VENV_HOME)/$(NAME)"; \
181-
echo "Deleted: $(VENV_HOME)/$(NAME)"; \
182-
else \
183-
echo "Directory not found: $(VENV_HOME)/$(NAME)"; \
184-
fi; \
185-
fi
64+
cd src && python -m robot.libdoc xmlvalidator ../docs/XmlValidator.html

install-xmlvalidator.bat

Lines changed: 0 additions & 45 deletions
This file was deleted.

project_meta.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Total number of methods: 27
55
Total number of lines: 2434
66
Code: 600 (ca. 24%)
77
Comments: 205 (ca. 8%)
8-
Documentation: 1629 (ca. 66%)
8+
Documentation: 1629 (ca. 68%)

project_structure.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ CHANGELOG.md
5959
CODE_OF_CONDUCT.md
6060
CONTRIBUTING.md
6161
github_actions.md
62-
install-xmlvalidator.bat
6362
LICENSE
6463
Makefile
6564
poetry.lock

0 commit comments

Comments
 (0)