crackerjack 0.1.10__py3-none-any.whl → 0.1.12__py3-none-any.whl

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.

Potentially problematic release.


This version of crackerjack might be problematic. Click here for more details.

@@ -18,7 +18,7 @@ repos:
18
18
  - id: black
19
19
  language_version: python3.11
20
20
  - repo: https://github.com/charliermarsh/ruff-pre-commit
21
- rev: v0.0.264
21
+ rev: v0.0.270
22
22
  hooks:
23
23
  - id: ruff
24
24
  - repo: https://github.com/fredrikaverpil/creosote
@@ -50,7 +50,7 @@ repos:
50
50
  - autotyping==23.3.0
51
51
  - libcst==0.4.9
52
52
  - repo: https://github.com/pre-commit/mirrors-mypy
53
- rev: v1.2.0
53
+ rev: v1.3.0
54
54
  hooks:
55
55
  - id: mypy
56
56
  # - repo: https://github.com/pdoc3/pdoc
@@ -64,7 +64,7 @@ repos:
64
64
  # types: [ python ]
65
65
  # always_run: true
66
66
  - repo: https://github.com/charliermarsh/ruff-pre-commit
67
- rev: v0.0.264
67
+ rev: v0.0.270
68
68
  hooks:
69
69
  - id: ruff
70
70
  - repo: https://github.com/psf/black
