python-package-folder 5.1.2__tar.gz → 5.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/PKG-INFO +1 -1
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/coverage.svg +2 -2
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/pyproject.toml +1 -1
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/subfolder_build.py +13 -3
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_exclude_patterns.py +28 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.copier-answers.yml +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.cursor/plans/optional_version_+_semantic-release_efed88a6.plan.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.cursor/plans/replace_node.js_semantic-release_with_custom_python_implementation_64e05e1a.plan.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.cursor/rules/general.mdc +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.cursor/rules/python.mdc +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.github/workflows/ci.yml +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.github/workflows/publish.yml +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.gitignore +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/.vscode/settings.json +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/LICENSE +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/MANIFEST.in +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/Makefile +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/README.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/development.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/docs/DEVELOPMENT.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/docs/INSTALLATION.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/docs/PUBLISHING.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/docs/REFERENCE.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/docs/USAGE.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/docs/VERSION_RESOLUTION.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/installation.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/publishing.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/__init__.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/__main__.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/analyzer.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/finder.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/manager.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/publisher.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/py.typed +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/python_package_folder.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/types.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/utils.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/version.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/version_calculator.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/conftest.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/some_globals.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/subfolder_to_build/README.md +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/subfolder_to_build/__init__.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/subfolder_to_build/some_function.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/subfolder_to_build/some_globals.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/utility_folder/_SS/some_superseded_file.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/utility_folder/some_utility.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_build_with_external_deps.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_linting.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_preserve_directory_structure.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_publisher.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_shared_subdirectory_imports.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_spreadsheet_creation_imports.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_subfolder_build.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_third_party_dependencies.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_utils.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_version_calculator.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_version_manager.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/tests.py +0 -0
- {python_package_folder-5.1.2 → python_package_folder-5.1.4}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-package-folder
|
|
3
|
-
Version: 5.1.
|
|
3
|
+
Version: 5.1.4
|
|
4
4
|
Summary: Python package to automatically package and build a folder, fetching all relevant dependencies.
|
|
5
5
|
Project-URL: Repository, https://github.com/alelom/python-package-folder
|
|
6
6
|
Author-email: Alessio Lombardi <work@alelom.com>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
15
15
|
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
|
|
16
16
|
<text x="31.5" y="14">coverage</text>
|
|
17
|
-
<text x="81" y="15" fill="#010101" fill-opacity=".3">
|
|
18
|
-
<text x="81" y="14">
|
|
17
|
+
<text x="81" y="15" fill="#010101" fill-opacity=".3">66%</text>
|
|
18
|
+
<text x="81" y="14">66%</text>
|
|
19
19
|
</g>
|
|
20
20
|
</svg>
|
|
@@ -296,6 +296,10 @@ class SubfolderBuildConfig:
|
|
|
296
296
|
|
|
297
297
|
# Read exclude patterns from root pyproject.toml and inject them
|
|
298
298
|
exclude_patterns = read_exclude_patterns(original_pyproject)
|
|
299
|
+
print(
|
|
300
|
+
f"INFO: Read exclude patterns from {original_pyproject}: {exclude_patterns}",
|
|
301
|
+
file=sys.stderr,
|
|
302
|
+
)
|
|
299
303
|
if exclude_patterns:
|
|
300
304
|
adjusted_content = self._inject_exclude_patterns(adjusted_content, exclude_patterns)
|
|
301
305
|
|
|
@@ -353,6 +357,13 @@ class SubfolderBuildConfig:
|
|
|
353
357
|
|
|
354
358
|
original_content = original_pyproject.read_text(encoding="utf-8")
|
|
355
359
|
|
|
360
|
+
# Read exclude patterns from root pyproject.toml BEFORE moving the file
|
|
361
|
+
exclude_patterns = read_exclude_patterns(original_pyproject)
|
|
362
|
+
print(
|
|
363
|
+
f"INFO: Read exclude patterns from {original_pyproject}: {exclude_patterns}",
|
|
364
|
+
file=sys.stderr,
|
|
365
|
+
)
|
|
366
|
+
|
|
356
367
|
# Store reference to original
|
|
357
368
|
self.original_pyproject_path = original_pyproject
|
|
358
369
|
|
|
@@ -387,9 +398,6 @@ class SubfolderBuildConfig:
|
|
|
387
398
|
file=sys.stderr,
|
|
388
399
|
)
|
|
389
400
|
|
|
390
|
-
# Read exclude patterns from root pyproject.toml
|
|
391
|
-
exclude_patterns = read_exclude_patterns(original_pyproject)
|
|
392
|
-
|
|
393
401
|
if data:
|
|
394
402
|
# Modify using parsed data
|
|
395
403
|
if "project" in data:
|
|
@@ -975,7 +983,9 @@ class SubfolderBuildConfig:
|
|
|
975
983
|
Args:
|
|
976
984
|
exclude_patterns: List of regex patterns to match against path components
|
|
977
985
|
"""
|
|
986
|
+
print(f"INFO: Exclude patterns: {exclude_patterns}", file=sys.stderr)
|
|
978
987
|
if not exclude_patterns:
|
|
988
|
+
print("INFO: No exclude patterns to apply", file=sys.stderr)
|
|
979
989
|
return
|
|
980
990
|
|
|
981
991
|
# Compile regex patterns for efficiency
|
|
@@ -184,3 +184,31 @@ class TestExcludePatternsInBuild:
|
|
|
184
184
|
assert ".*_test.*" in content
|
|
185
185
|
|
|
186
186
|
config.restore()
|
|
187
|
+
|
|
188
|
+
def test_exclude_patterns_no_subfolder_toml(self, test_project_with_exclude_patterns: Path) -> None:
|
|
189
|
+
"""Test that exclude patterns are read correctly when there's no subfolder pyproject.toml."""
|
|
190
|
+
project_root = test_project_with_exclude_patterns
|
|
191
|
+
src_dir = project_root / "src" / "test_package"
|
|
192
|
+
|
|
193
|
+
# This simulates the scenario where there's no subfolder pyproject.toml
|
|
194
|
+
# and we need to read exclude patterns from the root before it's moved
|
|
195
|
+
config = SubfolderBuildConfig(
|
|
196
|
+
project_root=project_root,
|
|
197
|
+
src_dir=src_dir,
|
|
198
|
+
package_name="test-package",
|
|
199
|
+
version="1.0.0",
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
# Create temporary pyproject.toml (this will read exclude patterns before moving root toml)
|
|
203
|
+
temp_pyproject = config.create_temp_pyproject()
|
|
204
|
+
assert temp_pyproject is not None
|
|
205
|
+
|
|
206
|
+
# Check that exclude patterns are in the temporary pyproject.toml
|
|
207
|
+
content = temp_pyproject.read_text()
|
|
208
|
+
assert "[tool.python-package-folder]" in content
|
|
209
|
+
assert "exclude-patterns" in content
|
|
210
|
+
assert "_SS" in content
|
|
211
|
+
assert ".*_test.*" in content
|
|
212
|
+
assert "sandbox" in content
|
|
213
|
+
|
|
214
|
+
config.restore()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/__init__.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/__main__.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/analyzer.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/finder.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/manager.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/publisher.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/types.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/utils.py
RENAMED
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/src/python_package_folder/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/folder_structure/some_globals.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_build_with_external_deps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_third_party_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_package_folder-5.1.2 → python_package_folder-5.1.4}/tests/test_version_calculator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|