quickpub 3.0.0__tar.gz → 3.0.1__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.
Files changed (57) hide show
  1. quickpub-3.0.1/PKG-INFO +390 -0
  2. quickpub-3.0.1/README.md +350 -0
  3. {quickpub-3.0.0 → quickpub-3.0.1}/pyproject.toml +1 -1
  4. quickpub-3.0.1/quickpub/strategies/implementations/constraint_enforcers/pypi_remote_version_enforcer.py +63 -0
  5. quickpub-3.0.1/quickpub.egg-info/PKG-INFO +390 -0
  6. quickpub-3.0.0/PKG-INFO +0 -79
  7. quickpub-3.0.0/README.md +0 -39
  8. quickpub-3.0.0/quickpub/strategies/implementations/constraint_enforcers/pypi_remote_version_enforcer.py +0 -40
  9. quickpub-3.0.0/quickpub.egg-info/PKG-INFO +0 -79
  10. {quickpub-3.0.0 → quickpub-3.0.1}/LICENSE +0 -0
  11. {quickpub-3.0.0 → quickpub-3.0.1}/MANIFEST.in +0 -0
  12. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/__init__.py +0 -0
  13. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/__main__.py +0 -0
  14. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/classifiers.py +0 -0
  15. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/enforcers.py +0 -0
  16. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/files.py +0 -0
  17. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/functions.py +0 -0
  18. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/proxy.py +0 -0
  19. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/py.typed +0 -0
  20. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/qa.py +0 -0
  21. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/__init__.py +0 -0
  22. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/build_schema.py +0 -0
  23. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/constraint_enforcer.py +0 -0
  24. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/__init__.py +0 -0
  25. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/build_schemas/__init__.py +0 -0
  26. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/build_schemas/setuptools_build_schema.py +0 -0
  27. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/constraint_enforcers/__init__.py +0 -0
  28. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/constraint_enforcers/license_enforcer.py +0 -0
  29. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/constraint_enforcers/local_version_enforcer.py +0 -0
  30. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/constraint_enforcers/pypirc_enforcer.py +0 -0
  31. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/constraint_enforcers/readme_enforcer.py +0 -0
  32. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/python_providers/__init__.py +0 -0
  33. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/python_providers/conda_python_provider.py +0 -0
  34. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/python_providers/default_python_provider.py +0 -0
  35. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/quality_assurance_runners/__init__.py +0 -0
  36. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/quality_assurance_runners/mypy_qa_runner.py +0 -0
  37. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/quality_assurance_runners/pylint_qa_runner.py +0 -0
  38. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/quality_assurance_runners/pytest_qa_runner.py +0 -0
  39. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/quality_assurance_runners/unittest_qa_runner.py +0 -0
  40. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/upload_targets/__init__.py +0 -0
  41. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/upload_targets/github_upload_target.py +0 -0
  42. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/implementations/upload_targets/pypirc_upload_target.py +0 -0
  43. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/python_provider.py +0 -0
  44. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/quality_assurance_runner.py +0 -0
  45. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/quickpub_strategy.py +0 -0
  46. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/strategies/upload_target.py +0 -0
  47. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/structures/__init__.py +0 -0
  48. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/structures/bound.py +0 -0
  49. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/structures/dependency.py +0 -0
  50. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/structures/version.py +0 -0
  51. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub/validators.py +0 -0
  52. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub.egg-info/SOURCES.txt +0 -0
  53. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub.egg-info/dependency_links.txt +0 -0
  54. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub.egg-info/requires.txt +0 -0
  55. {quickpub-3.0.0 → quickpub-3.0.1}/quickpub.egg-info/top_level.txt +0 -0
  56. {quickpub-3.0.0 → quickpub-3.0.1}/setup.cfg +0 -0
  57. {quickpub-3.0.0 → quickpub-3.0.1}/setup.py +0 -0
