namecheap-python 0.1.2__tar.gz → 0.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: namecheap-python
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: A Python SDK for the Namecheap API
5
5
  License: MIT
6
6
  Keywords: namecheap,domain,dns,api,sdk
@@ -83,8 +83,8 @@ poetry run pytest
83
83
  # Build package
84
84
  poetry build
85
85
 
86
- # Publish to PyPI
87
- poetry publish
86
+ # Create a release (for maintainers)
87
+ # This is done through GitHub Actions - see Release Process section below
88
88
  ```
89
89
 
90
90
  ## Authentication
@@ -376,6 +376,39 @@ poetry run mypy namecheap
376
376
  poetry run pytest
377
377
  ```
378
378
 
379
+ ## Release Process
380
+
381
+ This project uses an automated release workflow for versioning and publishing to PyPI.
382
+
383
+ ### Version Management
384
+
385
+ - The single source of truth for the version is `pyproject.toml`
386
+ - The `__version__` in `__init__.py` is dynamically determined from the package metadata
387
+ - No need to manually update version numbers in multiple places
388
+
389
+ ### Creating a New Release
390
+
391
+ 1. Go to the GitHub repository: https://github.com/adriangalilea/namecheap-python
392
+ 2. Click on "Actions" in the top navigation
393
+ 3. Select the "Bump Version and Release" workflow
394
+ 4. Click "Run workflow" button
395
+ 5. Select the version part to bump (major/minor/patch) based on [semantic versioning](https://semver.org/):
396
+ - `patch`: for backwards compatible bug fixes (0.1.2 -> 0.1.3)
397
+ - `minor`: for backwards compatible new features (0.1.3 -> 0.2.0)
398
+ - `major`: for backwards incompatible changes (0.2.0 -> 1.0.0)
399
+ 6. Click "Run workflow" to start the process
400
+
401
+ ### What Happens Automatically
402
+
403
+ The workflow will:
404
+ 1. Checkout the code
405
+ 2. Bump the version in `pyproject.toml` according to your selection
406
+ 3. Commit the change to the repository
407
+ 4. Create and push a git tag (e.g., v0.1.3)
408
+ 5. Create a GitHub release
409
+ 6. Build the package
410
+ 7. Publish to PyPI using trusted publishing
411
+
379
412
  ## License
380
413
 
381
414
  This project is licensed under the MIT License - see the LICENSE file for details.
@@ -54,8 +54,8 @@ poetry run pytest
54
54
  # Build package
55
55
  poetry build
56
56
 
57
- # Publish to PyPI
58
- poetry publish
57
+ # Create a release (for maintainers)
58
+ # This is done through GitHub Actions - see Release Process section below
59
59
  ```
60
60
 
61
61
  ## Authentication
@@ -347,6 +347,39 @@ poetry run mypy namecheap
347
347
  poetry run pytest
348
348
  ```
349
349
 
350
+ ## Release Process
351
+
352
+ This project uses an automated release workflow for versioning and publishing to PyPI.
353
+
354
+ ### Version Management
355
+
356
+ - The single source of truth for the version is `pyproject.toml`
357
+ - The `__version__` in `__init__.py` is dynamically determined from the package metadata
358
+ - No need to manually update version numbers in multiple places
359
+
360
+ ### Creating a New Release
361
+
362
+ 1. Go to the GitHub repository: https://github.com/adriangalilea/namecheap-python
363
+ 2. Click on "Actions" in the top navigation
364
+ 3. Select the "Bump Version and Release" workflow
365
+ 4. Click "Run workflow" button
366
+ 5. Select the version part to bump (major/minor/patch) based on [semantic versioning](https://semver.org/):
367
+ - `patch`: for backwards compatible bug fixes (0.1.2 -> 0.1.3)
368
+ - `minor`: for backwards compatible new features (0.1.3 -> 0.2.0)
369
+ - `major`: for backwards incompatible changes (0.2.0 -> 1.0.0)
370
+ 6. Click "Run workflow" to start the process
371
+
372
+ ### What Happens Automatically
373
+
374
+ The workflow will:
375
+ 1. Checkout the code
376
+ 2. Bump the version in `pyproject.toml` according to your selection
377
+ 3. Commit the change to the repository
378
+ 4. Create and push a git tag (e.g., v0.1.3)
379
+ 5. Create a GitHub release
380
+ 6. Build the package
381
+ 7. Publish to PyPI using trusted publishing
382
+
350
383
  ## License
351
384
 
352
385
  This project is licensed under the MIT License - see the LICENSE file for details.
@@ -36,7 +36,17 @@ from .utils import (
36
36
  test_api_connection,
37
37
  )
38
38
 
39
- __version__ = "0.1.1"
39
+ try:
40
+ # Get version from package metadata (installed package)
41
+ from importlib.metadata import version
42
+
43
+ __version__ = version("namecheap-python")
44
+ except ImportError:
45
+ # Default version if importlib.metadata is not available (Python < 3.8)
46
+ __version__ = "0.1.2"
47
+ except Exception:
48
+ # If package is not installed or version can't be determined
49
+ __version__ = "0.1.2"
40
50
  __all__ = [
41
51
  "NamecheapClient",
42
52
  "NamecheapException",
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "namecheap-python"
7
- version = "0.1.2"
7
+ version = "0.1.4"
8
8
  description = "A Python SDK for the Namecheap API"
9
9
  authors = ["Adrian Galilea <adriangalilea@gmail.com>"]
10
10
  license = "MIT"
@@ -76,8 +76,25 @@ select = [
76
76
  "SIM", # flake8-simplify
77
77
  "TCH", # flake8-type-checking
78
78
  ]
79
- ignore = []
80
- unfixable = []
79
+ # Ignore certain error codes project-wide
80
+ ignore = [
81
+ # Ignore line too long in test files and examples
82
+ "E501",
83
+ # Allow module names with dashes in utils directory
84
+ "N999",
85
+ # Allow exception without Error suffix (for backwards compatibility)
86
+ "N818",
87
+ # Allow simple nested if statements
88
+ "SIM102",
89
+ # Allow raising exceptions without from
90
+ "B904",
91
+ ]
92
+ # Per-file ignores
93
+ [tool.ruff.lint.per-file-ignores]
94
+ # Ignore unused variables and imports in tests
95
+ "tests/*.py" = ["F401", "F841"]
96
+ # Ignore f-string without placeholders and unused vars in examples
97
+ "examples/*.py" = ["F541", "F841"]
81
98
 
82
99
  [tool.poetry.scripts]
83
100
  format = "poetry:run_format"