@@ -30,13 +30,13 @@ target-version = [
30
30
  strict = false
31
31
  pretty = true
32
32
  ignore_missing_imports = false
33
-
33
+ plugins = [
34
+ "pydantic.mypy"
35
+ ]
34
36
 
35
37
  [tool.refurb]
36
38
  enable_all = true
37
39
 
38
-
39
-
40
40
  [tool.pytype]
41
41
  inputs = [
42
42
  "package_name",
@@ -56,8 +56,6 @@ keywords = [
56
56
  "refurb",
57
57
  ]
58
58
  classifiers = [
59
- "Environment :: Console",
60
- "Operating System :: OS Independent",
61
59
  "Programming Language :: Python",
62
60
  "Programming Language :: Python :: 3.11",
63
61
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crackerjack
3
- Version: 0.1.10
3
+ Version: 0.1.12
4
4
  Summary: Crackerjack code formatting style.
5
5
  Keywords: black ruff mypy creosote refurb
6
6
  Home-page: https://github.com/lesleslie/crackerjack
@@ -33,10 +33,13 @@ Description-Content-Type: text/markdown
33
33
 
34
34
  Crackerjack is a python coding style which uses a minimalist approach to produce elegant, easy to read, code.
35
35
 
36
+ crack·​er·​jack ˈkra-kər-ˌjak
37
+ : a person or thing of marked excellence
38
+
36
39
  ### **Why Crackerjack?**
37
40
 
38
- Crackerjack works on the theory that with static typing and explicit classes,
39
- functions, variables, and other object names - the code should be
41
+ Crackerjack works on the theory that with static typing and explicit class,
42
+ function, variable, and other object names - the code should be
40
43
  straight forward to read and the documentation should pretty much be able to write
41
44
  itself. Crackerjack provides a set of guidelines and utilities to keep the codebase clean, elegant, standardized, and
42
45
  easily readable.
@@ -57,15 +60,17 @@ This package:
57
60
 
58
61
  - streamlines code with refurb
59
62
 
60
- - converts/creates documentation in Markdown (md)
61
-
62
- - installs, or updates, a projects pre-commit tools and gitignore
63
+ - installs, or updates, a project's pre-commit tools and gitignore
63
64
  to comply with evolving crackerjack standards
64
65
 
65
66
  - removes pipenv, poetry, and hatch build, dependency management, and virtual environment
66
- management packages and replace them with PDM using PEP 582
67
+ management packages and replaces them with PDM using PEP 582
68
+
69
+ - converts/creates documentation in Markdown (md) - Coming Soon!
67
70
 
68
- - generates pytest mock stubs if needed
71
+ - runs tests and generates pytest mock stubs if needed - Coming Soon!
72
+
73
+ - bumps the project version and publishes it to PyPI
69
74
 
70
75
  ### **What are the rules?**
71
76
 
@@ -112,9 +117,19 @@ From your projects root directory:
112
117
 
113
118
  Cracker jack will take care of the rest.
114
119
 
120
+ For a full list of options:
121
+
122
+ ```python -m crackerjack -h```
123
+
115
124
  When you ready to publish your project:
116
125
 
117
126
  ``python -m crackerjack -p micro``
118
127
 
119
128
  The -p option not only publishes your project but will bump your
120
129
  project version for you. The options are 'micro', 'minor', and 'major'.
130
+
131
+ ## Acknowledgements
132
+
133
+ ## License
134
+
135
+ BSD-3-Clause
@@ -1,16 +1,15 @@
1
- crackerjack-0.1.10.dist-info/METADATA,sha256=oZXdk6M79wjyQ-ERfY1vA5IL-PfY6DyXnAWqJFiy-s8,3861
2
- crackerjack-0.1.10.dist-info/WHEEL,sha256=7dGFtUmOf30dPBLpGD2z643cxg89joO7p3JHBAwDv6E,90
3
- crackerjack-0.1.10.dist-info/entry_points.txt,sha256=i2oN8Ae25gU-XoxtDndkB7we3AiSvh8-LPe0e6_tgrM,19
4
- crackerjack-0.1.10.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
1
+ crackerjack-0.1.12.dist-info/METADATA,sha256=1q6tfsbvPvL-n3mTokTskIVKZOdvuGM-v7pO0yZXFNQ,4147
2
+ crackerjack-0.1.12.dist-info/WHEEL,sha256=m6kf1fJuo48rT4uxh0SeA_FsGq51BpCh_8VNBKVwYQA,90
3
+ crackerjack-0.1.12.dist-info/entry_points.txt,sha256=i2oN8Ae25gU-XoxtDndkB7we3AiSvh8-LPe0e6_tgrM,19
4
+ crackerjack-0.1.12.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
5
5
  crackerjack/.crackerjack-config.yaml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  crackerjack/.gitignore,sha256=ag017-ZUeFMEi6kiP2vwJI5Dzh1WMBdGocSNkR6n6Mo,197
7
7
  crackerjack/.libcst.codemod.yaml,sha256=TLE_I07llPTYk_tm36z-hN15O3X27qztNdJ3Ev9ODMk,768
8
- crackerjack/.pre-commit-config.yaml,sha256=YhEuQZOEpv9QLu58yvG5FBE3QHORwtt0VX3lP6rabfk,2055
8
+ crackerjack/.pre-commit-config.yaml,sha256=ioQ75AJN7Jd7E04ItqeRMnnoObi4CTgMLGtsnUSGOTQ,2055
9
9
  crackerjack/.ruff_cache/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
10
10
  crackerjack/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw5Pk-Ma4,43
11
11
  crackerjack/__init__.py,sha256=AuglbbJHkUJ2GdvyT0ca35ntexo1RkT2V6DgypoFeEk,121
12
12
  crackerjack/__main__.py,sha256=2lhz19wwuSwKwBJBEWR860b4KnswHaSeMVpwxlh4A28,1099
13
13
  crackerjack/crackerjack.py,sha256=fbMJA0sj9z2uvwGR8nbgqgIyHe7oZEYRo4KL1Xfw3BA,5057
14
- crackerjack/pyproject.toml,sha256=T4U9hDDYzjdI0c7DRHqKjBLuCapfKekjD4JiWhlks-s,1690
15
- crackerjack/test1.py,sha256=pMtiBJvRxBODeRN-XtrVGi-EqdJoWsobDU8ZEzhQ6OY,5606
16
- crackerjack-0.1.10.dist-info/RECORD,,
14
+ crackerjack/pyproject.toml,sha256=zECTx1W9B_E84O4RxI255NaAX5-qaY4yKAELuPZ54ow,1649
15
+ crackerjack-0.1.12.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.0.6)
2
+ Generator: pdm-backend (2.0.7)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
crackerjack/test1.py DELETED
@@ -1,249 +0,0 @@
1
- """
2
- This is the "example" module.
3
-
4
- The example module supplies one function, factorial(). For example,
5
-
6
- 120
7
- """
8
-
9
-
10
- def factorial(n):
11
- """Return the factorial of n, an exact integer >= 0.
12
-
13
- [1, 1, 2, 6, 24, 120]
14
- 265252859812191058636308480000000
15
- Traceback (most recent call last):
16
- ...
17
- ValueError: n must be >= 0
18
-
19
- Factorials of floats are OK, but the float must be an exact integer:
20
- Traceback (most recent call last):
21
- ...
22
- ValueError: n must be exact integer
23
- 265252859812191058636308480000000
24
-
25
- It must also not be ridiculously large:
26
- Traceback (most recent call last):
27
- ...
28
- OverflowError: n too large
29
- """
30
-
31
- import math
32
-
33
- if not n >= 0:
34
- raise ValueError("n must be >= 0")
35
- if math.floor(n) != n:
36
- raise ValueError("n must be exact integer")
37
- if n + 1 == n: # catch a value like 1e300
38
- raise OverflowError("n too large")
39
- result = 1
40
- factor = 2
41
- while factor <= n:
42
- result *= factor
43
- factor += 1
44
- return result
45
-
46
-
47
- # Fibonacci numbers module
48
-
49
-
50
- def fib(n) -> None: # write Fibonacci series up to n
51
- a, b = 0, 1
52
- while a < n:
53
- print(a, end=" ")
54
- a, b = b, a + b
55
- print()
56
-
57
-
58
- def fib2(n): # return Fibonacci series up to n
59
- result = []
60
- a, b = 0, 1
61
- while a < n:
62
- result.append(a)
63
- a, b = b, a + b
64
- return result
65
-
66
-
67
- def func1(param1: str, param2: str = "default val") -> None:
68
- """Description of func with docstring javadoc style.
69
- @param param1: descr of param
70
- @type param1: type
71
- @return: some value
72
- @raise KeyError: raises a key exception
73
- """
74
- pass
75
-
76
-
77
- def func2(param1, param2: str = "default val2") -> list:
78
- """Description of func with docstring reST style.
79
- :param param1: descr of param
80
- :type param1: type
81
- :returns: some value
82
- :raises keyError: raises exception
83
- """
84
- pass
85
-
86
-
87
- def func3(param1, param2: str = "default val") -> None:
88
- """Description of func with docstring groups style.
89
- Params:
90
- param1 - descr of param
91
- Returns:
92
- some value
93
- Raises:
94
- keyError: raises key exception
95
- TypeError: raises type exception
96
- """
97
- pass
98
-
99
-
100
- class SomeClass(object):
101
- """My class."""
102
-
103
- def method(self, prm) -> None:
104
- """description"""
105
- pass
106
-
107
- def method2(self, prm1, prm2: str = "defaultprm") -> None:
108
- pass
109
-
110
- def method_numpy(self) -> None:
111
- """
112
- My numpydoc description of a kind
113
- of very exhautive numpydoc format docstring.
114
- Parameters
115
- ----------
116
- first : array_like
117
- the 1st param name `first`
118
- second :
119
- the 2nd param
120
- third : {'value', 'other'}, optional
121
- the 3rd param, by default 'value'
122
- Returns
123
- -------
124
- string
125
- a value in a string
126
- Raises
127
- ------
128
- KeyError
129
- when a key error
130
- OtherError
131
- when an other error
132
- See Also
133
- --------
134
- a_func : linked (optional), with things to say
135
- on several lines
136
- some blabla
137
- Note
138
- ----
139
- Some informations.
140
- Some maths also:
141
- .. math:: f(x) = e^{- x}
142
- References
143
- ----------
144
- Biblio with cited ref [1]_. The ref can be cited in Note section.
145
- .. [1] Adel Daouzli, Sylvain Saïghi, Michelle Rudolph, Alain Destexhe,
146
- Sylvie Renaud: Convergence in an Adaptive Neural Network:
147
- The Influence of Noise Inputs Correlation. IWANN (1) 2009: 140-148
148
- Examples
149
- --------
150
- This is example of use
151
- a
152
- """
153
- pass
154
-
155
-
156
- "I am a single-line comment"
157
-
158
- """
159
- I am a
160
- multi-line comment!
161
- """
162
-
163
-
164
- def square(n):
165
- """Takes in a number n, returns the square of n"""
166
- return n**2
167
-
168
-
169
- def add_binary(a, b):
170
- """
171
- Returns the sum of two decimal numbers in binary digits.
172
-
173
- Parameters:
174
- a (int): A decimal integer
175
- b (int): Another decimal integer
176
-
177
- Returns:
178
- binary_sum (str): Binary string of the sum of a and b
179
- """
180
- binary_sum = bin(a + b)[2:]
181
- return binary_sum
182
-
183
-
184
- class Person:
185
- """
186
- A class to represent a person.
187
-
188
- ...
189
-
190
- Attributes
191
- ----------
192
- name : str
193
- first name of the person
194
- surname : str
195
- family name of the person
196
- age : int
197
- age of the person
198
-
199
- Methods
200
- -------
201
- info(additional=""):
202
- Prints the person's name and age.
203
- """
204
-
205
- def __init__(self, name: str, surname: str, age) -> None:
206
- """
207
- Constructs all the necessary attributes for the person object.
208
-
209
- Parameters
210
- ----------
211
- name : str
212
- first name of the person
213
- surname : str
214
- family name of the person
215
- age : int
216
- age of the person
217
- """
218
-
219
- self.name = name
220
- self.surname = surname
221
- self.age = age
222
-
223
- def info(self, additional: str = "") -> None:
224
- """
225
- Prints the person's name and age.
226
-
227
- If the argument 'additional' is passed, then it is appended after the main info.
228
-
229
- Parameters
230
- ----------
231
- additional : str, optional
232
- More info to be displayed (default is None)
233
-
234
- Returns
235
- -------
236
- None
237
- """
238
-
239
- print(
240
- f"My name is {self.name} {self.surname}. I am {self.age} years old."
241
- + additional
242
- )
243
-
244
-
245
-
246
-
247
- # if __name__ == "__main__":
248
- # import doctest
249
- # doctest.testmod()