mypackage-dev 0.1.1__tar.gz → 0.2.1.dev0__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.4
2
2
  Name: mypackage-dev
3
- Version: 0.1.1
3
+ Version: 0.2.1.dev0
4
4
  Summary: A sample Python package with semantic versioning for multiple environments (Development Environment)
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -282,6 +282,31 @@ The project includes a GitHub Actions workflow that:
282
282
  - Validates the package build
283
283
  - (Optional) Automatically publishes on version tags
284
284
 
285
+ ## Documentation
286
+
287
+ Comprehensive guides are available for all aspects of this project:
288
+
289
+ ### Getting Started
290
+ - [QUICKSTART.md](QUICKSTART.md) - Quick setup and first steps
291
+ - [SETUP.md](SETUP.md) - Detailed development environment setup
292
+
293
+ ### Development Workflow
294
+ - [VERSION_MANAGEMENT.md](VERSION_MANAGEMENT.md) - **Comprehensive version bumping guide** 🆕
295
+ - [PRE_RELEASE_VERSIONING.md](PRE_RELEASE_VERSIONING.md) - **Pre-release & development versioning (dev, alpha, beta, RC)** 🆕
296
+ - [PRE_RELEASE_QUICK_START.md](PRE_RELEASE_QUICK_START.md) - **Quick start for pre-release versions** 🆕
297
+ - [BRANCHING_STRATEGY.md](BRANCHING_STRATEGY.md) - Git workflow and branch management
298
+ - [RELEASE_NOTES_GUIDE.md](RELEASE_NOTES_GUIDE.md) - Conventional commits and automated release notes
299
+
300
+ ### Deployment & Publishing
301
+ - [PUBLISHING.md](PUBLISHING.md) - PyPI publishing process
302
+ - [CI_CD_SETUP_GUIDE.md](CI_CD_SETUP_GUIDE.md) - GitHub Actions pipeline setup
303
+ - [GITHUB_ENVIRONMENTS_SETUP.md](GITHUB_ENVIRONMENTS_SETUP.md) - Environment protection rules
304
+ - [QUICK_DEPLOYMENT_GUIDE.md](QUICK_DEPLOYMENT_GUIDE.md) - Fast deployment reference
305
+
306
+ ### Architecture & Design
307
+ - [PROJECT_OVERVIEW.md](PROJECT_OVERVIEW.md) - High-level project structure
308
+ - [PIPELINE_ARCHITECTURE.md](PIPELINE_ARCHITECTURE.md) - CI/CD pipeline details
309
+
285
310
  ## Contributing
286
311
 
287
312
  1. Fork the repository
@@ -256,6 +256,31 @@ The project includes a GitHub Actions workflow that:
256
256
  - Validates the package build
257
257
  - (Optional) Automatically publishes on version tags
258
258
 
259
+ ## Documentation
260
+
261
+ Comprehensive guides are available for all aspects of this project:
262
+
263
+ ### Getting Started
264
+ - [QUICKSTART.md](QUICKSTART.md) - Quick setup and first steps
265
+ - [SETUP.md](SETUP.md) - Detailed development environment setup
266
+
267
+ ### Development Workflow
268
+ - [VERSION_MANAGEMENT.md](VERSION_MANAGEMENT.md) - **Comprehensive version bumping guide** 🆕
269
+ - [PRE_RELEASE_VERSIONING.md](PRE_RELEASE_VERSIONING.md) - **Pre-release & development versioning (dev, alpha, beta, RC)** 🆕
270
+ - [PRE_RELEASE_QUICK_START.md](PRE_RELEASE_QUICK_START.md) - **Quick start for pre-release versions** 🆕
271
+ - [BRANCHING_STRATEGY.md](BRANCHING_STRATEGY.md) - Git workflow and branch management
272
+ - [RELEASE_NOTES_GUIDE.md](RELEASE_NOTES_GUIDE.md) - Conventional commits and automated release notes
273
+
274
+ ### Deployment & Publishing
275
+ - [PUBLISHING.md](PUBLISHING.md) - PyPI publishing process
276
+ - [CI_CD_SETUP_GUIDE.md](CI_CD_SETUP_GUIDE.md) - GitHub Actions pipeline setup
277
+ - [GITHUB_ENVIRONMENTS_SETUP.md](GITHUB_ENVIRONMENTS_SETUP.md) - Environment protection rules
278
+ - [QUICK_DEPLOYMENT_GUIDE.md](QUICK_DEPLOYMENT_GUIDE.md) - Fast deployment reference
279
+
280
+ ### Architecture & Design
281
+ - [PROJECT_OVERVIEW.md](PROJECT_OVERVIEW.md) - High-level project structure
282
+ - [PIPELINE_ARCHITECTURE.md](PIPELINE_ARCHITECTURE.md) - CI/CD pipeline details
283
+
259
284
  ## Contributing