@@ -0,0 +1,390 @@
1
+ Metadata-Version: 2.4
2
+ Name: quickpub
3
+ Version: 3.0.1
4
+ Summary: A python package to quickly configure and publish a new package
5
+ Author-email: danielnachumdev <danielnachumdev@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2022 danielnachumdev
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Project-URL: Homepage, https://github.com/danielnachumdev/quickpub
28
+ Project-URL: Bug Tracker, https://github.com/danielnachumdev/quickpub/issues
29
+ Classifier: Development Status :: 3 - Alpha
30
+ Classifier: Intended Audience :: Developers
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: Operating System :: Microsoft :: Windows
33
+ Requires-Python: >=3.8.0
34
+ Description-Content-Type: text/markdown
35
+ License-File: LICENSE
36
+ Requires-Dist: danielutils>=1.0.0
37
+ Requires-Dist: requests
38
+ Requires-Dist: fire
39
+ Dynamic: license-file
40
+
41
+ # QuickPub v3.0.0
42
+
43
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
44
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
45
+
46
+ **QuickPub** is a **local CI/CD simulation tool** that brings the power of cloud-based continuous integration directly to your development environment. Instead of waiting for cloud CI/CD pipelines to catch issues, QuickPub runs all quality checks, tests, and validations locally - ensuring higher build pass rates and faster feedback loops.
47
+
48
+ ## 🎯 **Why QuickPub?**
49
+
50
+ ### **Local CI/CD Simulation**
51
+ - **Pre-Push Validation**: Run all CI/CD checks locally before pushing to remote repositories
52
+ - **Faster Feedback**: Catch issues immediately in your IDE without waiting for cloud builds
53
+ - **Customizable Error Display**: Format and display errors exactly how you want them
54
+ - **Higher Build Success Rate**: Ensure your code passes all checks before it reaches cloud pipelines
55
+ - **Cost Effective**: Reduce cloud CI/CD costs by catching issues locally first
56
+
57
+ ### **Developer Experience**
58
+ - **IDE Integration**: Run comprehensive checks directly from your development environment
59
+ - **Real-time Validation**: Get instant feedback on code quality, tests, and package configuration
60
+ - **Consistent Environment**: Use the same validation logic locally and in production
61
+ - **Debugging Friendly**: Easier to debug and fix issues when they're caught locally
62
+
63
+ ## 🚀 Features
64
+
65
+ ### 🔧 **Build System**
66
+ - **Setuptools Integration**: Automated build process with `pyproject.toml` generation
67
+ - **Multiple Build Schemas**: Extensible build system supporting different packaging strategies
68
+ - **Automatic File Generation**: Creates `setup.py`, `pyproject.toml`, and `MANIFEST.in` files
69
+
70
+ ### 🛡️ **Quality Assurance (Local CI/CD Simulation)**
71
+ - **Multi-Environment Testing**: Test across multiple Python versions and environments locally
72
+ - **Built-in QA Runners** (Same as cloud CI/CD):
73
+ - **MyPy**: Static type checking with configurable error thresholds
74
+ - **Pylint**: Code quality analysis with customizable scoring
75
+ - **Pytest**: Comprehensive testing framework with coverage reporting
76
+ - **Unittest**: Traditional unit testing with pass/fail metrics
77
+ - **Configurable Bounds**: Set minimum/maximum acceptable scores for each QA tool
78
+ - **Parallel Execution**: Run QA checks across multiple environments simultaneously
79
+ - **Local Environment Validation**: Ensure your code works across all target Python versions
80
+
81
+ ### 🔒 **Constraint Enforcement**
82
+ - **Version Validation**: Ensure new versions are higher than existing ones
83
+ - **Local Version Check**: Prevents overwriting existing local builds
84
+ - **PyPI Remote Check**: Validates against published versions on PyPI
85
+ - **File Validation**:
86
+ - **README Enforcer**: Ensures README file exists and is valid
87
+ - **License Enforcer**: Validates license file presence and format
88
+ - **PyPI RC Enforcer**: Verifies PyPI configuration for uploads
89
+
90
+ ### 🚀 **Deployment & Upload**
91
+ - **Multiple Upload Targets**:
92
+ - **PyPI Upload**: Direct upload to Python Package Index
93
+ - **GitHub Upload**: Automatic git commit and push with version tags
94
+ - **Configurable Credentials**: Secure credential management for different platforms
95
+
96
+ ### 🐍 **Python Environment Management**
97
+ - **Multi-Environment Support**: Test across different Python versions locally
98
+ - **Conda Integration**: Full support for Conda environments
99
+ - **System Python**: Use system Python interpreter
100
+ - **Custom Executables**: Support for custom Python installations
101
+
102
+ ### 📦 **Package Configuration**
103
+ - **Automatic Metadata**: Generate package metadata from project structure
104
+ - **Dependency Management**: Handle complex dependency specifications
105
+ - **Classifier Support**: Automatic PyPI classifier assignment
106
+ - **Keywords & Descriptions**: Comprehensive package documentation
107
+
108
+ ## 📋 Requirements
109
+
110
+ - **Python**: 3.8.0 or higher
111
+ - **Tested Versions**: 3.8.0, 3.9.0, 3.10.13
112
+
113
+ ## 🛠️ Installation
114
+
115
+ ```bash
116
+ pip install quickpub
117
+ ```
118
+
119
+ ## 📖 Quick Start
120
+
121
+ ### **Local CI/CD Workflow**
122
+
123
+ ```python
124
+ from quickpub import publish, MypyRunner, PylintRunner, UnittestRunner, CondaPythonProvider, \
125
+ PypircUploadTarget, SetuptoolsBuildSchema, GithubUploadTarget, PypircEnforcer, ReadmeEnforcer, LicenseEnforcer, \
126
+ PypiRemoteVersionEnforcer, LocalVersionEnforcer
127
+
128
+ def main() -> None:
129
+ # Run local CI/CD simulation - all checks happen locally before any cloud deployment
130
+ publish(
131
+ name="my-awesome-package",
132
+ version="1.0.0",
133
+ author="Your Name",
134
+ author_email="your.email@example.com",
135
+ description="A fantastic Python package",
136
+ homepage="https://github.com/yourusername/my-awesome-package",
137
+
138
+ # Local Quality Assurance (simulates cloud CI/CD)
139
+ global_quality_assurance_runners=[
140
+ MypyRunner(bound="<=20", configuration_path="./mypy.ini"),
141
+ PylintRunner(bound=">=0.8", configuration_path="./.pylintrc"),
142
+ UnittestRunner(bound=">=0.95"),
143
+ ],
144
+
145
+ # Local Build & Upload (only if all checks pass)
146
+ build_schemas=[SetuptoolsBuildSchema()],
147
+ upload_targets=[PypircUploadTarget(), GithubUploadTarget()],
148
+
149
+ # Local Environment Testing (multiple Python versions)
150
+ python_interpreter_provider=CondaPythonProvider(["base", "39", "380"]),
151
+
152
+ # Local Validation (prevents common CI/CD failures)
153
+ enforcers=[
154
+ PypircEnforcer(),
155
+ ReadmeEnforcer(),
156
+ LicenseEnforcer(),
157
+ LocalVersionEnforcer(),
158
+ PypiRemoteVersionEnforcer()
159
+ ],
160
+
161
+ # Package Configuration
162
+ dependencies=["requests>=2.25.0", "numpy>=1.20.0"],
163
+ min_python="3.8.0",
164
+ keywords=["automation", "publishing", "python"],
165
+ )
166
+
167
+ if __name__ == '__main__':
168
+ main()
169
+ ```
170
+
171
+ ## 🔧 Configuration Options
172
+
173
+ ### Quality Assurance Runners (Local CI/CD Simulation)
174
+
175
+ #### MyPy Runner
176
+ ```python
177
+ MypyRunner(
178
+ bound="<=20", # Maximum number of errors allowed
179
+ configuration_path="./mypy.ini", # Custom mypy configuration
180
+ target="./src" # Target directory to check
181
+ )
182
+ ```
183
+
184
+ #### Pylint Runner
185
+ ```python
186
+ PylintRunner(
187
+ bound=">=0.8", # Minimum score required (0-10 scale)
188
+ configuration_path="./.pylintrc", # Custom pylint configuration
189
+ target="./src" # Target directory to analyze
190
+ )
191
+ ```
192
+
193
+ #### Pytest Runner
194
+ ```python
195
+ PytestRunner(
196
+ bound=">=0.9", # Minimum test pass rate
197
+ target="./tests", # Test directory
198
+ no_tests_score=0.0 # Score when no tests are found
199
+ )
200
+ ```
201
+
202
+ #### Unittest Runner
203
+ ```python
204
+ UnittestRunner(
205
+ bound=">=0.95", # Minimum test pass rate
206
+ target="./tests", # Test directory
207
+ no_tests_score=0.0 # Score when no tests are found
208
+ )
209
+ ```
210
+
211
+ ### Python Environment Providers (Local Multi-Version Testing)
212
+
213
+ #### Conda Provider
214
+ ```python
215
+ CondaPythonProvider(
216
+ env_names=["base", "py39", "py38"], # List of conda environments to test locally
217
+ auto_install_dependencies=True, # Auto-install required packages
218
+ exit_on_fail=True # Exit on first failure
219
+ )
220
+ ```
221
+
222
+ #### Default Provider
223
+ ```python
224
+ DefaultPythonProvider() # Uses system Python interpreter
225
+ ```
226
+
227
+ ### Upload Targets
228
+
229
+ #### PyPI Upload
230
+ ```python
231
+ PypircUploadTarget(
232
+ pypirc_file_path="./.pypirc", # Path to PyPI configuration
233
+ verbose=True # Enable verbose output
234
+ )
235
+ ```
236
+
237
+ #### GitHub Upload
238
+ ```python
239
+ GithubUploadTarget(
240
+ verbose=True # Enable verbose output
241
+ )
242
+ ```
243
+
244
+ ### Constraint Enforcers
245
+
246
+ #### Version Enforcers
247
+ ```python
248
+ # Check against local builds
249
+ LocalVersionEnforcer()
250
+
251
+ # Check against PyPI published versions
252
+ PypiRemoteVersionEnforcer()
253
+ ```
254
+
255
+ #### File Enforcers
256
+ ```python
257
+ # Ensure README exists
258
+ ReadmeEnforcer(readme_file_path="./README.md")
259
+
260
+ # Ensure LICENSE exists
261
+ LicenseEnforcer(license_file_path="./LICENSE")
262
+
263
+ # Validate PyPI configuration
264
+ PypircEnforcer(pypirc_file_path="./.pypirc")
265
+ ```
266
+
267
+ ## 🏗️ Project Structure
268
+
269
+ QuickPub automatically generates the following files:
270
+
271
+ ```
272
+ your-project/
273
+ ├── pyproject.toml # Package configuration
274
+ ├── setup.py # Setuptools configuration
275
+ ├── MANIFEST.in # Package manifest
276
+ ├── your-package/ # Source code directory
277
+ │ └── __init__.py
278
+ ├── tests/ # Test directory
279
+ ├── README.md # Project documentation
280
+ ├── LICENSE # License file
281
+ └── .pypirc # PyPI credentials (optional)
282
+ ```
283
+
284
+ ## 🔍 Advanced Features
285
+
286
+ ### Custom Quality Assurance
287
+
288
+ You can create custom QA runners by extending the `QualityAssuranceRunner` class:
289
+
290
+ ```python
291
+ from quickpub.strategies import QualityAssuranceRunner
292
+
293
+ class CustomQARunner(QualityAssuranceRunner):
294
+ def _build_command(self, target: str, use_system_interpreter: bool = False) -> str:
295
+ return f"custom-tool {target}"
296
+
297
+ def _install_dependencies(self, base: LayeredCommand) -> None:
298
+ with base:
299
+ base("pip install custom-tool")
300
+
301
+ def _calculate_score(self, ret: int, command_output: List[str], *, verbose: bool = False) -> float:
302
+ # Custom score calculation logic
303
+ return 0.95
304
+ ```
305
+
306
+ ### Progress Tracking (Customizable Error Display)
307
+
308
+ ```python
309
+ from tqdm import tqdm
310
+ import json
311
+
312
+ def main() -> None:
313
+ publish(
314
+ # ... other parameters ...
315
+ log=lambda obj: tqdm.write(json.dumps(obj, default=str)), # Custom error formatting
316
+ pbar=tqdm(desc="Local CI/CD Progress", leave=False), # Custom progress display
317
+ )
318
+ ```
319
+
320
+ ### Demo Mode (Local CI/CD Testing)
321
+
322
+ Test your configuration without making changes:
323
+
324
+ ```python
325
+ publish(
326
+ # ... other parameters ...
327
+ demo=True, # Run all local CI/CD checks without building or uploading
328
+ )
329
+ ```
330
+
331
+ ## 🐛 Troubleshooting
332
+
333
+ ### Common Issues
334
+
335
+ 1. **QA Failures**: Check your bound configurations and ensure your code meets the quality thresholds
336
+ 2. **Version Conflicts**: Use `PypiRemoteVersionEnforcer` to avoid version conflicts
337
+ 3. **Environment Issues**: Verify your Python environments are properly configured
338
+ 4. **Upload Failures**: Ensure your PyPI credentials are correctly configured in `.pypirc`
339
+
340
+ ### Debug Mode
341
+
342
+ Enable verbose output for detailed logging:
343
+
344
+ ```python
345
+ publish(
346
+ # ... other parameters ...
347
+ log=print, # Print all log messages with custom formatting
348
+ )
349
+ ```
350
+
351
+ ## 🚀 **Local CI/CD Benefits**
352
+
353
+ ### **Before QuickPub (Traditional Workflow)**
354
+ 1. Write code
355
+ 2. Push to repository
356
+ 3. Wait for cloud CI/CD to run
357
+ 4. Fix issues if build fails
358
+ 5. Repeat steps 2-4 until success
359
+
360
+ ### **With QuickPub (Local CI/CD)**
361
+ 1. Write code
362
+ 2. Run QuickPub locally (simulates entire CI/CD pipeline)
363
+ 3. Fix issues immediately with better error visibility
364
+ 4. Push to repository with confidence
365
+ 5. Cloud CI/CD passes on first try! ✅
366
+
367
+ ### **Key Advantages**
368
+ - **Faster Development**: No waiting for cloud builds
369
+ - **Better Error Visibility**: Customize how errors are displayed
370
+ - **Cost Savings**: Reduce cloud CI/CD usage
371
+ - **Higher Success Rate**: Catch issues before they reach production
372
+ - **IDE Integration**: Run checks directly from your development environment
373
+
374
+ ## 🤝 Contributing
375
+
376
+ Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
377
+
378
+ ## 📄 License
379
+
380
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
381
+
382
+ ## 🙏 Acknowledgments
383
+
384
+ - Built with ❤️ for the Python community
385
+ - Inspired by the need for streamlined package publishing workflows
386
+ - Thanks to all contributors and users who have helped improve QuickPub
387
+
388
+ ---
389
+
390
+ **QuickPub** - Your local CI/CD companion for Python package publishing! 🚀