260
285
 
261
286
  1. Fork the repository
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "mypackage-dev"
7
- version = "0.1.1"
7
+ version = "0.2.1.dev0"
8
8
  description = "A sample Python package with semantic versioning for multiple environments (Development Environment)"
9
9
  authors = [ "Your Name <your.email@example.com>",]
10
10
  readme = "README.md"
@@ -0,0 +1,43 @@
1
+ """
2
+ MyPackage - A sample Python package with semantic versioning.
3
+
4
+ This package demonstrates best practices for creating and publishing
5
+ Python packages to PyPI with support for multiple environments.
6
+ """
7
+
8
+ __version__ = "0.2.1.dev0"
9
+
10
+ from .calculator import add, divide, modulo, multiply, power, subtract
11
+ from .data_processor import (
12
+ filter_even,
13
+ find_median,
14
+ get_statistics,
15
+ remove_duplicates,
16
+ sum_list,
17
+ )
18
+ from .text_utils import (
19
+ capitalize_words,
20
+ count_words,
21
+ is_palindrome,
22
+ remove_whitespace,
23
+ reverse_string,
24
+ )
25
+
26
+ __all__ = [
27
+ "add",
28
+ "subtract",
29
+ "multiply",
30
+ "divide",
31
+ "power",
32
+ "modulo",
33
+ "capitalize_words",
34
+ "reverse_string",
35
+ "count_words",
36
+ "is_palindrome",
37
+ "remove_whitespace",
38
+ "filter_even",
39
+ "sum_list",
40
+ "get_statistics",
41
+ "find_median",
42
+ "remove_duplicates",
43
+ ]
@@ -90,3 +90,52 @@ def divide(a: Number, b: Number) -> float:
90
90
  if b == 0:
91
91
  raise ValueError("Cannot divide by zero")
92
92
  return a / b
93
+
94
+
95
+ def power(base: Number, exponent: Number) -> Number:
96
+ """
97
+ Raise base to the power of exponent.
98
+
99
+ Args:
100
+ base: Base number
101
+ exponent: Exponent
102
+
103
+ Returns:
104
+ Result of base raised to exponent
105
+
106
+ Example:
107
+ >>> power(2, 3)
108
+ 8
109
+ >>> power(5, 2)
110
+ 25
111
+ >>> power(2.5, 2)
112
+ 6.25
113
+ """
114
+ return base**exponent
115
+
116
+
117
+ def modulo(a: int, b: int) -> int:
118
+ """
119
+ Calculate the modulo (remainder) of a divided by b.
120
+
121
+ Args:
122
+ a: Dividend
123
+ b: Divisor
124
+
125
+ Returns:
126
+ Remainder of a divided by b
127
+
128
+ Raises:
129
+ ValueError: If b is zero
130
+
131
+ Example:
132
+ >>> modulo(10, 3)
133
+ 1
134
+ >>> modulo(15, 4)
135
+ 3
136
+ >>> modulo(8, 2)
137
+ 0
138
+ """
139
+ if b == 0:
140
+ raise ValueError("Cannot perform modulo with zero")
141
+ return a % b
@@ -75,3 +75,65 @@ def get_statistics(numbers: List[Number]) -> Dict[str, Number]:
75
75
  "sum": sum(numbers),
76
76
  "count": len(numbers),
77
77
  }
78
+
79
+
80
+ def find_median(numbers: List[Number]) -> float:
81
+ """
82
+ Find the median value in a list of numbers.
83
+
84
+ Args:
85
+ numbers: List of numbers
86
+
87
+ Returns:
88
+ Median value
89
+
90
+ Raises:
91
+ ValueError: If the list is empty
92
+
93
+ Example:
94
+ >>> find_median([1, 2, 3, 4, 5])
95
+ 3.0
96
+ >>> find_median([1, 2, 3, 4])
97
+ 2.5
98
+ >>> find_median([5, 1, 3, 2, 4])
99
+ 3.0
100
+ """
101
+ if not numbers:
102
+ raise ValueError("Cannot find median of an empty list")
103
+
104
+ sorted_numbers = sorted(numbers)
105
+ n = len(sorted_numbers)
106
+
107
+ if n % 2 == 0:
108
+ # Even number of elements: average of middle two
109
+ return (sorted_numbers[n // 2 - 1] + sorted_numbers[n // 2]) / 2
110
+ else:
111
+ # Odd number of elements: middle element
112
+ return float(sorted_numbers[n // 2])
113
+
114
+
115
+ def remove_duplicates(items: List) -> List:
116
+ """
117
+ Remove duplicate items from a list while preserving order.
118
+
119
+ Args:
120
+ items: List of items (can be any hashable type)
121
+
122
+ Returns:
123
+ List with duplicates removed
124
+
125
+ Example:
126
+ >>> remove_duplicates([1, 2, 2, 3, 3, 3, 4])
127
+ [1, 2, 3, 4]
128
+ >>> remove_duplicates(['a', 'b', 'a', 'c', 'b'])
129
+ ['a', 'b', 'c']
130
+ >>> remove_duplicates([])
131
+ []
132
+ """
133
+ seen = set()
134
+ result = []
135
+ for item in items:
136
+ if item not in seen:
137
+ seen.add(item)
138
+ result.append(item)
139
+ return result
@@ -60,3 +60,45 @@ def count_words(text: str) -> int:
60
60
  if not text or text.isspace():
61
61
  return 0
62
62
  return len(text.split())
63
+
64
+
65
+ def is_palindrome(text: str) -> bool:
66
+ """
67
+ Check if a string is a palindrome (reads the same forwards and backwards).
68
+
69
+ Args:
70
+ text: Input string
71
+
72
+ Returns:
73
+ True if the string is a palindrome, False otherwise
74
+
75
+ Example:
76
+ >>> is_palindrome("racecar")
77
+ True
78
+ >>> is_palindrome("hello")
79
+ False
80
+ >>> is_palindrome("A man a plan a canal Panama")
81
+ True
82
+ """
83
+ # Remove spaces and convert to lowercase for comparison
84
+ cleaned = "".join(text.split()).lower()
85
+ return cleaned == cleaned[::-1]
86
+
87
+
88
+ def remove_whitespace(text: str) -> str:
89
+ """
90
+ Remove all whitespace characters from a string.
91
+
92
+ Args:
93
+ text: Input string
94
+
95
+ Returns:
96
+ String with all whitespace removed
97
+
98
+ Example:
99
+ >>> remove_whitespace("hello world")
100
+ 'helloworld'
101
+ >>> remove_whitespace(" Python Programming ")
102
+ 'PythonProgramming'
103
+ """
104
+ return "".join(text.split())
@@ -1,25 +0,0 @@
1
- """
2
- MyPackage - A sample Python package with semantic versioning.
3
-
4
- This package demonstrates best practices for creating and publishing
5
- Python packages to PyPI with support for multiple environments.
6
- """
7
-
8
- __version__ = "0.1.0"
9
-
10
- from .calculator import add, divide, multiply, subtract
11
- from .data_processor import filter_even, get_statistics, sum_list
12
- from .text_utils import capitalize_words, count_words, reverse_string
13
-
14
- __all__ = [
15
- "add",
16
- "subtract",
17
- "multiply",
18
- "divide",
19
- "capitalize_words",
20
- "reverse_string",
21
- "count_words",
22
- "filter_even",
23
- "sum_list",
24
- "get_statistics",
25
- ]