├── .coveragerc
├── .github
└── workflows
│ ├── deploy-on-pypi.yml
│ └── test-jalali-pandas.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .pylintrc
├── LICENSE
├── README.md
├── docs
├── _config.yml
├── assets
│ └── github-jalali-pandas.png
└── index.md
├── examples
└── basic_usage.ipynb
├── jalali_pandas
├── __init__.py
├── df_handler.py
└── serie_handler.py
├── poetry.lock
├── pyproject.toml
├── requirements.txt
└── tests
├── __init__.py
├── df_test.py
└── series_test.py
/.coveragerc :
--------------------------------------------------------------------------------
1 | [run]
2 | source=jalali_pandas
3 |
--------------------------------------------------------------------------------
/.github/workflows/deploy-on-pypi.yml:
--------------------------------------------------------------------------------
1 | name: Python package
2 | on:
3 | push:
4 | tags:
5 | - "v*.*.*"
6 | jobs:
7 | build:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v2
11 | - name: Build and publish to pypi
12 | uses: JRubics/poetry-publish@v1.10
13 | with:
14 | pypi_token: ${{ secrets.PYPI_TOKEN }}
15 |
--------------------------------------------------------------------------------
/.github/workflows/test-jalali-pandas.yml:
--------------------------------------------------------------------------------
1 | name: code-coverage
2 |
3 | on: [push]
4 | jobs:
5 | run:
6 | runs-on: ${{ matrix.os }}
7 | strategy:
8 | matrix:
9 | os: [ubuntu-latest]
10 | env:
11 | OS: ${{ matrix.os }}
12 | PYTHON: '3.8'
13 | steps:
14 | - uses: actions/checkout@master
15 | - name: Setup Python
16 | uses: actions/setup-python@master
17 | with:
18 | python-version: 3.8
19 | - name: Generate coverage report
20 | run: |
21 | pip install pytest
22 | pip install pytest-cov
23 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
24 |
25 | pytest --cov=jalali_pandas --cov-report=xml
26 | - name: Upload coverage to Codecov
27 | uses: codecov/codecov-action@v2
28 | with:
29 | token: ${{ secrets.CODECOV_TOKEN }}
30 | env_vars: OS,PYTHON
31 | fail_ci_if_error: false
32 | name: codecov-umbrella
33 | verbose: true
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | pip-wheel-metadata/
24 | share/python-wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .nox/
44 | .coverage
45 | .coverage.*
46 | .cache
47 | nosetests.xml
48 | coverage.xml
49 | *.cover
50 | *.py,cover
51 | .hypothesis/
52 | .pytest_cache/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | target/
76 |
77 | # Jupyter Notebook
78 | .ipynb_checkpoints
79 |
80 | # IPython
81 | profile_default/
82 | ipython_config.py
83 |
84 | # pyenv
85 | .python-version
86 |
87 | # pipenv
88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
91 | # install all needed dependencies.
92 | #Pipfile.lock
93 |
94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95 | __pypackages__/
96 |
97 | # Celery stuff
98 | celerybeat-schedule
99 | celerybeat.pid
100 |
101 | # SageMath parsed files
102 | *.sage.py
103 |
104 | # Environments
105 | .env
106 | .venv
107 | env/
108 | venv/
109 | ENV/
110 | env.bak/
111 | venv.bak/
112 |
113 | # Spyder project settings
114 | .spyderproject
115 | .spyproject
116 |
117 | # Rope project settings
118 | .ropeproject
119 |
120 | # mkdocs documentation
121 | /site
122 |
123 | # mypy
124 | .mypy_cache/
125 | .dmypy.json
126 | dmypy.json
127 |
128 | # Pyre type checker
129 | .pyre/
130 |
131 |
132 | .vscode/
133 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | repos:
2 | - repo: https://github.com/pre-commit/pre-commit-hooks
3 | rev: v4.0.1
4 | hooks:
5 | - id: check-yaml
6 | - id: end-of-file-fixer
7 | - id: trailing-whitespace
8 | - repo: https://github.com/psf/black
9 | rev: 21.10b0
10 | hooks:
11 | - id: black
12 |
13 | - repo: local
14 | hooks:
15 | - id: pylint
16 | name: pylint
17 | entry: pylint
18 | language: python
19 | types: [python]
20 | args: [--rcfile=.pylintrc]
21 |
--------------------------------------------------------------------------------
/.pylintrc:
--------------------------------------------------------------------------------
1 | [MASTER]
2 | # A comma-separated list of package or module names from where C extensions may
3 | # be loaded. Extensions are loading into the active Python interpreter and may
4 | # run arbitrary code.
5 | extension-pkg-allow-list=
6 |
7 | # A comma-separated list of package or module names from where C extensions may
8 | # be loaded. Extensions are loading into the active Python interpreter and may
9 | # run arbitrary code. (This is an alternative name to extension-pkg-allow-list
10 | # for backward compatibility.)
11 | extension-pkg-whitelist=
12 |
13 | # Return non-zero exit code if any of these messages/categories are detected,
14 | # even if score is above --fail-under value. Syntax same as enable. Messages
15 | # specified are enabled, while categories only check already-enabled messages.
16 | fail-on=
17 |
18 | # Specify a score threshold to be exceeded before program exits with error.
19 | fail-under=10.0
20 |
21 | # Files or directories to be skipped. They should be base names, not paths.
22 | ignore=CVS
23 |
24 | # Add files or directories matching the regex patterns to the ignore-list. The
25 | # regex matches against paths.
26 | ignore-paths=
27 |
28 | # Files or directories matching the regex patterns are skipped. The regex
29 | # matches against base names, not paths.
30 | ignore-patterns=
31 |
32 | # Python code to execute, usually for sys.path manipulation such as
33 | # pygtk.require().
34 | #init-hook=
35 |
36 | # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
37 | # number of processors available to use.
38 | jobs=1
39 |
40 | # Control the amount of potential inferred values when inferring a single
41 | # object. This can help the performance when dealing with large functions or
42 | # complex, nested conditions.
43 | limit-inference-results=100
44 |
45 | # List of plugins (as comma separated values of python module names) to load,
46 | # usually to register additional checkers.
47 | load-plugins=
48 |
49 | # Pickle collected data for later comparisons.
50 | persistent=yes
51 |
52 | # Min Python version to use for version dependend checks. Will default to the
53 | # version used to run pylint.
54 | py-version=3.8
55 |
56 | # When enabled, pylint would attempt to guess common misconfiguration and emit
57 | # user-friendly hints instead of false-positive error messages.
58 | suggestion-mode=yes
59 |
60 | # Allow loading of arbitrary C extensions. Extensions are imported into the
61 | # active Python interpreter and may run arbitrary code.
62 | unsafe-load-any-extension=no
63 |
64 |
65 | [MESSAGES CONTROL]
66 |
67 | # Only show warnings with the listed confidence levels. Leave empty to show
68 | # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
69 | confidence=
70 |
71 | # Disable the message, report, category or checker with the given id(s). You
72 | # can either give multiple identifiers separated by comma (,) or put this
73 | # option multiple times (only on the command line, not in the configuration
74 | # file where it should appear only once). You can also use "--disable=all" to
75 | # disable everything first and then reenable specific checks. For example, if
76 | # you want to run only the similarities checker, you can use "--disable=all
77 | # --enable=similarities". If you want to run only the classes checker, but have
78 | # no Warning level messages displayed, use "--disable=all --enable=classes
79 | # --disable=W".
80 | disable=raw-checker-failed,
81 | bad-inline-option,
82 | locally-disabled,
83 | file-ignored,
84 | suppressed-message,
85 | useless-suppression,
86 | deprecated-pragma,
87 | use-symbolic-message-instead
88 |
89 | # Enable the message, report, category or checker with the given id(s). You can
90 | # either give multiple identifier separated by comma (,) or put this option
91 | # multiple time (only on the command line, not in the configuration file where
92 | # it should appear only once). See also the "--disable" option for examples.
93 | enable=c-extension-no-member
94 |
95 |
96 | [REPORTS]
97 |
98 | # Python expression which should return a score less than or equal to 10. You
99 | # have access to the variables 'error', 'warning', 'refactor', and 'convention'
100 | # which contain the number of messages in each category, as well as 'statement'
101 | # which is the total number of statements analyzed. This score is used by the
102 | # global evaluation report (RP0004).
103 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
104 |
105 | # Template used to display messages. This is a python new-style format string
106 | # used to format the message information. See doc for all details.
107 | #msg-template=
108 |
109 | # Set the output format. Available formats are text, parseable, colorized, json
110 | # and msvs (visual studio). You can also give a reporter class, e.g.
111 | # mypackage.mymodule.MyReporterClass.
112 | output-format=text
113 |
114 | # Tells whether to display a full report or only the messages.
115 | reports=no
116 |
117 | # Activate the evaluation score.
118 | score=yes
119 |
120 |
121 | [REFACTORING]
122 |
123 | # Maximum number of nested blocks for function / method body
124 | max-nested-blocks=5
125 |
126 | # Complete name of functions that never returns. When checking for
127 | # inconsistent-return-statements if a never returning function is called then
128 | # it will be considered as an explicit return statement and no message will be
129 | # printed.
130 | never-returning-functions=sys.exit,argparse.parse_error
131 |
132 |
133 | [LOGGING]
134 |
135 | # The type of string formatting that logging methods do. `old` means using %
136 | # formatting, `new` is for `{}` formatting.
137 | logging-format-style=old
138 |
139 | # Logging modules to check that the string format arguments are in logging
140 | # function parameter format.
141 | logging-modules=logging
142 |
143 |
144 | [SPELLING]
145 |
146 | # Limits count of emitted suggestions for spelling mistakes.
147 | max-spelling-suggestions=4
148 |
149 | # Spelling dictionary name. Available dictionaries: none. To make it work,
150 | # install the 'python-enchant' package.
151 | spelling-dict=
152 |
153 | # List of comma separated words that should be considered directives if they
154 | # appear and the beginning of a comment and should not be checked.
155 | spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
156 |
157 | # List of comma separated words that should not be checked.
158 | spelling-ignore-words=
159 |
160 | # A path to a file that contains the private dictionary; one word per line.
161 | spelling-private-dict-file=
162 |
163 | # Tells whether to store unknown words to the private dictionary (see the
164 | # --spelling-private-dict-file option) instead of raising a message.
165 | spelling-store-unknown-words=no
166 |
167 |
168 | [MISCELLANEOUS]
169 |
170 | # List of note tags to take in consideration, separated by a comma.
171 | notes=FIXME,
172 | XXX,
173 | TODO
174 |
175 | # Regular expression of note tags to take in consideration.
176 | #notes-rgx=
177 |
178 |
179 | [TYPECHECK]
180 |
181 | # List of decorators that produce context managers, such as
182 | # contextlib.contextmanager. Add to this list to register other decorators that
183 | # produce valid context managers.
184 | contextmanager-decorators=contextlib.contextmanager
185 |
186 | # List of members which are set dynamically and missed by pylint inference
187 | # system, and so shouldn't trigger E1101 when accessed. Python regular
188 | # expressions are accepted.
189 | generated-members=
190 |
191 | # Tells whether missing members accessed in mixin class should be ignored. A
192 | # mixin class is detected if its name ends with "mixin" (case insensitive).
193 | ignore-mixin-members=yes
194 |
195 | # Tells whether to warn about missing members when the owner of the attribute
196 | # is inferred to be None.
197 | ignore-none=yes
198 |
199 | # This flag controls whether pylint should warn about no-member and similar
200 | # checks whenever an opaque object is returned when inferring. The inference
201 | # can return multiple potential results while evaluating a Python object, but
202 | # some branches might not be evaluated, which results in partial inference. In
203 | # that case, it might be useful to still emit no-member and other checks for
204 | # the rest of the inferred objects.
205 | ignore-on-opaque-inference=yes
206 |
207 | # List of class names for which member attributes should not be checked (useful
208 | # for classes with dynamically set attributes). This supports the use of
209 | # qualified names.
210 | ignored-classes=optparse.Values,thread._local,_thread._local
211 |
212 | # List of module names for which member attributes should not be checked
213 | # (useful for modules/projects where namespaces are manipulated during runtime
214 | # and thus existing member attributes cannot be deduced by static analysis). It
215 | # supports qualified module names, as well as Unix pattern matching.
216 | ignored-modules=
217 |
218 | # Show a hint with possible names when a member name was not found. The aspect
219 | # of finding the hint is based on edit distance.
220 | missing-member-hint=yes
221 |
222 | # The minimum edit distance a name should have in order to be considered a
223 | # similar match for a missing member name.
224 | missing-member-hint-distance=1
225 |
226 | # The total number of similar names that should be taken in consideration when
227 | # showing a hint for a missing member.
228 | missing-member-max-choices=1
229 |
230 | # List of decorators that change the signature of a decorated function.
231 | signature-mutators=
232 |
233 |
234 | [VARIABLES]
235 |
236 | # List of additional names supposed to be defined in builtins. Remember that
237 | # you should avoid defining new builtins when possible.
238 | additional-builtins=
239 |
240 | # Tells whether unused global variables should be treated as a violation.
241 | allow-global-unused-variables=yes
242 |
243 | # List of names allowed to shadow builtins
244 | allowed-redefined-builtins=
245 |
246 | # List of strings which can identify a callback function by name. A callback
247 | # name must start or end with one of those strings.
248 | callbacks=cb_,
249 | _cb
250 |
251 | # A regular expression matching the name of dummy variables (i.e. expected to
252 | # not be used).
253 | dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
254 |
255 | # Argument names that match this expression will be ignored. Default to name
256 | # with leading underscore.
257 | ignored-argument-names=_.*|^ignored_|^unused_
258 |
259 | # Tells whether we should check for unused import in __init__ files.
260 | init-import=no
261 |
262 | # List of qualified module names which can have objects that can redefine
263 | # builtins.
264 | redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
265 |
266 |
267 | [FORMAT]
268 |
269 | # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
270 | expected-line-ending-format=
271 |
272 | # Regexp for a line that is allowed to be longer than the limit.
273 | ignore-long-lines=^\s*(# )??$
274 |
275 | # Number of spaces of indent required inside a hanging or continued line.
276 | indent-after-paren=4
277 |
278 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
279 | # tab).
280 | indent-string=' '
281 |
282 | # Maximum number of characters on a single line.
283 | max-line-length=100
284 |
285 | # Maximum number of lines in a module.
286 | max-module-lines=1000
287 |
288 | # Allow the body of a class to be on the same line as the declaration if body
289 | # contains single statement.
290 | single-line-class-stmt=no
291 |
292 | # Allow the body of an if to be on the same line as the test if there is no
293 | # else.
294 | single-line-if-stmt=no
295 |
296 |
297 | [SIMILARITIES]
298 |
299 | # Comments are removed from the similarity computation
300 | ignore-comments=yes
301 |
302 | # Docstrings are removed from the similarity computation
303 | ignore-docstrings=yes
304 |
305 | # Imports are removed from the similarity computation
306 | ignore-imports=no
307 |
308 | # Signatures are removed from the similarity computation
309 | ignore-signatures=no
310 |
311 | # Minimum lines number of a similarity.
312 | min-similarity-lines=4
313 |
314 |
315 | [BASIC]
316 |
317 | # Naming style matching correct argument names.
318 | argument-naming-style=snake_case
319 |
320 | # Regular expression matching correct argument names. Overrides argument-
321 | # naming-style.
322 | #argument-rgx=
323 |
324 | # Naming style matching correct attribute names.
325 | attr-naming-style=snake_case
326 |
327 | # Regular expression matching correct attribute names. Overrides attr-naming-
328 | # style.
329 | #attr-rgx=
330 |
331 | # Bad variable names which should always be refused, separated by a comma.
332 | bad-names=foo,
333 | bar,
334 | baz,
335 | toto,
336 | tutu,
337 | tata
338 |
339 | # Bad variable names regexes, separated by a comma. If names match any regex,
340 | # they will always be refused
341 | bad-names-rgxs=
342 |
343 | # Naming style matching correct class attribute names.
344 | class-attribute-naming-style=any
345 |
346 | # Regular expression matching correct class attribute names. Overrides class-
347 | # attribute-naming-style.
348 | #class-attribute-rgx=
349 |
350 | # Naming style matching correct class constant names.
351 | class-const-naming-style=UPPER_CASE
352 |
353 | # Regular expression matching correct class constant names. Overrides class-
354 | # const-naming-style.
355 | #class-const-rgx=
356 |
357 | # Naming style matching correct class names.
358 | class-naming-style=PascalCase
359 |
360 | # Regular expression matching correct class names. Overrides class-naming-
361 | # style.
362 | #class-rgx=
363 |
364 | # Naming style matching correct constant names.
365 | const-naming-style=UPPER_CASE
366 |
367 | # Regular expression matching correct constant names. Overrides const-naming-
368 | # style.
369 | #const-rgx=
370 |
371 | # Minimum line length for functions/classes that require docstrings, shorter
372 | # ones are exempt.
373 | docstring-min-length=-1
374 |
375 | # Naming style matching correct function names.
376 | function-naming-style=snake_case
377 |
378 | # Regular expression matching correct function names. Overrides function-
379 | # naming-style.
380 | #function-rgx=
381 |
382 | # Good variable names which should always be accepted, separated by a comma.
383 | good-names=i,
384 | j,
385 | k,
386 | ex,
387 | Run,
388 | _,
389 | df
390 |
391 | # Good variable names regexes, separated by a comma. If names match any regex,
392 | # they will always be accepted
393 | good-names-rgxs=
394 |
395 | # Include a hint for the correct naming format with invalid-name.
396 | include-naming-hint=no
397 |
398 | # Naming style matching correct inline iteration names.
399 | inlinevar-naming-style=any
400 |
401 | # Regular expression matching correct inline iteration names. Overrides
402 | # inlinevar-naming-style.
403 | #inlinevar-rgx=
404 |
405 | # Naming style matching correct method names.
406 | method-naming-style=snake_case
407 |
408 | # Regular expression matching correct method names. Overrides method-naming-
409 | # style.
410 | #method-rgx=
411 |
412 | # Naming style matching correct module names.
413 | module-naming-style=snake_case
414 |
415 | # Regular expression matching correct module names. Overrides module-naming-
416 | # style.
417 | #module-rgx=
418 |
419 | # Colon-delimited sets of names that determine each other's naming style when
420 | # the name regexes allow several styles.
421 | name-group=
422 |
423 | # Regular expression which should only match function or class names that do
424 | # not require a docstring.
425 | no-docstring-rgx=^_
426 |
427 | # List of decorators that produce properties, such as abc.abstractproperty. Add
428 | # to this list to register other decorators that produce valid properties.
429 | # These decorators are taken in consideration only for invalid-name.
430 | property-classes=abc.abstractproperty
431 |
432 | # Naming style matching correct variable names.
433 | variable-naming-style=snake_case
434 |
435 | # Regular expression matching correct variable names. Overrides variable-
436 | # naming-style.
437 | #variable-rgx=
438 |
439 |
440 | [STRING]
441 |
442 | # This flag controls whether inconsistent-quotes generates a warning when the
443 | # character used as a quote delimiter is used inconsistently within a module.
444 | check-quote-consistency=no
445 |
446 | # This flag controls whether the implicit-str-concat should generate a warning
447 | # on implicit string concatenation in sequences defined over several lines.
448 | check-str-concat-over-line-jumps=no
449 |
450 |
451 | [IMPORTS]
452 |
453 | # List of modules that can be imported at any level, not just the top level
454 | # one.
455 | allow-any-import-level=
456 |
457 | # Allow wildcard imports from modules that define __all__.
458 | allow-wildcard-with-all=no
459 |
460 | # Analyse import fallback blocks. This can be used to support both Python 2 and
461 | # 3 compatible code, which means that the block might have code that exists
462 | # only in one or another interpreter, leading to false positives when analysed.
463 | analyse-fallback-blocks=no
464 |
465 | # Deprecated modules which should not be used, separated by a comma.
466 | deprecated-modules=
467 |
468 | # Output a graph (.gv or any supported image format) of external dependencies
469 | # to the given file (report RP0402 must not be disabled).
470 | ext-import-graph=
471 |
472 | # Output a graph (.gv or any supported image format) of all (i.e. internal and
473 | # external) dependencies to the given file (report RP0402 must not be
474 | # disabled).
475 | import-graph=
476 |
477 | # Output a graph (.gv or any supported image format) of internal dependencies
478 | # to the given file (report RP0402 must not be disabled).
479 | int-import-graph=
480 |
481 | # Force import order to recognize a module as part of the standard
482 | # compatibility libraries.
483 | known-standard-library=
484 |
485 | # Force import order to recognize a module as part of a third party library.
486 | known-third-party=enchant
487 |
488 | # Couples of modules and preferred modules, separated by a comma.
489 | preferred-modules=
490 |
491 |
492 | [CLASSES]
493 |
494 | # Warn about protected attribute access inside special methods
495 | check-protected-access-in-special-methods=no
496 |
497 | # List of method names used to declare (i.e. assign) instance attributes.
498 | defining-attr-methods=__init__,
499 | __new__,
500 | setUp,
501 | __post_init__
502 |
503 | # List of member names, which should be excluded from the protected access
504 | # warning.
505 | exclude-protected=_asdict,
506 | _fields,
507 | _replace,
508 | _source,
509 | _make
510 |
511 | # List of valid names for the first argument in a class method.
512 | valid-classmethod-first-arg=cls
513 |
514 | # List of valid names for the first argument in a metaclass class method.
515 | valid-metaclass-classmethod-first-arg=cls
516 |
517 |
518 | [DESIGN]
519 |
520 | # List of qualified class names to ignore when counting class parents (see
521 | # R0901)
522 | ignored-parents=
523 |
524 | # Maximum number of arguments for function / method.
525 | max-args=5
526 |
527 | # Maximum number of attributes for a class (see R0902).
528 | max-attributes=7
529 |
530 | # Maximum number of boolean expressions in an if statement (see R0916).
531 | max-bool-expr=5
532 |
533 | # Maximum number of branch for function / method body.
534 | max-branches=12
535 |
536 | # Maximum number of locals for function / method body.
537 | max-locals=15
538 |
539 | # Maximum number of parents for a class (see R0901).
540 | max-parents=7
541 |
542 | # Maximum number of public methods for a class (see R0904).
543 | max-public-methods=20
544 |
545 | # Maximum number of return / yield for function / method body.
546 | max-returns=6
547 |
548 | # Maximum number of statements in function / method body.
549 | max-statements=50
550 |
551 | # Minimum number of public methods for a class (see R0903).
552 | min-public-methods=2
553 |
554 |
555 | [EXCEPTIONS]
556 |
557 | # Exceptions that will emit a warning when being caught. Defaults to
558 | # "BaseException, Exception".
559 | overgeneral-exceptions=BaseException,
560 | Exception
561 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU AFFERO GENERAL PUBLIC LICENSE
2 | Version 3, 19 November 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU Affero General Public License is a free, copyleft license for
11 | software and other kinds of works, specifically designed to ensure
12 | cooperation with the community in the case of network server software.
13 |
14 | The licenses for most software and other practical works are designed
15 | to take away your freedom to share and change the works. By contrast,
16 | our General Public Licenses are intended to guarantee your freedom to
17 | share and change all versions of a program--to make sure it remains free
18 | software for all its users.
19 |
20 | When we speak of free software, we are referring to freedom, not
21 | price. Our General Public Licenses are designed to make sure that you
22 | have the freedom to distribute copies of free software (and charge for
23 | them if you wish), that you receive source code or can get it if you
24 | want it, that you can change the software or use pieces of it in new
25 | free programs, and that you know you can do these things.
26 |
27 | Developers that use our General Public Licenses protect your rights
28 | with two steps: (1) assert copyright on the software, and (2) offer
29 | you this License which gives you legal permission to copy, distribute
30 | and/or modify the software.
31 |
32 | A secondary benefit of defending all users' freedom is that
33 | improvements made in alternate versions of the program, if they
34 | receive widespread use, become available for other developers to
35 | incorporate. Many developers of free software are heartened and
36 | encouraged by the resulting cooperation. However, in the case of
37 | software used on network servers, this result may fail to come about.
38 | The GNU General Public License permits making a modified version and
39 | letting the public access it on a server without ever releasing its
40 | source code to the public.
41 |
42 | The GNU Affero General Public License is designed specifically to
43 | ensure that, in such cases, the modified source code becomes available
44 | to the community. It requires the operator of a network server to
45 | provide the source code of the modified version running there to the
46 | users of that server. Therefore, public use of a modified version, on
47 | a publicly accessible server, gives the public access to the source
48 | code of the modified version.
49 |
50 | An older license, called the Affero General Public License and
51 | published by Affero, was designed to accomplish similar goals. This is
52 | a different license, not a version of the Affero GPL, but Affero has
53 | released a new version of the Affero GPL which permits relicensing under
54 | this license.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | TERMS AND CONDITIONS
60 |
61 | 0. Definitions.
62 |
63 | "This License" refers to version 3 of the GNU Affero General Public License.
64 |
65 | "Copyright" also means copyright-like laws that apply to other kinds of
66 | works, such as semiconductor masks.
67 |
68 | "The Program" refers to any copyrightable work licensed under this
69 | License. Each licensee is addressed as "you". "Licensees" and
70 | "recipients" may be individuals or organizations.
71 |
72 | To "modify" a work means to copy from or adapt all or part of the work
73 | in a fashion requiring copyright permission, other than the making of an
74 | exact copy. The resulting work is called a "modified version" of the
75 | earlier work or a work "based on" the earlier work.
76 |
77 | A "covered work" means either the unmodified Program or a work based
78 | on the Program.
79 |
80 | To "propagate" a work means to do anything with it that, without
81 | permission, would make you directly or secondarily liable for
82 | infringement under applicable copyright law, except executing it on a
83 | computer or modifying a private copy. Propagation includes copying,
84 | distribution (with or without modification), making available to the
85 | public, and in some countries other activities as well.
86 |
87 | To "convey" a work means any kind of propagation that enables other
88 | parties to make or receive copies. Mere interaction with a user through
89 | a computer network, with no transfer of a copy, is not conveying.
90 |
91 | An interactive user interface displays "Appropriate Legal Notices"
92 | to the extent that it includes a convenient and prominently visible
93 | feature that (1) displays an appropriate copyright notice, and (2)
94 | tells the user that there is no warranty for the work (except to the
95 | extent that warranties are provided), that licensees may convey the
96 | work under this License, and how to view a copy of this License. If
97 | the interface presents a list of user commands or options, such as a
98 | menu, a prominent item in the list meets this criterion.
99 |
100 | 1. Source Code.
101 |
102 | The "source code" for a work means the preferred form of the work
103 | for making modifications to it. "Object code" means any non-source
104 | form of a work.
105 |
106 | A "Standard Interface" means an interface that either is an official
107 | standard defined by a recognized standards body, or, in the case of
108 | interfaces specified for a particular programming language, one that
109 | is widely used among developers working in that language.
110 |
111 | The "System Libraries" of an executable work include anything, other
112 | than the work as a whole, that (a) is included in the normal form of
113 | packaging a Major Component, but which is not part of that Major
114 | Component, and (b) serves only to enable use of the work with that
115 | Major Component, or to implement a Standard Interface for which an
116 | implementation is available to the public in source code form. A
117 | "Major Component", in this context, means a major essential component
118 | (kernel, window system, and so on) of the specific operating system
119 | (if any) on which the executable work runs, or a compiler used to
120 | produce the work, or an object code interpreter used to run it.
121 |
122 | The "Corresponding Source" for a work in object code form means all
123 | the source code needed to generate, install, and (for an executable
124 | work) run the object code and to modify the work, including scripts to
125 | control those activities. However, it does not include the work's
126 | System Libraries, or general-purpose tools or generally available free
127 | programs which are used unmodified in performing those activities but
128 | which are not part of the work. For example, Corresponding Source
129 | includes interface definition files associated with source files for
130 | the work, and the source code for shared libraries and dynamically
131 | linked subprograms that the work is specifically designed to require,
132 | such as by intimate data communication or control flow between those
133 | subprograms and other parts of the work.
134 |
135 | The Corresponding Source need not include anything that users
136 | can regenerate automatically from other parts of the Corresponding
137 | Source.
138 |
139 | The Corresponding Source for a work in source code form is that
140 | same work.
141 |
142 | 2. Basic Permissions.
143 |
144 | All rights granted under this License are granted for the term of
145 | copyright on the Program, and are irrevocable provided the stated
146 | conditions are met. This License explicitly affirms your unlimited
147 | permission to run the unmodified Program. The output from running a
148 | covered work is covered by this License only if the output, given its
149 | content, constitutes a covered work. This License acknowledges your
150 | rights of fair use or other equivalent, as provided by copyright law.
151 |
152 | You may make, run and propagate covered works that you do not
153 | convey, without conditions so long as your license otherwise remains
154 | in force. You may convey covered works to others for the sole purpose
155 | of having them make modifications exclusively for you, or provide you
156 | with facilities for running those works, provided that you comply with
157 | the terms of this License in conveying all material for which you do
158 | not control copyright. Those thus making or running the covered works
159 | for you must do so exclusively on your behalf, under your direction
160 | and control, on terms that prohibit them from making any copies of
161 | your copyrighted material outside their relationship with you.
162 |
163 | Conveying under any other circumstances is permitted solely under
164 | the conditions stated below. Sublicensing is not allowed; section 10
165 | makes it unnecessary.
166 |
167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168 |
169 | No covered work shall be deemed part of an effective technological
170 | measure under any applicable law fulfilling obligations under article
171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172 | similar laws prohibiting or restricting circumvention of such
173 | measures.
174 |
175 | When you convey a covered work, you waive any legal power to forbid
176 | circumvention of technological measures to the extent such circumvention
177 | is effected by exercising rights under this License with respect to
178 | the covered work, and you disclaim any intention to limit operation or
179 | modification of the work as a means of enforcing, against the work's
180 | users, your or third parties' legal rights to forbid circumvention of
181 | technological measures.
182 |
183 | 4. Conveying Verbatim Copies.
184 |
185 | You may convey verbatim copies of the Program's source code as you
186 | receive it, in any medium, provided that you conspicuously and
187 | appropriately publish on each copy an appropriate copyright notice;
188 | keep intact all notices stating that this License and any
189 | non-permissive terms added in accord with section 7 apply to the code;
190 | keep intact all notices of the absence of any warranty; and give all
191 | recipients a copy of this License along with the Program.
192 |
193 | You may charge any price or no price for each copy that you convey,
194 | and you may offer support or warranty protection for a fee.
195 |
196 | 5. Conveying Modified Source Versions.
197 |
198 | You may convey a work based on the Program, or the modifications to
199 | produce it from the Program, in the form of source code under the
200 | terms of section 4, provided that you also meet all of these conditions:
201 |
202 | a) The work must carry prominent notices stating that you modified
203 | it, and giving a relevant date.
204 |
205 | b) The work must carry prominent notices stating that it is
206 | released under this License and any conditions added under section
207 | 7. This requirement modifies the requirement in section 4 to
208 | "keep intact all notices".
209 |
210 | c) You must license the entire work, as a whole, under this
211 | License to anyone who comes into possession of a copy. This
212 | License will therefore apply, along with any applicable section 7
213 | additional terms, to the whole of the work, and all its parts,
214 | regardless of how they are packaged. This License gives no
215 | permission to license the work in any other way, but it does not
216 | invalidate such permission if you have separately received it.
217 |
218 | d) If the work has interactive user interfaces, each must display
219 | Appropriate Legal Notices; however, if the Program has interactive
220 | interfaces that do not display Appropriate Legal Notices, your
221 | work need not make them do so.
222 |
223 | A compilation of a covered work with other separate and independent
224 | works, which are not by their nature extensions of the covered work,
225 | and which are not combined with it such as to form a larger program,
226 | in or on a volume of a storage or distribution medium, is called an
227 | "aggregate" if the compilation and its resulting copyright are not
228 | used to limit the access or legal rights of the compilation's users
229 | beyond what the individual works permit. Inclusion of a covered work
230 | in an aggregate does not cause this License to apply to the other
231 | parts of the aggregate.
232 |
233 | 6. Conveying Non-Source Forms.
234 |
235 | You may convey a covered work in object code form under the terms
236 | of sections 4 and 5, provided that you also convey the
237 | machine-readable Corresponding Source under the terms of this License,
238 | in one of these ways:
239 |
240 | a) Convey the object code in, or embodied in, a physical product
241 | (including a physical distribution medium), accompanied by the
242 | Corresponding Source fixed on a durable physical medium
243 | customarily used for software interchange.
244 |
245 | b) Convey the object code in, or embodied in, a physical product
246 | (including a physical distribution medium), accompanied by a
247 | written offer, valid for at least three years and valid for as
248 | long as you offer spare parts or customer support for that product
249 | model, to give anyone who possesses the object code either (1) a
250 | copy of the Corresponding Source for all the software in the
251 | product that is covered by this License, on a durable physical
252 | medium customarily used for software interchange, for a price no
253 | more than your reasonable cost of physically performing this
254 | conveying of source, or (2) access to copy the
255 | Corresponding Source from a network server at no charge.
256 |
257 | c) Convey individual copies of the object code with a copy of the
258 | written offer to provide the Corresponding Source. This
259 | alternative is allowed only occasionally and noncommercially, and
260 | only if you received the object code with such an offer, in accord
261 | with subsection 6b.
262 |
263 | d) Convey the object code by offering access from a designated
264 | place (gratis or for a charge), and offer equivalent access to the
265 | Corresponding Source in the same way through the same place at no
266 | further charge. You need not require recipients to copy the
267 | Corresponding Source along with the object code. If the place to
268 | copy the object code is a network server, the Corresponding Source
269 | may be on a different server (operated by you or a third party)
270 | that supports equivalent copying facilities, provided you maintain
271 | clear directions next to the object code saying where to find the
272 | Corresponding Source. Regardless of what server hosts the
273 | Corresponding Source, you remain obligated to ensure that it is
274 | available for as long as needed to satisfy these requirements.
275 |
276 | e) Convey the object code using peer-to-peer transmission, provided
277 | you inform other peers where the object code and Corresponding
278 | Source of the work are being offered to the general public at no
279 | charge under subsection 6d.
280 |
281 | A separable portion of the object code, whose source code is excluded
282 | from the Corresponding Source as a System Library, need not be
283 | included in conveying the object code work.
284 |
285 | A "User Product" is either (1) a "consumer product", which means any
286 | tangible personal property which is normally used for personal, family,
287 | or household purposes, or (2) anything designed or sold for incorporation
288 | into a dwelling. In determining whether a product is a consumer product,
289 | doubtful cases shall be resolved in favor of coverage. For a particular
290 | product received by a particular user, "normally used" refers to a
291 | typical or common use of that class of product, regardless of the status
292 | of the particular user or of the way in which the particular user
293 | actually uses, or expects or is expected to use, the product. A product
294 | is a consumer product regardless of whether the product has substantial
295 | commercial, industrial or non-consumer uses, unless such uses represent
296 | the only significant mode of use of the product.
297 |
298 | "Installation Information" for a User Product means any methods,
299 | procedures, authorization keys, or other information required to install
300 | and execute modified versions of a covered work in that User Product from
301 | a modified version of its Corresponding Source. The information must
302 | suffice to ensure that the continued functioning of the modified object
303 | code is in no case prevented or interfered with solely because
304 | modification has been made.
305 |
306 | If you convey an object code work under this section in, or with, or
307 | specifically for use in, a User Product, and the conveying occurs as
308 | part of a transaction in which the right of possession and use of the
309 | User Product is transferred to the recipient in perpetuity or for a
310 | fixed term (regardless of how the transaction is characterized), the
311 | Corresponding Source conveyed under this section must be accompanied
312 | by the Installation Information. But this requirement does not apply
313 | if neither you nor any third party retains the ability to install
314 | modified object code on the User Product (for example, the work has
315 | been installed in ROM).
316 |
317 | The requirement to provide Installation Information does not include a
318 | requirement to continue to provide support service, warranty, or updates
319 | for a work that has been modified or installed by the recipient, or for
320 | the User Product in which it has been modified or installed. Access to a
321 | network may be denied when the modification itself materially and
322 | adversely affects the operation of the network or violates the rules and
323 | protocols for communication across the network.
324 |
325 | Corresponding Source conveyed, and Installation Information provided,
326 | in accord with this section must be in a format that is publicly
327 | documented (and with an implementation available to the public in
328 | source code form), and must require no special password or key for
329 | unpacking, reading or copying.
330 |
331 | 7. Additional Terms.
332 |
333 | "Additional permissions" are terms that supplement the terms of this
334 | License by making exceptions from one or more of its conditions.
335 | Additional permissions that are applicable to the entire Program shall
336 | be treated as though they were included in this License, to the extent
337 | that they are valid under applicable law. If additional permissions
338 | apply only to part of the Program, that part may be used separately
339 | under those permissions, but the entire Program remains governed by
340 | this License without regard to the additional permissions.
341 |
342 | When you convey a copy of a covered work, you may at your option
343 | remove any additional permissions from that copy, or from any part of
344 | it. (Additional permissions may be written to require their own
345 | removal in certain cases when you modify the work.) You may place
346 | additional permissions on material, added by you to a covered work,
347 | for which you have or can give appropriate copyright permission.
348 |
349 | Notwithstanding any other provision of this License, for material you
350 | add to a covered work, you may (if authorized by the copyright holders of
351 | that material) supplement the terms of this License with terms:
352 |
353 | a) Disclaiming warranty or limiting liability differently from the
354 | terms of sections 15 and 16 of this License; or
355 |
356 | b) Requiring preservation of specified reasonable legal notices or
357 | author attributions in that material or in the Appropriate Legal
358 | Notices displayed by works containing it; or
359 |
360 | c) Prohibiting misrepresentation of the origin of that material, or
361 | requiring that modified versions of such material be marked in
362 | reasonable ways as different from the original version; or
363 |
364 | d) Limiting the use for publicity purposes of names of licensors or
365 | authors of the material; or
366 |
367 | e) Declining to grant rights under trademark law for use of some
368 | trade names, trademarks, or service marks; or
369 |
370 | f) Requiring indemnification of licensors and authors of that
371 | material by anyone who conveys the material (or modified versions of
372 | it) with contractual assumptions of liability to the recipient, for
373 | any liability that these contractual assumptions directly impose on
374 | those licensors and authors.
375 |
376 | All other non-permissive additional terms are considered "further
377 | restrictions" within the meaning of section 10. If the Program as you
378 | received it, or any part of it, contains a notice stating that it is
379 | governed by this License along with a term that is a further
380 | restriction, you may remove that term. If a license document contains
381 | a further restriction but permits relicensing or conveying under this
382 | License, you may add to a covered work material governed by the terms
383 | of that license document, provided that the further restriction does
384 | not survive such relicensing or conveying.
385 |
386 | If you add terms to a covered work in accord with this section, you
387 | must place, in the relevant source files, a statement of the
388 | additional terms that apply to those files, or a notice indicating
389 | where to find the applicable terms.
390 |
391 | Additional terms, permissive or non-permissive, may be stated in the
392 | form of a separately written license, or stated as exceptions;
393 | the above requirements apply either way.
394 |
395 | 8. Termination.
396 |
397 | You may not propagate or modify a covered work except as expressly
398 | provided under this License. Any attempt otherwise to propagate or
399 | modify it is void, and will automatically terminate your rights under
400 | this License (including any patent licenses granted under the third
401 | paragraph of section 11).
402 |
403 | However, if you cease all violation of this License, then your
404 | license from a particular copyright holder is reinstated (a)
405 | provisionally, unless and until the copyright holder explicitly and
406 | finally terminates your license, and (b) permanently, if the copyright
407 | holder fails to notify you of the violation by some reasonable means
408 | prior to 60 days after the cessation.
409 |
410 | Moreover, your license from a particular copyright holder is
411 | reinstated permanently if the copyright holder notifies you of the
412 | violation by some reasonable means, this is the first time you have
413 | received notice of violation of this License (for any work) from that
414 | copyright holder, and you cure the violation prior to 30 days after
415 | your receipt of the notice.
416 |
417 | Termination of your rights under this section does not terminate the
418 | licenses of parties who have received copies or rights from you under
419 | this License. If your rights have been terminated and not permanently
420 | reinstated, you do not qualify to receive new licenses for the same
421 | material under section 10.
422 |
423 | 9. Acceptance Not Required for Having Copies.
424 |
425 | You are not required to accept this License in order to receive or
426 | run a copy of the Program. Ancillary propagation of a covered work
427 | occurring solely as a consequence of using peer-to-peer transmission
428 | to receive a copy likewise does not require acceptance. However,
429 | nothing other than this License grants you permission to propagate or
430 | modify any covered work. These actions infringe copyright if you do
431 | not accept this License. Therefore, by modifying or propagating a
432 | covered work, you indicate your acceptance of this License to do so.
433 |
434 | 10. Automatic Licensing of Downstream Recipients.
435 |
436 | Each time you convey a covered work, the recipient automatically
437 | receives a license from the original licensors, to run, modify and
438 | propagate that work, subject to this License. You are not responsible
439 | for enforcing compliance by third parties with this License.
440 |
441 | An "entity transaction" is a transaction transferring control of an
442 | organization, or substantially all assets of one, or subdividing an
443 | organization, or merging organizations. If propagation of a covered
444 | work results from an entity transaction, each party to that
445 | transaction who receives a copy of the work also receives whatever
446 | licenses to the work the party's predecessor in interest had or could
447 | give under the previous paragraph, plus a right to possession of the
448 | Corresponding Source of the work from the predecessor in interest, if
449 | the predecessor has it or can get it with reasonable efforts.
450 |
451 | You may not impose any further restrictions on the exercise of the
452 | rights granted or affirmed under this License. For example, you may
453 | not impose a license fee, royalty, or other charge for exercise of
454 | rights granted under this License, and you may not initiate litigation
455 | (including a cross-claim or counterclaim in a lawsuit) alleging that
456 | any patent claim is infringed by making, using, selling, offering for
457 | sale, or importing the Program or any portion of it.
458 |
459 | 11. Patents.
460 |
461 | A "contributor" is a copyright holder who authorizes use under this
462 | License of the Program or a work on which the Program is based. The
463 | work thus licensed is called the contributor's "contributor version".
464 |
465 | A contributor's "essential patent claims" are all patent claims
466 | owned or controlled by the contributor, whether already acquired or
467 | hereafter acquired, that would be infringed by some manner, permitted
468 | by this License, of making, using, or selling its contributor version,
469 | but do not include claims that would be infringed only as a
470 | consequence of further modification of the contributor version. For
471 | purposes of this definition, "control" includes the right to grant
472 | patent sublicenses in a manner consistent with the requirements of
473 | this License.
474 |
475 | Each contributor grants you a non-exclusive, worldwide, royalty-free
476 | patent license under the contributor's essential patent claims, to
477 | make, use, sell, offer for sale, import and otherwise run, modify and
478 | propagate the contents of its contributor version.
479 |
480 | In the following three paragraphs, a "patent license" is any express
481 | agreement or commitment, however denominated, not to enforce a patent
482 | (such as an express permission to practice a patent or covenant not to
483 | sue for patent infringement). To "grant" such a patent license to a
484 | party means to make such an agreement or commitment not to enforce a
485 | patent against the party.
486 |
487 | If you convey a covered work, knowingly relying on a patent license,
488 | and the Corresponding Source of the work is not available for anyone
489 | to copy, free of charge and under the terms of this License, through a
490 | publicly available network server or other readily accessible means,
491 | then you must either (1) cause the Corresponding Source to be so
492 | available, or (2) arrange to deprive yourself of the benefit of the
493 | patent license for this particular work, or (3) arrange, in a manner
494 | consistent with the requirements of this License, to extend the patent
495 | license to downstream recipients. "Knowingly relying" means you have
496 | actual knowledge that, but for the patent license, your conveying the
497 | covered work in a country, or your recipient's use of the covered work
498 | in a country, would infringe one or more identifiable patents in that
499 | country that you have reason to believe are valid.
500 |
501 | If, pursuant to or in connection with a single transaction or
502 | arrangement, you convey, or propagate by procuring conveyance of, a
503 | covered work, and grant a patent license to some of the parties
504 | receiving the covered work authorizing them to use, propagate, modify
505 | or convey a specific copy of the covered work, then the patent license
506 | you grant is automatically extended to all recipients of the covered
507 | work and works based on it.
508 |
509 | A patent license is "discriminatory" if it does not include within
510 | the scope of its coverage, prohibits the exercise of, or is
511 | conditioned on the non-exercise of one or more of the rights that are
512 | specifically granted under this License. You may not convey a covered
513 | work if you are a party to an arrangement with a third party that is
514 | in the business of distributing software, under which you make payment
515 | to the third party based on the extent of your activity of conveying
516 | the work, and under which the third party grants, to any of the
517 | parties who would receive the covered work from you, a discriminatory
518 | patent license (a) in connection with copies of the covered work
519 | conveyed by you (or copies made from those copies), or (b) primarily
520 | for and in connection with specific products or compilations that
521 | contain the covered work, unless you entered into that arrangement,
522 | or that patent license was granted, prior to 28 March 2007.
523 |
524 | Nothing in this License shall be construed as excluding or limiting
525 | any implied license or other defenses to infringement that may
526 | otherwise be available to you under applicable patent law.
527 |
528 | 12. No Surrender of Others' Freedom.
529 |
530 | If conditions are imposed on you (whether by court order, agreement or
531 | otherwise) that contradict the conditions of this License, they do not
532 | excuse you from the conditions of this License. If you cannot convey a
533 | covered work so as to satisfy simultaneously your obligations under this
534 | License and any other pertinent obligations, then as a consequence you may
535 | not convey it at all. For example, if you agree to terms that obligate you
536 | to collect a royalty for further conveying from those to whom you convey
537 | the Program, the only way you could satisfy both those terms and this
538 | License would be to refrain entirely from conveying the Program.
539 |
540 | 13. Remote Network Interaction; Use with the GNU General Public License.
541 |
542 | Notwithstanding any other provision of this License, if you modify the
543 | Program, your modified version must prominently offer all users
544 | interacting with it remotely through a computer network (if your version
545 | supports such interaction) an opportunity to receive the Corresponding
546 | Source of your version by providing access to the Corresponding Source
547 | from a network server at no charge, through some standard or customary
548 | means of facilitating copying of software. This Corresponding Source
549 | shall include the Corresponding Source for any work covered by version 3
550 | of the GNU General Public License that is incorporated pursuant to the
551 | following paragraph.
552 |
553 | Notwithstanding any other provision of this License, you have
554 | permission to link or combine any covered work with a work licensed
555 | under version 3 of the GNU General Public License into a single
556 | combined work, and to convey the resulting work. The terms of this
557 | License will continue to apply to the part which is the covered work,
558 | but the work with which it is combined will remain governed by version
559 | 3 of the GNU General Public License.
560 |
561 | 14. Revised Versions of this License.
562 |
563 | The Free Software Foundation may publish revised and/or new versions of
564 | the GNU Affero General Public License from time to time. Such new versions
565 | will be similar in spirit to the present version, but may differ in detail to
566 | address new problems or concerns.
567 |
568 | Each version is given a distinguishing version number. If the
569 | Program specifies that a certain numbered version of the GNU Affero General
570 | Public License "or any later version" applies to it, you have the
571 | option of following the terms and conditions either of that numbered
572 | version or of any later version published by the Free Software
573 | Foundation. If the Program does not specify a version number of the
574 | GNU Affero General Public License, you may choose any version ever published
575 | by the Free Software Foundation.
576 |
577 | If the Program specifies that a proxy can decide which future
578 | versions of the GNU Affero General Public License can be used, that proxy's
579 | public statement of acceptance of a version permanently authorizes you
580 | to choose that version for the Program.
581 |
582 | Later license versions may give you additional or different
583 | permissions. However, no additional obligations are imposed on any
584 | author or copyright holder as a result of your choosing to follow a
585 | later version.
586 |
587 | 15. Disclaimer of Warranty.
588 |
589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597 |
598 | 16. Limitation of Liability.
599 |
600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608 | SUCH DAMAGES.
609 |
610 | 17. Interpretation of Sections 15 and 16.
611 |
612 | If the disclaimer of warranty and limitation of liability provided
613 | above cannot be given local legal effect according to their terms,
614 | reviewing courts shall apply local law that most closely approximates
615 | an absolute waiver of all civil liability in connection with the
616 | Program, unless a warranty or assumption of liability accompanies a
617 | copy of the Program in return for a fee.
618 |
619 | END OF TERMS AND CONDITIONS
620 |
621 | How to Apply These Terms to Your New Programs
622 |
623 | If you develop a new program, and you want it to be of the greatest
624 | possible use to the public, the best way to achieve this is to make it
625 | free software which everyone can redistribute and change under these terms.
626 |
627 | To do so, attach the following notices to the program. It is safest
628 | to attach them to the start of each source file to most effectively
629 | state the exclusion of warranty; and each file should have at least
630 | the "copyright" line and a pointer to where the full notice is found.
631 |
632 |
633 | Copyright (C)
634 |
635 | This program is free software: you can redistribute it and/or modify
636 | it under the terms of the GNU Affero General Public License as published
637 | by the Free Software Foundation, either version 3 of the License, or
638 | (at your option) any later version.
639 |
640 | This program is distributed in the hope that it will be useful,
641 | but WITHOUT ANY WARRANTY; without even the implied warranty of
642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643 | GNU Affero General Public License for more details.
644 |
645 | You should have received a copy of the GNU Affero General Public License
646 | along with this program. If not, see .
647 |
648 | Also add information on how to contact you by electronic and paper mail.
649 |
650 | If your software can interact with users remotely through a computer
651 | network, you should also make sure that it provides a way for users to
652 | get its source. For example, if your program is a web application, its
653 | interface could display a "Source" link that leads users to an archive
654 | of the code. There are many ways you could offer source, and different
655 | solutions will be better for different programs; see section 13 for the
656 | specific requirements.
657 |
658 | You should also get your employer (if you work as a programmer) or school,
659 | if any, to sign a "copyright disclaimer" for the program, if necessary.
660 | For more information on this, and how to apply and follow the GNU AGPL, see
661 | .
662 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](http://hits.dwyl.com/ghodsizadeh/jalali-pandas)
2 | 
3 | [](https://badge.fury.io/py/jalali-pandas)
4 | [](https://github.com/python/black)
5 | [](https://codecov.io/gh/ghodsizadeh/jalali-pandas)
6 | [](https://www.gnu.org/licenses/gpl-3.0)
7 | [](https://colab.research.google.com/github/ghodsizadeh/jalali-pandas/blob/main/examples/basic_usage.ipynb)
8 | 
9 |
10 | # Jalali Pandas Extentsion
11 |
12 | > A pandas extension that solves all problems of Jalai/Iraninan/Shamsi dates
13 |
14 | 
15 |
16 | ## Features
17 |
18 | #### Series Extenstion
19 |
20 | - Convert _string_ to _Jalali_ date `1388/03/25` --> `jdatetime(1388,3,25,0,0)`
21 | - Convert _gregorian_ date to _Jalali_ date `datetime(2019,11,17,0,0)` --> `jdatetime(1398,8,26,0,0)`
22 | - Convert _Jalali_ date to _gregorian_ date `jdatetime(1398,10,18,0,0)` --> `datetim(2020,1,8,6,19)`
23 |
24 | #### DataFrame extenstion
25 |
26 | - Support grouping by _Jalali_ date
27 | - Group by year, month, days, ...
28 | - Shortcuts for groups: `ymd` for `['year','month','day']` and more
29 | - Resampling: Convenience method for frequency conversion and resampling of time series but in _Jalali_ dateformat. (comming soon)
30 |
31 | ## Installation
32 |
33 | pip install -U jalali-pandas
34 |
35 | ## Usage
36 |
37 | Just import jalali-pandas and use pandas just use `.jalali` as a method for series and dataframes. Nothin outside pandas.
38 |
39 | > `jalali-pandas` is an extentsion for pandas, that add a mehtod for series/columns and dataframes.
40 |
41 | ### Series
42 |
43 | ```python
44 | import pandas as pd
45 | import jalali_pandas
46 |
47 | # create dataframe
48 | df = pd.DataFrame({"date": pd.date_range("2019-01-01", periods=10, freq="D")})
49 |
50 | # convert to jalali
51 | df["jdate"] = df["date"].jalali.to_jalali()
52 |
53 | # convert to gregorian
54 | df["gdate"] = df["jdate"].jalali.to_gregorian()
55 |
56 | # parse string to jalali
57 | df1 = pd.DataFrame({"date": ["1399/08/02", "1399/08/03", "1399/08/04"]})
58 | df1["jdate"] = df1["date"].jalali.parse_jalali("%Y/%m/%d")
59 |
60 |
61 | # get access to jalali year,quarter ,month, day and weekday
62 | df['year'] = df["jdate"].jalali.year
63 | df['month'] = df["jdate"].jalali.month
64 | df['quarter'] = df["jdate"].jalali.quarter
65 | df['day'] = df["jdate"].jalali.day
66 | df['weekday'] = df["jdate"].jalali.weekday
67 |
68 | ```
69 |
70 | ### DataFrame
71 |
72 | ```python
73 |
74 | import pandas as pd
75 | import jalali_pandas
76 |
77 | df = pd.DataFrame(
78 | {
79 | "date": pd.date_range("2019-01-01", periods=10, freq="M"),
80 | "value": range(10),
81 | }
82 | )
83 | # make sure to create a column with jalali datetime format. (you can use any name)
84 | df["jdate"] = df["date"].jalali.to_jalali()
85 |
86 |
87 | # group by jalali year
88 | gp = df.jalali.groupby("year")
89 | gp.sum()
90 |
91 | #group by month
92 | mean = df.jalali.groupby('mean')
93 |
94 | #groupby year and month and day
95 | mean = df.jalali.groupby('ymd')
96 | # or
97 | mean = df.jalali.groupby(['year','month','day'])
98 |
99 |
100 | #groupby year and quarter
101 | mean = df.jalali.groupby('yq')
102 | # or
103 | mean = df.jalali.groupby(['year','quarter'])
104 | ```
105 |
106 | ---
107 |
108 | # راهنمای فارسی
109 |
110 | برای مطالعه راهنمای فارسی استفاده از کتابخانه به این آدرس مراجعه کنید.
111 |
112 | [معرفی بسته pandas-jalali | آموزش کار با تاریخ شمسی در pandas](https://learnwithmehdi.ir/posts/jalali-pandas/)
113 | [معرفی بسته pandas-jalali | آموزش کار با تاریخ شمسی در pandas](https://learnwithmehdi.ir/posts/jalali-pandas/)
114 |
115 | ## راهنمای ویدیویی
116 |
117 | [](https://www.youtube.com/watch?v=PYS4Hxmzbyg)
118 |
119 | ## ToDos:
120 |
121 | - [x] add gregorian to Jalali Conversion
122 | - [x] add Jalali to gregorian Conversion
123 | - [ ] add support for sampling
124 | - [x] add date parser from other columns
125 | - [x] add date parser from string
126 |
--------------------------------------------------------------------------------
/docs/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-midnight
2 |
--------------------------------------------------------------------------------
/docs/assets/github-jalali-pandas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghodsizadeh/jalali-pandas/ce480829a3c50a53cb2a17c94e5a49648d18ca42/docs/assets/github-jalali-pandas.png
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | [](http://hits.dwyl.com/ghodsizadeh/jalali-pandas)
2 | 
3 | [](https://badge.fury.io/py/jalali-pandas)
4 | [](https://github.com/python/black)
5 | [](https://codecov.io/gh/ghodsizadeh/jalali-pandas)
6 | [](https://www.gnu.org/licenses/gpl-3.0)
7 | [](https://colab.research.google.com/github/ghodsizadeh/jalali-pandas/blob/main/examples/basic_usage.ipynb)
8 | 
9 |
10 | # Jalali Pandas Extentsion
11 |
12 | > A pandas extension that solves all problems of Jalai/Iraninan/Shamsi dates
13 |
14 | 
15 |
16 | ## Features
17 |
18 | #### Series Extenstion
19 |
20 | - Convert _string_ to _Jalali_ date `1388/03/25` --> `jdatetime(1388,3,25,0,0)`
21 | - Convert _gregorian_ date to _Jalali_ date `datetime(2019,11,17,0,0)` --> `jdatetime(1398,8,26,0,0)`
22 | - Convert _Jalali_ date to _gregorian_ date `jdatetime(1398,10,18,0,0)` --> `datetim(2020,1,8,6,19)`
23 |
24 | #### DataFrame extenstion
25 |
26 | - Support grouping by _Jalali_ date
27 | - Group by year, month, days, ...
28 | - Shortcuts for groups: `ymd` for `['year','month','day']` and more
29 | - Resampling: Convenience method for frequency conversion and resampling of time series but in _Jalali_ dateformat. (comming soon)
30 |
31 | ## Installation
32 |
33 | pip install -U jalali-pandas
34 |
35 | ## Usage
36 |
37 | Just import jalali-pandas and use pandas just use `.jalali` as a method for series and dataframes. Nothin outside pandas.
38 |
39 | > `jalali-pandas` is an extentsion for pandas, that add a mehtod for series/columns and dataframes.
40 |
41 | ### Series
42 |
43 | ```python
44 | import pandas as pd
45 | import jalali_pandas
46 |
47 | # create dataframe
48 | df = pd.DataFrame({"date": pd.date_range("2019-01-01", periods=10, freq="D")})
49 |
50 | # convert to jalali
51 | df["jdate"] = df["date"].jalali.to_jalali()
52 |
53 | # convert to gregorian
54 | df["gdate"] = df["jdate"].jalali.to_gregorian()
55 |
56 | # parse string to jalali
57 | df1 = pd.DataFrame({"date": ["1399/08/02", "1399/08/03", "1399/08/04"]})
58 | df1["jdate"] = df1["date"].jalali.parse_jalali("%Y/%m/%d")
59 |
60 |
61 | # get access to jalali year,quarter ,month, day and weekday
62 | df['year'] = df["jdate"].jalali.year
63 | df['month'] = df["jdate"].jalali.month
64 | df['quarter'] = df["jdate"].jalali.quarter
65 | df['day'] = df["jdate"].jalali.day
66 | df['weekday'] = df["jdate"].jalali.weekday
67 |
68 | ```
69 |
70 | ### DataFrame
71 |
72 | ```python
73 |
74 | import pandas as pd
75 | import jalali_pandas
76 |
77 | df = pd.DataFrame(
78 | {
79 | "date": pd.date_range("2019-01-01", periods=10, freq="M"),
80 | "value": range(10),
81 | }
82 | )
83 | # make sure to create a column with jalali datetime format. (you can use any name)
84 | df["jdate"] = df["date"].jalali.to_jalali()
85 |
86 |
87 | # group by jalali year
88 | gp = df.jalali.groupby("year")
89 | gp.sum()
90 |
91 | #group by month
92 | mean = df.jalali.groupby('mean')
93 |
94 | #groupby year and month and day
95 | mean = df.jalali.groupby('ymd')
96 | # or
97 | mean = df.jalali.groupby(['year','month','day'])
98 |
99 |
100 | #groupby year and quarter
101 | mean = df.jalali.groupby('yq')
102 | # or
103 | mean = df.jalali.groupby(['year','quarter'])
104 | ```
105 |
106 | ---
107 |
108 | # راهنمای فارسی
109 |
110 | برای مطالعه راهنمای فارسی استفاده از کتابخانه به این آدرس مراجعه کنید.
111 |
112 | [معرفی بسته pandas-jalali | آموزش کار با تاریخ شمسی در pandas](https://learnwithmehdi.ir/posts/jalali-pandas/)
113 |
114 | ## راهنمای ویدیویی
115 |
116 | [](https://www.youtube.com/watch?v=PYS4Hxmzbyg)
117 |
--------------------------------------------------------------------------------
/examples/basic_usage.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "[](https://colab.research.google.com/github/ghodsizadeh/jalali-pandas/blob/main/examples/basic_usage.ipynb)\n",
8 | ""
9 | ]
10 | },
11 | {
12 | "cell_type": "code",
13 | "execution_count": 1,
14 | "metadata": {
15 | "colab": {
16 | "base_uri": "https://localhost:8080/"
17 | },
18 | "id": "2Q0mm14pq6Vl",
19 | "outputId": "c141b374-74e2-4b43-cac3-12e730283e28"
20 | },
21 | "outputs": [
22 | {
23 | "name": "stdout",
24 | "output_type": "stream",
25 | "text": [
26 | "Requirement already satisfied: jalali-pandas in /usr/local/lib/python3.7/dist-packages (0.1.1)\n",
27 | "Requirement already satisfied: jdatetime<4.0.0,>=3.6.4 in /usr/local/lib/python3.7/dist-packages (from jalali-pandas) (3.6.4)\n"
28 | ]
29 | }
30 | ],
31 | "source": [
32 | "%pip install jalali-pandas"
33 | ]
34 | },
35 | {
36 | "cell_type": "code",
37 | "execution_count": 9,
38 | "metadata": {
39 | "id": "4SdQuawtwDav"
40 | },
41 | "outputs": [],
42 | "source": [
43 | "import pandas as pd\n",
44 | "import jalali_pandas"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": 10,
50 | "metadata": {
51 | "id": "iAa-llPyzFqe"
52 | },
53 | "outputs": [],
54 | "source": [
55 | "df = pd.DataFrame({\"date\": pd.date_range(\"2019-01-01\", periods=10, freq=\"D\")})"
56 | ]
57 | },
58 | {
59 | "cell_type": "markdown",
60 | "metadata": {
61 | "id": "bLP3LfwRz6Yf"
62 | },
63 | "source": [
64 | "# Working with Series"
65 | ]
66 | },
67 | {
68 | "cell_type": "code",
69 | "execution_count": 11,
70 | "metadata": {
71 | "colab": {
72 | "base_uri": "https://localhost:8080/",
73 | "height": 111
74 | },
75 | "id": "bYB97cjm0AHN",
76 | "outputId": "15738f62-344f-424e-b143-d232dad944b3"
77 | },
78 | "outputs": [
79 | {
80 | "data": {
81 | "text/html": [
82 | "\n",
83 | "\n",
96 | "
\n",
97 | " \n",
98 | " \n",
99 | " | \n",
100 | " date | \n",
101 | " jdate | \n",
102 | "
\n",
103 | " \n",
104 | " \n",
105 | " \n",
106 | " | 0 | \n",
107 | " 2019-01-01 | \n",
108 | " 1397-10-11 00:00:00 | \n",
109 | "
\n",
110 | " \n",
111 | " | 1 | \n",
112 | " 2019-01-02 | \n",
113 | " 1397-10-12 00:00:00 | \n",
114 | "
\n",
115 | " \n",
116 | "
\n",
117 | "
"
118 | ],
119 | "text/plain": [
120 | " date jdate\n",
121 | "0 2019-01-01 1397-10-11 00:00:00\n",
122 | "1 2019-01-02 1397-10-12 00:00:00"
123 | ]
124 | },
125 | "execution_count": 11,
126 | "metadata": {},
127 | "output_type": "execute_result"
128 | }
129 | ],
130 | "source": [
131 | "# convert to jalali\n",
132 | "df['jdate'] = df.date.jalali.to_jalali()\n",
133 | "df.head(2)"
134 | ]
135 | },
136 | {
137 | "cell_type": "code",
138 | "execution_count": 12,
139 | "metadata": {
140 | "id": "1DZxvM6P0Me9"
141 | },
142 | "outputs": [],
143 | "source": [
144 | "# convert jalali to gregorian\n",
145 | "df['gdate'] = df['jdate'].jalali.to_gregorian()"
146 | ]
147 | },
148 | {
149 | "cell_type": "code",
150 | "execution_count": 13,
151 | "metadata": {
152 | "id": "xgo7DmQF0VDl"
153 | },
154 | "outputs": [],
155 | "source": [
156 | "df1 = pd.DataFrame({\"date\": [\"1399/08/02\", \"1399/08/03\", \"1399/08/04\"]})\n",
157 | "df1[\"jdate\"] = df1[\"date\"].jalali.parse_jalali(\"%Y/%m/%d\")"
158 | ]
159 | },
160 | {
161 | "cell_type": "code",
162 | "execution_count": 14,
163 | "metadata": {
164 | "id": "H0pUA87hAaJ-"
165 | },
166 | "outputs": [],
167 | "source": [
168 | "# get access to jalali year,quarter ,month, day and weekday\n",
169 | "df['year'] = df[\"jdate\"].jalali.year\n",
170 | "df['month'] = df[\"jdate\"].jalali.month\n",
171 | "df['quarter'] = df[\"jdate\"].jalali.quarter\n",
172 | "df['day'] = df[\"jdate\"].jalali.day\n",
173 | "df['weekday'] = df[\"jdate\"].jalali.weekday"
174 | ]
175 | },
176 | {
177 | "cell_type": "markdown",
178 | "metadata": {
179 | "id": "v0BvJe70AeD7"
180 | },
181 | "source": [
182 | "# Working With DataFrames"
183 | ]
184 | },
185 | {
186 | "cell_type": "code",
187 | "execution_count": 15,
188 | "metadata": {
189 | "id": "5bEkMiCBAkfN"
190 | },
191 | "outputs": [],
192 | "source": [
193 | "df = pd.DataFrame(\n",
194 | " {\n",
195 | " \"date\": pd.date_range(\"2019-01-01\", periods=10, freq=\"M\"),\n",
196 | " \"value\": range(10),\n",
197 | " }\n",
198 | ")\n",
199 | "# make sure to create a column with jalali datetime format. (you can use any name)\n",
200 | "df[\"jdate\"] = df[\"date\"].jalali.to_jalali()"
201 | ]
202 | },
203 | {
204 | "cell_type": "code",
205 | "execution_count": 16,
206 | "metadata": {
207 | "colab": {
208 | "base_uri": "https://localhost:8080/",
209 | "height": 159
210 | },
211 | "id": "R6efLrJYArh-",
212 | "outputId": "d04460b7-cad2-454f-9dc6-25fd942c026d"
213 | },
214 | "outputs": [
215 | {
216 | "name": "stdout",
217 | "output_type": "stream",
218 | "text": [
219 | "Column \"jdate\" will be the refrence.\n"
220 | ]
221 | },
222 | {
223 | "data": {
224 | "text/html": [
225 | "\n",
226 | "\n",
239 | "
\n",
240 | " \n",
241 | " \n",
242 | " | \n",
243 | " value | \n",
244 | "
\n",
245 | " \n",
246 | " | __year | \n",
247 | " | \n",
248 | "
\n",
249 | " \n",
250 | " \n",
251 | " \n",
252 | " | 1397 | \n",
253 | " 1 | \n",
254 | "
\n",
255 | " \n",
256 | " | 1398 | \n",
257 | " 44 | \n",
258 | "
\n",
259 | " \n",
260 | "
\n",
261 | "
"
262 | ],
263 | "text/plain": [
264 | " value\n",
265 | "__year \n",
266 | "1397 1\n",
267 | "1398 44"
268 | ]
269 | },
270 | "execution_count": 16,
271 | "metadata": {},
272 | "output_type": "execute_result"
273 | }
274 | ],
275 | "source": [
276 | "# group by jalali year\n",
277 | "gp = df.jalali.groupby(\"year\")\n",
278 | "gp.sum()\n"
279 | ]
280 | },
281 | {
282 | "cell_type": "code",
283 | "execution_count": 20,
284 | "metadata": {
285 | "id": "_4D09DRxAssq"
286 | },
287 | "outputs": [],
288 | "source": [
289 | "mean = df.jalali.groupby('month').mean()"
290 | ]
291 | },
292 | {
293 | "cell_type": "code",
294 | "execution_count": 22,
295 | "metadata": {
296 | "colab": {
297 | "base_uri": "https://localhost:8080/",
298 | "height": 390
299 | },
300 | "id": "2wi2vCEDAu72",
301 | "outputId": "2b26a46a-1910-465b-ed0b-fa03d592145a"
302 | },
303 | "outputs": [
304 | {
305 | "data": {
306 | "text/html": [
307 | "\n",
308 | "\n",
321 | "
\n",
322 | " \n",
323 | " \n",
324 | " | \n",
325 | " | \n",
326 | " | \n",
327 | " value | \n",
328 | "
\n",
329 | " \n",
330 | " | __year | \n",
331 | " __month | \n",
332 | " __day | \n",
333 | " | \n",
334 | "
\n",
335 | " \n",
336 | " \n",
337 | " \n",
338 | " | 1397 | \n",
339 | " 11 | \n",
340 | " 11 | \n",
341 | " 0 | \n",
342 | "
\n",
343 | " \n",
344 | " | 12 | \n",
345 | " 9 | \n",
346 | " 1 | \n",
347 | "
\n",
348 | " \n",
349 | " | 1398 | \n",
350 | " 1 | \n",
351 | " 11 | \n",
352 | " 2 | \n",
353 | "
\n",
354 | " \n",
355 | " | 2 | \n",
356 | " 10 | \n",
357 | " 3 | \n",
358 | "
\n",
359 | " \n",
360 | " | 3 | \n",
361 | " 10 | \n",
362 | " 4 | \n",
363 | "
\n",
364 | " \n",
365 | " | 4 | \n",
366 | " 9 | \n",
367 | " 5 | \n",
368 | "
\n",
369 | " \n",
370 | " | 5 | \n",
371 | " 9 | \n",
372 | " 6 | \n",
373 | "
\n",
374 | " \n",
375 | " | 6 | \n",
376 | " 9 | \n",
377 | " 7 | \n",
378 | "
\n",
379 | " \n",
380 | " | 7 | \n",
381 | " 8 | \n",
382 | " 8 | \n",
383 | "
\n",
384 | " \n",
385 | " | 8 | \n",
386 | " 9 | \n",
387 | " 9 | \n",
388 | "
\n",
389 | " \n",
390 | "
\n",
391 | "
"
392 | ],
393 | "text/plain": [
394 | " value\n",
395 | "__year __month __day \n",
396 | "1397 11 11 0\n",
397 | " 12 9 1\n",
398 | "1398 1 11 2\n",
399 | " 2 10 3\n",
400 | " 3 10 4\n",
401 | " 4 9 5\n",
402 | " 5 9 6\n",
403 | " 6 9 7\n",
404 | " 7 8 8\n",
405 | " 8 9 9"
406 | ]
407 | },
408 | "execution_count": 22,
409 | "metadata": {},
410 | "output_type": "execute_result"
411 | }
412 | ],
413 | "source": [
414 | "mean = df.jalali.groupby('ymd')\n",
415 | "mean.mean()"
416 | ]
417 | },
418 | {
419 | "cell_type": "code",
420 | "execution_count": 24,
421 | "metadata": {
422 | "colab": {
423 | "base_uri": "https://localhost:8080/",
424 | "height": 204
425 | },
426 | "id": "F2d3yGmqA6Jx",
427 | "outputId": "6bcbeb43-d154-4474-a9e6-9a6445e21007"
428 | },
429 | "outputs": [
430 | {
431 | "data": {
432 | "text/html": [
433 | "\n",
434 | "\n",
447 | "
\n",
448 | " \n",
449 | " \n",
450 | " | \n",
451 | " | \n",
452 | " value | \n",
453 | "
\n",
454 | " \n",
455 | " | __year | \n",
456 | " __quarter | \n",
457 | " | \n",
458 | "
\n",
459 | " \n",
460 | " \n",
461 | " \n",
462 | " | 1397 | \n",
463 | " 4 | \n",
464 | " 0.5 | \n",
465 | "
\n",
466 | " \n",
467 | " | 1398 | \n",
468 | " 1 | \n",
469 | " 3.0 | \n",
470 | "
\n",
471 | " \n",
472 | " | 2 | \n",
473 | " 6.0 | \n",
474 | "
\n",
475 | " \n",
476 | " | 3 | \n",
477 | " 8.5 | \n",
478 | "
\n",
479 | " \n",
480 | "
\n",
481 | "
"
482 | ],
483 | "text/plain": [
484 | " value\n",
485 | "__year __quarter \n",
486 | "1397 4 0.5\n",
487 | "1398 1 3.0\n",
488 | " 2 6.0\n",
489 | " 3 8.5"
490 | ]
491 | },
492 | "execution_count": 24,
493 | "metadata": {},
494 | "output_type": "execute_result"
495 | }
496 | ],
497 | "source": [
498 | "mean = df.jalali.groupby('yq')\n",
499 | "mean.mean()"
500 | ]
501 | }
502 | ],
503 | "metadata": {
504 | "colab": {
505 | "name": "JalaliPandas.ipynb",
506 | "provenance": []
507 | },
508 | "kernelspec": {
509 | "display_name": "Python 3",
510 | "name": "python3"
511 | },
512 | "language_info": {
513 | "name": "python"
514 | }
515 | },
516 | "nbformat": 4,
517 | "nbformat_minor": 0
518 | }
519 |
--------------------------------------------------------------------------------
/jalali_pandas/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Jalali Pandas
3 | """
4 | from .df_handler import JalaliDataframeAccessor
5 | from .serie_handler import JalaliSerieAccessor
6 |
--------------------------------------------------------------------------------
/jalali_pandas/df_handler.py:
--------------------------------------------------------------------------------
1 | """
2 | handle jalaali dates in pandas dataframes
3 | """
4 | from typing import List, Union
5 | import pandas as pd
6 | import jdatetime
7 |
8 | # pylint: disable=unused-import
9 | # from .serie_handler import JalaliSerieAccessor
10 | LSTR = List[str]
11 |
12 |
13 | @pd.api.extensions.register_dataframe_accessor("jalali")
14 | class JalaliDataframeAccessor:
15 | """
16 | Accessor methods on pandas series to handle jalali dates
17 |
18 | """
19 |
20 | TEMP_COLUMNS = ["__year", "__month", "__quarter", "__weekday", "__day"]
21 |
22 | def __init__(self, pandas_obj: pd.DataFrame):
23 | """[summary]
24 |
25 | Args:
26 | pandas_obj (pd.Dataframe): [description]
27 | """
28 | self._obj = pandas_obj # type: pd.DataFrame
29 | self.columns = self._obj.columns # type: pd.Index
30 | self.jdate = "jdate"
31 | self.__validate()
32 |
33 | def __validate(self):
34 | """
35 | check if the pandas object is a dataframe with a jdatetime on it
36 |
37 | Args:
38 | pandas_obj (pd.DataFrame): [description]
39 | """
40 | for col in self.columns:
41 | if isinstance(self._obj[col].iloc[0], jdatetime.date):
42 | print(f'Column "{col}" will be the refrence.')
43 | self.jdate = col
44 | return
45 | raise ValueError("No jdatetime column found in the dataframe.")
46 |
47 | @property
48 | def __df(self) -> pd.DataFrame:
49 | """Genreate temp data frame for the groupby
50 |
51 | Returns:
52 | pd.DataFrame: a dataframe with year, month, day, week, dayofweek, dayofmonth
53 | """
54 | df = self._obj.copy()
55 | df["__year"] = df[self.jdate].jalali.year
56 | df["__month"] = df[self.jdate].jalali.month
57 | df["__day"] = df[self.jdate].jalali.day
58 | df["__quarter"] = df[self.jdate].jalali.quarter
59 | df["__weekday"] = df[self.jdate].jalali.weekday
60 |
61 | return df
62 |
63 | # a function that get str or list of str
64 |
65 | def __clean_groupby(self, group: pd.Grouper) -> pd.Grouper:
66 | """
67 | clean the groupby object
68 |
69 | Args:
70 | group (pd.Grouper): [description]
71 |
72 | Returns:
73 | pd.Grouper: [description]
74 | """
75 | remaining_columns = list(set(self.columns).difference(self.TEMP_COLUMNS))
76 | # breakpoint
77 | return group[remaining_columns]
78 |
79 | def groupby(self, grouper: Union[str, LSTR] = "md") -> pd.Grouper:
80 | """
81 | groupby jalali date
82 |
83 | Args:
84 | kind (str, optional): [description]. Defaults to 'md'.
85 |
86 | Returns:
87 | pd.Grouper: [description]
88 | """
89 | possible_keys = [
90 | "year",
91 | "month",
92 | "day",
93 | "week",
94 | "dayofweek",
95 | "dayofmonth",
96 | "ym",
97 | "yq",
98 | "ymd",
99 | "md",
100 | ]
101 | df = self.__df
102 | if grouper not in possible_keys:
103 | raise ValueError(
104 | f"{grouper} is not a valid groupby type. Choose from {possible_keys}"
105 | )
106 |
107 | keys = {
108 | "md": ["month", "day"],
109 | "ym": ["year", "month"],
110 | "yq": ["year", "quarter"],
111 | "ymd": ["year", "month", "day"],
112 | }
113 | if grouper in keys:
114 | grouper = keys[grouper]
115 | grouper = [f"__{g}" for g in grouper]
116 | else:
117 | grouper = [f"__{grouper}"]
118 |
119 | group = df.groupby(grouper)
120 | group = self.__clean_groupby(group)
121 | return group
122 |
123 | def resample(self, resample_type: str) -> pd.DataFrame:
124 | """[summary]
125 |
126 | Raises:
127 | NotImplementedError: [description]
128 | """
129 | raise NotImplementedError
130 |
--------------------------------------------------------------------------------
/jalali_pandas/serie_handler.py:
--------------------------------------------------------------------------------
1 | """
2 | handle jalaali dates in pandas series
3 | """
4 | import jdatetime
5 | import pandas as pd
6 |
7 |
8 | @pd.api.extensions.register_series_accessor("jalali")
9 | class JalaliSerieAccessor:
10 | """
11 | Accessor methods on pandas series to handle jalali dates
12 |
13 | """
14 |
15 | def __init__(self, pandas_obj: pd.Series):
16 | """[summary]
17 |
18 | Args:
19 | pandas_obj (pd.Series): [description]
20 | """
21 | # self._validate(pandas_obj)
22 | self._obj = pandas_obj
23 |
24 | def __validate(self):
25 | """validate pandas series is datetime or not.
26 |
27 | Raises:
28 | TypeError: [description]
29 | """
30 |
31 | if not all(isinstance(x, (str, jdatetime.date)) for x in self._obj):
32 | raise TypeError("pandas series must be jdatetime or string of jdate")
33 |
34 | def to_jalali(self) -> pd.Series:
35 | """convert python datetime to jalali datetime.
36 |
37 | Returns:
38 | pd.Series: pd.Series of jalali datetime.
39 | """
40 | return self._obj.apply(lambda x: jdatetime.datetime.fromgregorian(date=x))
41 |
42 | def to_gregorian(self) -> pd.Series:
43 | """convert jalali datetime to python default datetime.
44 |
45 | Returns:
46 | pd.Series: pd.Series of python datetime.
47 | """
48 |
49 | return self._obj.apply(jdatetime.datetime.togregorian)
50 |
51 | # pylint: disable=redefined-builtin
52 | def parse_jalali(self, format: str = "%Y-%m-%d") -> pd.Series:
53 | """[summary]
54 |
55 | Args:
56 | format (str, optional): like gregorian datetime format. Defaults to "%Y-%m-%d".
57 |
58 | Returns:
59 | pd.Series: pd.Series of jalali datetime.
60 | """
61 | return self._obj.apply(lambda x: jdatetime.datetime.strptime(x, format))
62 |
63 | @property
64 | def year(self) -> pd.Series:
65 | """get Jalali year
66 |
67 | Returns:
68 | pd.Series: Jalali year
69 | """
70 | self.__validate()
71 | return self._obj.apply(lambda x: x.year)
72 |
73 | @property
74 | def month(self) -> pd.Series:
75 | """get Jalali
76 |
77 |
78 | Returns:
79 | pd.Series: Jalali month
80 | """
81 | self.__validate()
82 | return self._obj.apply(lambda x: x.month)
83 |
84 | @property
85 | def day(self) -> pd.Series:
86 | """get Jalali day
87 |
88 | Returns:
89 | pd.Series: Jalali day
90 | """
91 | self.__validate()
92 | return self._obj.apply(lambda x: x.day)
93 |
94 | @property
95 | def hour(self) -> pd.Series:
96 | """get Jalali hour
97 |
98 | Returns:
99 | pd.Series: Jalali hour
100 | """
101 | self.__validate()
102 | return self._obj.apply(lambda x: x.hour)
103 |
104 | @property
105 | def minute(self) -> pd.Series:
106 | """get Jalali minute
107 |
108 | Returns:
109 | pd.Series: Jalali minute
110 | """
111 | self.__validate()
112 | return self._obj.apply(lambda x: x.minute)
113 |
114 | @property
115 | def second(self) -> pd.Series:
116 | """get Jalali second
117 |
118 | Returns:
119 | pd.Series: Jalali second
120 | """
121 | self.__validate()
122 | return self._obj.apply(lambda x: x.second)
123 |
124 | @property
125 | def weekday(self) -> pd.Series:
126 | """get Jalali weekday
127 |
128 | Returns:
129 | pd.Series: Jalali weekday
130 | """
131 | self.__validate()
132 | return self._obj.apply(lambda x: x.weekday())
133 |
134 | @property
135 | def weeknumber(self) -> pd.Series:
136 | """get Jalali day of year
137 |
138 | Returns:
139 | pd.Series: Jalali day of year
140 | """
141 | self.__validate()
142 | return self._obj.apply(lambda x: x.weeknumber())
143 |
144 | @property
145 | def quarter(self):
146 | """get Jalali quarter
147 |
148 | Returns:
149 | pd.Series: Jalali quarter
150 | """
151 | self.__validate()
152 | month = self.month
153 | return month.apply(lambda x: (x - 1) // 3 + 1)
154 |
--------------------------------------------------------------------------------
/poetry.lock:
--------------------------------------------------------------------------------
1 | [[package]]
2 | name = "astroid"
3 | version = "2.9.0"
4 | description = "An abstract syntax tree for Python with inference support."
5 | category = "main"
6 | optional = false
7 | python-versions = "~=3.6"
8 |
9 | [package.dependencies]
10 | lazy-object-proxy = ">=1.4.0"
11 | typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""}
12 | wrapt = ">=1.11,<1.14"
13 |
14 | [[package]]
15 | name = "atomicwrites"
16 | version = "1.4.0"
17 | description = "Atomic file writes."
18 | category = "main"
19 | optional = false
20 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
21 |
22 | [[package]]
23 | name = "attrs"
24 | version = "21.2.0"
25 | description = "Classes Without Boilerplate"
26 | category = "main"
27 | optional = false
28 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
29 |
30 | [package.extras]
31 | dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"]
32 | docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
33 | tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"]
34 | tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"]
35 |
36 | [[package]]
37 | name = "black"
38 | version = "21.11b1"
39 | description = "The uncompromising code formatter."
40 | category = "dev"
41 | optional = false
42 | python-versions = ">=3.6.2"
43 |
44 | [package.dependencies]
45 | click = ">=7.1.2"
46 | mypy-extensions = ">=0.4.3"
47 | pathspec = ">=0.9.0,<1"
48 | platformdirs = ">=2"
49 | regex = ">=2021.4.4"
50 | tomli = ">=0.2.6,<2.0.0"
51 | typing-extensions = [
52 | {version = ">=3.10.0.0", markers = "python_version < \"3.10\""},
53 | {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""},
54 | ]
55 |
56 | [package.extras]
57 | colorama = ["colorama (>=0.4.3)"]
58 | d = ["aiohttp (>=3.7.4)"]
59 | jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
60 | python2 = ["typed-ast (>=1.4.3)"]
61 | uvloop = ["uvloop (>=0.15.2)"]
62 |
63 | [[package]]
64 | name = "click"
65 | version = "8.0.3"
66 | description = "Composable command line interface toolkit"
67 | category = "dev"
68 | optional = false
69 | python-versions = ">=3.6"
70 |
71 | [package.dependencies]
72 | colorama = {version = "*", markers = "platform_system == \"Windows\""}
73 |
74 | [[package]]
75 | name = "colorama"
76 | version = "0.4.4"
77 | description = "Cross-platform colored terminal text."
78 | category = "main"
79 | optional = false
80 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
81 |
82 | [[package]]
83 | name = "coverage"
84 | version = "6.1.2"
85 | description = "Code coverage measurement for Python"
86 | category = "main"
87 | optional = false
88 | python-versions = ">=3.6"
89 |
90 | [package.dependencies]
91 | tomli = {version = "*", optional = true, markers = "extra == \"toml\""}
92 |
93 | [package.extras]
94 | toml = ["tomli"]
95 |
96 | [[package]]
97 | name = "iniconfig"
98 | version = "1.1.1"
99 | description = "iniconfig: brain-dead simple config-ini parsing"
100 | category = "main"
101 | optional = false
102 | python-versions = "*"
103 |
104 | [[package]]
105 | name = "isort"
106 | version = "5.10.1"
107 | description = "A Python utility / library to sort Python imports."
108 | category = "main"
109 | optional = false
110 | python-versions = ">=3.6.1,<4.0"
111 |
112 | [package.extras]
113 | pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
114 | requirements_deprecated_finder = ["pipreqs", "pip-api"]
115 | colors = ["colorama (>=0.4.3,<0.5.0)"]
116 | plugins = ["setuptools"]
117 |
118 | [[package]]
119 | name = "jdatetime"
120 | version = "3.6.4"
121 | description = "Jalali datetime binding for python"
122 | category = "main"
123 | optional = false
124 | python-versions = "*"
125 |
126 | [[package]]
127 | name = "lazy-object-proxy"
128 | version = "1.6.0"
129 | description = "A fast and thorough lazy object proxy."
130 | category = "main"
131 | optional = false
132 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
133 |
134 | [[package]]
135 | name = "mccabe"
136 | version = "0.6.1"
137 | description = "McCabe checker, plugin for flake8"
138 | category = "main"
139 | optional = false
140 | python-versions = "*"
141 |
142 | [[package]]
143 | name = "mypy-extensions"
144 | version = "0.4.3"
145 | description = "Experimental type system extensions for programs checked with the mypy typechecker."
146 | category = "dev"
147 | optional = false
148 | python-versions = "*"
149 |
150 | [[package]]
151 | name = "packaging"
152 | version = "21.3"
153 | description = "Core utilities for Python packages"
154 | category = "main"
155 | optional = false
156 | python-versions = ">=3.6"
157 |
158 | [package.dependencies]
159 | pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
160 |
161 | [[package]]
162 | name = "pathspec"
163 | version = "0.9.0"
164 | description = "Utility library for gitignore style pattern matching of file paths."
165 | category = "dev"
166 | optional = false
167 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
168 |
169 | [[package]]
170 | name = "platformdirs"
171 | version = "2.4.0"
172 | description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
173 | category = "main"
174 | optional = false
175 | python-versions = ">=3.6"
176 |
177 | [package.extras]
178 | docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"]
179 | test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"]
180 |
181 | [[package]]
182 | name = "pluggy"
183 | version = "1.0.0"
184 | description = "plugin and hook calling mechanisms for python"
185 | category = "main"
186 | optional = false
187 | python-versions = ">=3.6"
188 |
189 | [package.extras]
190 | dev = ["pre-commit", "tox"]
191 | testing = ["pytest", "pytest-benchmark"]
192 |
193 | [[package]]
194 | name = "py"
195 | version = "1.11.0"
196 | description = "library with cross-python path, ini-parsing, io, code, log facilities"
197 | category = "main"
198 | optional = false
199 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
200 |
201 | [[package]]
202 | name = "pylint"
203 | version = "2.12.1"
204 | description = "python code static checker"
205 | category = "main"
206 | optional = false
207 | python-versions = ">=3.6.2"
208 |
209 | [package.dependencies]
210 | astroid = ">=2.9.0,<2.10"
211 | colorama = {version = "*", markers = "sys_platform == \"win32\""}
212 | isort = ">=4.2.5,<6"
213 | mccabe = ">=0.6,<0.7"
214 | platformdirs = ">=2.2.0"
215 | toml = ">=0.9.2"
216 | typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""}
217 |
218 | [[package]]
219 | name = "pyparsing"
220 | version = "3.0.6"
221 | description = "Python parsing module"
222 | category = "main"
223 | optional = false
224 | python-versions = ">=3.6"
225 |
226 | [package.extras]
227 | diagrams = ["jinja2", "railroad-diagrams"]
228 |
229 | [[package]]
230 | name = "pytest"
231 | version = "6.2.5"
232 | description = "pytest: simple powerful testing with Python"
233 | category = "main"
234 | optional = false
235 | python-versions = ">=3.6"
236 |
237 | [package.dependencies]
238 | atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
239 | attrs = ">=19.2.0"
240 | colorama = {version = "*", markers = "sys_platform == \"win32\""}
241 | iniconfig = "*"
242 | packaging = "*"
243 | pluggy = ">=0.12,<2.0"
244 | py = ">=1.8.2"
245 | toml = "*"
246 |
247 | [package.extras]
248 | testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
249 |
250 | [[package]]
251 | name = "pytest-cov"
252 | version = "3.0.0"
253 | description = "Pytest plugin for measuring coverage."
254 | category = "main"
255 | optional = false
256 | python-versions = ">=3.6"
257 |
258 | [package.dependencies]
259 | coverage = {version = ">=5.2.1", extras = ["toml"]}
260 | pytest = ">=4.6"
261 |
262 | [package.extras]
263 | testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"]
264 |
265 | [[package]]
266 | name = "regex"
267 | version = "2021.11.10"
268 | description = "Alternative regular expression module, to replace re."
269 | category = "dev"
270 | optional = false
271 | python-versions = "*"
272 |
273 | [[package]]
274 | name = "toml"
275 | version = "0.10.2"
276 | description = "Python Library for Tom's Obvious, Minimal Language"
277 | category = "main"
278 | optional = false
279 | python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
280 |
281 | [[package]]
282 | name = "tomli"
283 | version = "1.2.2"
284 | description = "A lil' TOML parser"
285 | category = "main"
286 | optional = false
287 | python-versions = ">=3.6"
288 |
289 | [[package]]
290 | name = "typing-extensions"
291 | version = "4.0.0"
292 | description = "Backported and Experimental Type Hints for Python 3.6+"
293 | category = "main"
294 | optional = false
295 | python-versions = ">=3.6"
296 |
297 | [[package]]
298 | name = "wrapt"
299 | version = "1.13.3"
300 | description = "Module for decorators, wrappers and monkey patching."
301 | category = "main"
302 | optional = false
303 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
304 |
305 | [metadata]
306 | lock-version = "1.1"
307 | python-versions = "^3.8.9"
308 | content-hash = "6fe3aba465adcbf9071e0cadb5fde26ab81e3c7eb337f1111200af27cff8e7d5"
309 |
310 | [metadata.files]
311 | astroid = [
312 | {file = "astroid-2.9.0-py3-none-any.whl", hash = "sha256:776ca0b748b4ad69c00bfe0fff38fa2d21c338e12c84aa9715ee0d473c422778"},
313 | {file = "astroid-2.9.0.tar.gz", hash = "sha256:5939cf55de24b92bda00345d4d0659d01b3c7dafb5055165c330bc7c568ba273"},
314 | ]
315 | atomicwrites = [
316 | {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"},
317 | {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"},
318 | ]
319 | attrs = [
320 | {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"},
321 | {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"},
322 | ]
323 | black = [
324 | {file = "black-21.11b1-py3-none-any.whl", hash = "sha256:802c6c30b637b28645b7fde282ed2569c0cd777dbe493a41b6a03c1d903f99ac"},
325 | {file = "black-21.11b1.tar.gz", hash = "sha256:a042adbb18b3262faad5aff4e834ff186bb893f95ba3a8013f09de1e5569def2"},
326 | ]
327 | click = [
328 | {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"},
329 | {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"},
330 | ]
331 | colorama = [
332 | {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"},
333 | {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"},
334 | ]
335 | coverage = [
336 | {file = "coverage-6.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:675adb3b3380967806b3cbb9c5b00ceb29b1c472692100a338730c1d3e59c8b9"},
337 | {file = "coverage-6.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95a58336aa111af54baa451c33266a8774780242cab3704b7698d5e514840758"},
338 | {file = "coverage-6.1.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:d0a595a781f8e186580ff8e3352dd4953b1944289bec7705377c80c7e36c4d6c"},
339 | {file = "coverage-6.1.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d3c5f49ce6af61154060640ad3b3281dbc46e2e0ef2fe78414d7f8a324f0b649"},
340 | {file = "coverage-6.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:310c40bed6b626fd1f463e5a83dba19a61c4eb74e1ac0d07d454ebbdf9047e9d"},
341 | {file = "coverage-6.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a4d48e42e17d3de212f9af44f81ab73b9378a4b2b8413fd708d0d9023f2bbde4"},
342 | {file = "coverage-6.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ffa545230ca2ad921ad066bf8fd627e7be43716b6e0fcf8e32af1b8188ccb0ab"},
343 | {file = "coverage-6.1.2-cp310-cp310-win32.whl", hash = "sha256:cd2d11a59afa5001ff28073ceca24ae4c506da4355aba30d1e7dd2bd0d2206dc"},
344 | {file = "coverage-6.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:96129e41405887a53a9cc564f960d7f853cc63d178f3a182fdd302e4cab2745b"},
345 | {file = "coverage-6.1.2-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:1de9c6f5039ee2b1860b7bad2c7bc3651fbeb9368e4c4d93e98a76358cdcb052"},
346 | {file = "coverage-6.1.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:80cb70264e9a1d04b519cdba3cd0dc42847bf8e982a4d55c769b9b0ee7cdce1e"},
347 | {file = "coverage-6.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:ba6125d4e55c0b8e913dad27b22722eac7abdcb1f3eab1bd090eee9105660266"},
348 | {file = "coverage-6.1.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8492d37acdc07a6eac6489f6c1954026f2260a85a4c2bb1e343fe3d35f5ee21a"},
349 | {file = "coverage-6.1.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:66af99c7f7b64d050d37e795baadf515b4561124f25aae6e1baa482438ecc388"},
350 | {file = "coverage-6.1.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ebcc03e1acef4ff44f37f3c61df478d6e469a573aa688e5a162f85d7e4c3860d"},
351 | {file = "coverage-6.1.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98d44a8136eebbf544ad91fef5bd2b20ef0c9b459c65a833c923d9aa4546b204"},
352 | {file = "coverage-6.1.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:c18725f3cffe96732ef96f3de1939d81215fd6d7d64900dcc4acfe514ea4fcbf"},
353 | {file = "coverage-6.1.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c8e9c4bcaaaa932be581b3d8b88b677489975f845f7714efc8cce77568b6711c"},
354 | {file = "coverage-6.1.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:06d009e8a29483cbc0520665bc46035ffe9ae0e7484a49f9782c2a716e37d0a0"},
355 | {file = "coverage-6.1.2-cp36-cp36m-win32.whl", hash = "sha256:e5432d9c329b11c27be45ee5f62cf20a33065d482c8dec1941d6670622a6fb8f"},
356 | {file = "coverage-6.1.2-cp36-cp36m-win_amd64.whl", hash = "sha256:82fdcb64bf08aa5db881db061d96db102c77397a570fbc112e21c48a4d9cb31b"},
357 | {file = "coverage-6.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:94f558f8555e79c48c422045f252ef41eb43becdd945e9c775b45ebfc0cbd78f"},
358 | {file = "coverage-6.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:046647b96969fda1ae0605f61288635209dd69dcd27ba3ec0bf5148bc157f954"},
359 | {file = "coverage-6.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cc799916b618ec9fd00135e576424165691fec4f70d7dc12cfaef09268a2478c"},
360 | {file = "coverage-6.1.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:62646d98cf0381ffda301a816d6ac6c35fc97aa81b09c4c52d66a15c4bef9d7c"},
361 | {file = "coverage-6.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:27a3df08a855522dfef8b8635f58bab81341b2fb5f447819bc252da3aa4cf44c"},
362 | {file = "coverage-6.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:610c0ba11da8de3a753dc4b1f71894f9f9debfdde6559599f303286e70aeb0c2"},
363 | {file = "coverage-6.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:35b246ae3a2c042dc8f410c94bcb9754b18179cdb81ff9477a9089dbc9ecc186"},
364 | {file = "coverage-6.1.2-cp37-cp37m-win32.whl", hash = "sha256:0cde7d9fe2fb55ff68ebe7fb319ef188e9b88e0a3d1c9c5db7dd829cd93d2193"},
365 | {file = "coverage-6.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:958ac66272ff20e63d818627216e3d7412fdf68a2d25787b89a5c6f1eb7fdd93"},
366 | {file = "coverage-6.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a300b39c3d5905686c75a369d2a66e68fd01472ea42e16b38c948bd02b29e5bd"},
367 | {file = "coverage-6.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d3855d5d26292539861f5ced2ed042fc2aa33a12f80e487053aed3bcb6ced13"},
368 | {file = "coverage-6.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:586d38dfc7da4a87f5816b203ff06dd7c1bb5b16211ccaa0e9788a8da2b93696"},
369 | {file = "coverage-6.1.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a34fccb45f7b2d890183a263578d60a392a1a218fdc12f5bce1477a6a68d4373"},
370 | {file = "coverage-6.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bc1ee1318f703bc6c971da700d74466e9b86e0c443eb85983fb2a1bd20447263"},
371 | {file = "coverage-6.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3f546f48d5d80a90a266769aa613bc0719cb3e9c2ef3529d53f463996dd15a9d"},
372 | {file = "coverage-6.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fd92ece726055e80d4e3f01fff3b91f54b18c9c357c48fcf6119e87e2461a091"},
373 | {file = "coverage-6.1.2-cp38-cp38-win32.whl", hash = "sha256:24ed38ec86754c4d5a706fbd5b52b057c3df87901a8610d7e5642a08ec07087e"},
374 | {file = "coverage-6.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:97ef6e9119bd39d60ef7b9cd5deea2b34869c9f0b9777450a7e3759c1ab09b9b"},
375 | {file = "coverage-6.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6e5a8c947a2a89c56655ecbb789458a3a8e3b0cbf4c04250331df8f647b3de59"},
376 | {file = "coverage-6.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a39590d1e6acf6a3c435c5d233f72f5d43b585f5be834cff1f21fec4afda225"},
377 | {file = "coverage-6.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9d2c2e3ce7b8cc932a2f918186964bd44de8c84e2f9ef72dc616f5bb8be22e71"},
378 | {file = "coverage-6.1.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3348865798c077c695cae00da0924136bb5cc501f236cfd6b6d9f7a3c94e0ec4"},
379 | {file = "coverage-6.1.2-cp39-cp39-win32.whl", hash = "sha256:fae3fe111670e51f1ebbc475823899524e3459ea2db2cb88279bbfb2a0b8a3de"},
380 | {file = "coverage-6.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:af45eea024c0e3a25462fade161afab4f0d9d9e0d5a5d53e86149f74f0a35ecc"},
381 | {file = "coverage-6.1.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:eab14fdd410500dae50fd14ccc332e65543e7b39f6fc076fe90603a0e5d2f929"},
382 | {file = "coverage-6.1.2.tar.gz", hash = "sha256:d9a635114b88c0ab462e0355472d00a180a5fbfd8511e7f18e4ac32652e7d972"},
383 | ]
384 | iniconfig = [
385 | {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
386 | {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
387 | ]
388 | isort = [
389 | {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"},
390 | {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"},
391 | ]
392 | jdatetime = [
393 | {file = "jdatetime-3.6.4-py3-none-any.whl", hash = "sha256:ba32f2842ee6a6162b34d09e192d9bb75f239470f310f00f931c2b2199f7c141"},
394 | {file = "jdatetime-3.6.4.tar.gz", hash = "sha256:39d0be41076b3a3850c3bfa90817e7ed459edc0e9cadce37dc7229b11f121c7e"},
395 | ]
396 | lazy-object-proxy = [
397 | {file = "lazy-object-proxy-1.6.0.tar.gz", hash = "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726"},
398 | {file = "lazy_object_proxy-1.6.0-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b"},
399 | {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win32.whl", hash = "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e"},
400 | {file = "lazy_object_proxy-1.6.0-cp27-cp27m-win_amd64.whl", hash = "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93"},
401 | {file = "lazy_object_proxy-1.6.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741"},
402 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587"},
403 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4"},
404 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win32.whl", hash = "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f"},
405 | {file = "lazy_object_proxy-1.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3"},
406 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981"},
407 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2"},
408 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win32.whl", hash = "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd"},
409 | {file = "lazy_object_proxy-1.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837"},
410 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653"},
411 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3"},
412 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-win32.whl", hash = "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8"},
413 | {file = "lazy_object_proxy-1.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf"},
414 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad"},
415 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43"},
416 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a"},
417 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-win32.whl", hash = "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61"},
418 | {file = "lazy_object_proxy-1.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b"},
419 | ]
420 | mccabe = [
421 | {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"},
422 | {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"},
423 | ]
424 | mypy-extensions = [
425 | {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
426 | {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
427 | ]
428 | packaging = [
429 | {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
430 | {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},
431 | ]
432 | pathspec = [
433 | {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"},
434 | {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"},
435 | ]
436 | platformdirs = [
437 | {file = "platformdirs-2.4.0-py3-none-any.whl", hash = "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d"},
438 | {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"},
439 | ]
440 | pluggy = [
441 | {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
442 | {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
443 | ]
444 | py = [
445 | {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
446 | {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
447 | ]
448 | pylint = [
449 | {file = "pylint-2.12.1-py3-none-any.whl", hash = "sha256:b4b5a7b6d04e914a11c198c816042af1fb2d3cda29bb0c98a9c637010da2a5c5"},
450 | {file = "pylint-2.12.1.tar.gz", hash = "sha256:4f4a52b132c05b49094b28e109febcec6bfb7bc6961c7485a5ad0a0f961df289"},
451 | ]
452 | pyparsing = [
453 | {file = "pyparsing-3.0.6-py3-none-any.whl", hash = "sha256:04ff808a5b90911829c55c4e26f75fa5ca8a2f5f36aa3a51f68e27033341d3e4"},
454 | {file = "pyparsing-3.0.6.tar.gz", hash = "sha256:d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81"},
455 | ]
456 | pytest = [
457 | {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"},
458 | {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"},
459 | ]
460 | pytest-cov = [
461 | {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"},
462 | {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"},
463 | ]
464 | regex = [
465 | {file = "regex-2021.11.10-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9345b6f7ee578bad8e475129ed40123d265464c4cfead6c261fd60fc9de00bcf"},
466 | {file = "regex-2021.11.10-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:416c5f1a188c91e3eb41e9c8787288e707f7d2ebe66e0a6563af280d9b68478f"},
467 | {file = "regex-2021.11.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0538c43565ee6e703d3a7c3bdfe4037a5209250e8502c98f20fea6f5fdf2965"},
468 | {file = "regex-2021.11.10-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ee1227cf08b6716c85504aebc49ac827eb88fcc6e51564f010f11a406c0a667"},
469 | {file = "regex-2021.11.10-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6650f16365f1924d6014d2ea770bde8555b4a39dc9576abb95e3cd1ff0263b36"},
470 | {file = "regex-2021.11.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:30ab804ea73972049b7a2a5c62d97687d69b5a60a67adca07eb73a0ddbc9e29f"},
471 | {file = "regex-2021.11.10-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:68a067c11463de2a37157930d8b153005085e42bcb7ad9ca562d77ba7d1404e0"},
472 | {file = "regex-2021.11.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:162abfd74e88001d20cb73ceaffbfe601469923e875caf9118333b1a4aaafdc4"},
473 | {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9ed0b1e5e0759d6b7f8e2f143894b2a7f3edd313f38cf44e1e15d360e11749b"},
474 | {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:473e67837f786404570eae33c3b64a4b9635ae9f00145250851a1292f484c063"},
475 | {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2fee3ed82a011184807d2127f1733b4f6b2ff6ec7151d83ef3477f3b96a13d03"},
476 | {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:d5fd67df77bab0d3f4ea1d7afca9ef15c2ee35dfb348c7b57ffb9782a6e4db6e"},
477 | {file = "regex-2021.11.10-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d408a642a5484b9b4d11dea15a489ea0928c7e410c7525cd892f4d04f2f617b"},
478 | {file = "regex-2021.11.10-cp310-cp310-win32.whl", hash = "sha256:98ba568e8ae26beb726aeea2273053c717641933836568c2a0278a84987b2a1a"},
479 | {file = "regex-2021.11.10-cp310-cp310-win_amd64.whl", hash = "sha256:780b48456a0f0ba4d390e8b5f7c661fdd218934388cde1a974010a965e200e12"},
480 | {file = "regex-2021.11.10-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:dba70f30fd81f8ce6d32ddeef37d91c8948e5d5a4c63242d16a2b2df8143aafc"},
481 | {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1f54b9b4b6c53369f40028d2dd07a8c374583417ee6ec0ea304e710a20f80a0"},
482 | {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fbb9dc00e39f3e6c0ef48edee202f9520dafb233e8b51b06b8428cfcb92abd30"},
483 | {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666abff54e474d28ff42756d94544cdfd42e2ee97065857413b72e8a2d6a6345"},
484 | {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5537f71b6d646f7f5f340562ec4c77b6e1c915f8baae822ea0b7e46c1f09b733"},
485 | {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ed2e07c6a26ed4bea91b897ee2b0835c21716d9a469a96c3e878dc5f8c55bb23"},
486 | {file = "regex-2021.11.10-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ca5f18a75e1256ce07494e245cdb146f5a9267d3c702ebf9b65c7f8bd843431e"},
487 | {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:74cbeac0451f27d4f50e6e8a8f3a52ca074b5e2da9f7b505c4201a57a8ed6286"},
488 | {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:3598893bde43091ee5ca0a6ad20f08a0435e93a69255eeb5f81b85e81e329264"},
489 | {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:50a7ddf3d131dc5633dccdb51417e2d1910d25cbcf842115a3a5893509140a3a"},
490 | {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:61600a7ca4bcf78a96a68a27c2ae9389763b5b94b63943d5158f2a377e09d29a"},
491 | {file = "regex-2021.11.10-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:563d5f9354e15e048465061509403f68424fef37d5add3064038c2511c8f5e00"},
492 | {file = "regex-2021.11.10-cp36-cp36m-win32.whl", hash = "sha256:93a5051fcf5fad72de73b96f07d30bc29665697fb8ecdfbc474f3452c78adcf4"},
493 | {file = "regex-2021.11.10-cp36-cp36m-win_amd64.whl", hash = "sha256:b483c9d00a565633c87abd0aaf27eb5016de23fed952e054ecc19ce32f6a9e7e"},
494 | {file = "regex-2021.11.10-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fff55f3ce50a3ff63ec8e2a8d3dd924f1941b250b0aac3d3d42b687eeff07a8e"},
495 | {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e32d2a2b02ccbef10145df9135751abea1f9f076e67a4e261b05f24b94219e36"},
496 | {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:53db2c6be8a2710b359bfd3d3aa17ba38f8aa72a82309a12ae99d3c0c3dcd74d"},
497 | {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2207ae4f64ad3af399e2d30dde66f0b36ae5c3129b52885f1bffc2f05ec505c8"},
498 | {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5ca078bb666c4a9d1287a379fe617a6dccd18c3e8a7e6c7e1eb8974330c626a"},
499 | {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dd33eb9bdcfbabab3459c9ee651d94c842bc8a05fabc95edf4ee0c15a072495e"},
500 | {file = "regex-2021.11.10-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:05b7d6d7e64efe309972adab77fc2af8907bb93217ec60aa9fe12a0dad35874f"},
501 | {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:42b50fa6666b0d50c30a990527127334d6b96dd969011e843e726a64011485da"},
502 | {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6e1d2cc79e8dae442b3fa4a26c5794428b98f81389af90623ffcc650ce9f6732"},
503 | {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:0416f7399e918c4b0e074a0f66e5191077ee2ca32a0f99d4c187a62beb47aa05"},
504 | {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:ce298e3d0c65bd03fa65ffcc6db0e2b578e8f626d468db64fdf8457731052942"},
505 | {file = "regex-2021.11.10-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dc07f021ee80510f3cd3af2cad5b6a3b3a10b057521d9e6aaeb621730d320c5a"},
506 | {file = "regex-2021.11.10-cp37-cp37m-win32.whl", hash = "sha256:e71255ba42567d34a13c03968736c5d39bb4a97ce98188fafb27ce981115beec"},
507 | {file = "regex-2021.11.10-cp37-cp37m-win_amd64.whl", hash = "sha256:07856afef5ffcc052e7eccf3213317fbb94e4a5cd8177a2caa69c980657b3cb4"},
508 | {file = "regex-2021.11.10-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba05430e819e58544e840a68b03b28b6d328aff2e41579037e8bab7653b37d83"},
509 | {file = "regex-2021.11.10-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7f301b11b9d214f83ddaf689181051e7f48905568b0c7017c04c06dfd065e244"},
510 | {file = "regex-2021.11.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aaa4e0705ef2b73dd8e36eeb4c868f80f8393f5f4d855e94025ce7ad8525f50"},
511 | {file = "regex-2021.11.10-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:788aef3549f1924d5c38263104dae7395bf020a42776d5ec5ea2b0d3d85d6646"},
512 | {file = "regex-2021.11.10-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f8af619e3be812a2059b212064ea7a640aff0568d972cd1b9e920837469eb3cb"},
513 | {file = "regex-2021.11.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85bfa6a5413be0ee6c5c4a663668a2cad2cbecdee367630d097d7823041bdeec"},
514 | {file = "regex-2021.11.10-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f23222527b307970e383433daec128d769ff778d9b29343fb3496472dc20dabe"},
515 | {file = "regex-2021.11.10-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:da1a90c1ddb7531b1d5ff1e171b4ee61f6345119be7351104b67ff413843fe94"},
516 | {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f5be7805e53dafe94d295399cfbe5227f39995a997f4fd8539bf3cbdc8f47ca8"},
517 | {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a955b747d620a50408b7fdf948e04359d6e762ff8a85f5775d907ceced715129"},
518 | {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:139a23d1f5d30db2cc6c7fd9c6d6497872a672db22c4ae1910be22d4f4b2068a"},
519 | {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:ca49e1ab99593438b204e00f3970e7a5f70d045267051dfa6b5f4304fcfa1dbf"},
520 | {file = "regex-2021.11.10-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:96fc32c16ea6d60d3ca7f63397bff5c75c5a562f7db6dec7d412f7c4d2e78ec0"},
521 | {file = "regex-2021.11.10-cp38-cp38-win32.whl", hash = "sha256:0617383e2fe465732af4509e61648b77cbe3aee68b6ac8c0b6fe934db90be5cc"},
522 | {file = "regex-2021.11.10-cp38-cp38-win_amd64.whl", hash = "sha256:a3feefd5e95871872673b08636f96b61ebef62971eab044f5124fb4dea39919d"},
523 | {file = "regex-2021.11.10-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f7f325be2804246a75a4f45c72d4ce80d2443ab815063cdf70ee8fb2ca59ee1b"},
524 | {file = "regex-2021.11.10-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:537ca6a3586931b16a85ac38c08cc48f10fc870a5b25e51794c74df843e9966d"},
525 | {file = "regex-2021.11.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eef2afb0fd1747f33f1ee3e209bce1ed582d1896b240ccc5e2697e3275f037c7"},
526 | {file = "regex-2021.11.10-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:432bd15d40ed835a51617521d60d0125867f7b88acf653e4ed994a1f8e4995dc"},
527 | {file = "regex-2021.11.10-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b43c2b8a330a490daaef5a47ab114935002b13b3f9dc5da56d5322ff218eeadb"},
528 | {file = "regex-2021.11.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:962b9a917dd7ceacbe5cd424556914cb0d636001e393b43dc886ba31d2a1e449"},
529 | {file = "regex-2021.11.10-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fa8c626d6441e2d04b6ee703ef2d1e17608ad44c7cb75258c09dd42bacdfc64b"},
530 | {file = "regex-2021.11.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3c5fb32cc6077abad3bbf0323067636d93307c9fa93e072771cf9a64d1c0f3ef"},
531 | {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cd410a1cbb2d297c67d8521759ab2ee3f1d66206d2e4328502a487589a2cb21b"},
532 | {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e6096b0688e6e14af6a1b10eaad86b4ff17935c49aa774eac7c95a57a4e8c296"},
533 | {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:529801a0d58809b60b3531ee804d3e3be4b412c94b5d267daa3de7fadef00f49"},
534 | {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0f594b96fe2e0821d026365f72ac7b4f0b487487fb3d4aaf10dd9d97d88a9737"},
535 | {file = "regex-2021.11.10-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2409b5c9cef7054dde93a9803156b411b677affc84fca69e908b1cb2c540025d"},
536 | {file = "regex-2021.11.10-cp39-cp39-win32.whl", hash = "sha256:3b5df18db1fccd66de15aa59c41e4f853b5df7550723d26aa6cb7f40e5d9da5a"},
537 | {file = "regex-2021.11.10-cp39-cp39-win_amd64.whl", hash = "sha256:83ee89483672b11f8952b158640d0c0ff02dc43d9cb1b70c1564b49abe92ce29"},
538 | {file = "regex-2021.11.10.tar.gz", hash = "sha256:f341ee2df0999bfdf7a95e448075effe0db212a59387de1a70690e4acb03d4c6"},
539 | ]
540 | toml = [
541 | {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"},
542 | {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"},
543 | ]
544 | tomli = [
545 | {file = "tomli-1.2.2-py3-none-any.whl", hash = "sha256:f04066f68f5554911363063a30b108d2b5a5b1a010aa8b6132af78489fe3aade"},
546 | {file = "tomli-1.2.2.tar.gz", hash = "sha256:c6ce0015eb38820eaf32b5db832dbc26deb3dd427bd5f6556cf0acac2c214fee"},
547 | ]
548 | typing-extensions = [
549 | {file = "typing_extensions-4.0.0-py3-none-any.whl", hash = "sha256:829704698b22e13ec9eaf959122315eabb370b0884400e9818334d8b677023d9"},
550 | {file = "typing_extensions-4.0.0.tar.gz", hash = "sha256:2cdf80e4e04866a9b3689a51869016d36db0814d84b8d8a568d22781d45d27ed"},
551 | ]
552 | wrapt = [
553 | {file = "wrapt-1.13.3-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:e05e60ff3b2b0342153be4d1b597bbcfd8330890056b9619f4ad6b8d5c96a81a"},
554 | {file = "wrapt-1.13.3-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:85148f4225287b6a0665eef08a178c15097366d46b210574a658c1ff5b377489"},
555 | {file = "wrapt-1.13.3-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2dded5496e8f1592ec27079b28b6ad2a1ef0b9296d270f77b8e4a3a796cf6909"},
556 | {file = "wrapt-1.13.3-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:e94b7d9deaa4cc7bac9198a58a7240aaf87fe56c6277ee25fa5b3aa1edebd229"},
557 | {file = "wrapt-1.13.3-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:498e6217523111d07cd67e87a791f5e9ee769f9241fcf8a379696e25806965af"},
558 | {file = "wrapt-1.13.3-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ec7e20258ecc5174029a0f391e1b948bf2906cd64c198a9b8b281b811cbc04de"},
559 | {file = "wrapt-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:87883690cae293541e08ba2da22cacaae0a092e0ed56bbba8d018cc486fbafbb"},
560 | {file = "wrapt-1.13.3-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:f99c0489258086308aad4ae57da9e8ecf9e1f3f30fa35d5e170b4d4896554d80"},
561 | {file = "wrapt-1.13.3-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6a03d9917aee887690aa3f1747ce634e610f6db6f6b332b35c2dd89412912bca"},
562 | {file = "wrapt-1.13.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:936503cb0a6ed28dbfa87e8fcd0a56458822144e9d11a49ccee6d9a8adb2ac44"},
563 | {file = "wrapt-1.13.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f9c51d9af9abb899bd34ace878fbec8bf357b3194a10c4e8e0a25512826ef056"},
564 | {file = "wrapt-1.13.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:220a869982ea9023e163ba915077816ca439489de6d2c09089b219f4e11b6785"},
565 | {file = "wrapt-1.13.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0877fe981fd76b183711d767500e6b3111378ed2043c145e21816ee589d91096"},
566 | {file = "wrapt-1.13.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:43e69ffe47e3609a6aec0fe723001c60c65305784d964f5007d5b4fb1bc6bf33"},
567 | {file = "wrapt-1.13.3-cp310-cp310-win32.whl", hash = "sha256:78dea98c81915bbf510eb6a3c9c24915e4660302937b9ae05a0947164248020f"},
568 | {file = "wrapt-1.13.3-cp310-cp310-win_amd64.whl", hash = "sha256:ea3e746e29d4000cd98d572f3ee2a6050a4f784bb536f4ac1f035987fc1ed83e"},
569 | {file = "wrapt-1.13.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:8c73c1a2ec7c98d7eaded149f6d225a692caa1bd7b2401a14125446e9e90410d"},
570 | {file = "wrapt-1.13.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:086218a72ec7d986a3eddb7707c8c4526d677c7b35e355875a0fe2918b059179"},
571 | {file = "wrapt-1.13.3-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:e92d0d4fa68ea0c02d39f1e2f9cb5bc4b4a71e8c442207433d8db47ee79d7aa3"},
572 | {file = "wrapt-1.13.3-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:d4a5f6146cfa5c7ba0134249665acd322a70d1ea61732723c7d3e8cc0fa80755"},
573 | {file = "wrapt-1.13.3-cp35-cp35m-win32.whl", hash = "sha256:8aab36778fa9bba1a8f06a4919556f9f8c7b33102bd71b3ab307bb3fecb21851"},
574 | {file = "wrapt-1.13.3-cp35-cp35m-win_amd64.whl", hash = "sha256:944b180f61f5e36c0634d3202ba8509b986b5fbaf57db3e94df11abee244ba13"},
575 | {file = "wrapt-1.13.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:2ebdde19cd3c8cdf8df3fc165bc7827334bc4e353465048b36f7deeae8ee0918"},
576 | {file = "wrapt-1.13.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:610f5f83dd1e0ad40254c306f4764fcdc846641f120c3cf424ff57a19d5f7ade"},
577 | {file = "wrapt-1.13.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5601f44a0f38fed36cc07db004f0eedeaadbdcec90e4e90509480e7e6060a5bc"},
578 | {file = "wrapt-1.13.3-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:e6906d6f48437dfd80464f7d7af1740eadc572b9f7a4301e7dd3d65db285cacf"},
579 | {file = "wrapt-1.13.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:766b32c762e07e26f50d8a3468e3b4228b3736c805018e4b0ec8cc01ecd88125"},
580 | {file = "wrapt-1.13.3-cp36-cp36m-win32.whl", hash = "sha256:5f223101f21cfd41deec8ce3889dc59f88a59b409db028c469c9b20cfeefbe36"},
581 | {file = "wrapt-1.13.3-cp36-cp36m-win_amd64.whl", hash = "sha256:f122ccd12fdc69628786d0c947bdd9cb2733be8f800d88b5a37c57f1f1d73c10"},
582 | {file = "wrapt-1.13.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:46f7f3af321a573fc0c3586612db4decb7eb37172af1bc6173d81f5b66c2e068"},
583 | {file = "wrapt-1.13.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:778fd096ee96890c10ce96187c76b3e99b2da44e08c9e24d5652f356873f6709"},
584 | {file = "wrapt-1.13.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0cb23d36ed03bf46b894cfec777eec754146d68429c30431c99ef28482b5c1df"},
585 | {file = "wrapt-1.13.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:96b81ae75591a795d8c90edc0bfaab44d3d41ffc1aae4d994c5aa21d9b8e19a2"},
586 | {file = "wrapt-1.13.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7dd215e4e8514004c8d810a73e342c536547038fb130205ec4bba9f5de35d45b"},
587 | {file = "wrapt-1.13.3-cp37-cp37m-win32.whl", hash = "sha256:47f0a183743e7f71f29e4e21574ad3fa95676136f45b91afcf83f6a050914829"},
588 | {file = "wrapt-1.13.3-cp37-cp37m-win_amd64.whl", hash = "sha256:fd76c47f20984b43d93de9a82011bb6e5f8325df6c9ed4d8310029a55fa361ea"},
589 | {file = "wrapt-1.13.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b73d4b78807bd299b38e4598b8e7bd34ed55d480160d2e7fdaabd9931afa65f9"},
590 | {file = "wrapt-1.13.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ec9465dd69d5657b5d2fa6133b3e1e989ae27d29471a672416fd729b429eb554"},
591 | {file = "wrapt-1.13.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:dd91006848eb55af2159375134d724032a2d1d13bcc6f81cd8d3ed9f2b8e846c"},
592 | {file = "wrapt-1.13.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ae9de71eb60940e58207f8e71fe113c639da42adb02fb2bcbcaccc1ccecd092b"},
593 | {file = "wrapt-1.13.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:51799ca950cfee9396a87f4a1240622ac38973b6df5ef7a41e7f0b98797099ce"},
594 | {file = "wrapt-1.13.3-cp38-cp38-win32.whl", hash = "sha256:4b9c458732450ec42578b5642ac53e312092acf8c0bfce140ada5ca1ac556f79"},
595 | {file = "wrapt-1.13.3-cp38-cp38-win_amd64.whl", hash = "sha256:7dde79d007cd6dfa65afe404766057c2409316135cb892be4b1c768e3f3a11cb"},
596 | {file = "wrapt-1.13.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:981da26722bebb9247a0601e2922cedf8bb7a600e89c852d063313102de6f2cb"},
597 | {file = "wrapt-1.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:705e2af1f7be4707e49ced9153f8d72131090e52be9278b5dbb1498c749a1e32"},
598 | {file = "wrapt-1.13.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:25b1b1d5df495d82be1c9d2fad408f7ce5ca8a38085e2da41bb63c914baadff7"},
599 | {file = "wrapt-1.13.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:77416e6b17926d953b5c666a3cb718d5945df63ecf922af0ee576206d7033b5e"},
600 | {file = "wrapt-1.13.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:865c0b50003616f05858b22174c40ffc27a38e67359fa1495605f96125f76640"},
601 | {file = "wrapt-1.13.3-cp39-cp39-win32.whl", hash = "sha256:0a017a667d1f7411816e4bf214646d0ad5b1da2c1ea13dec6c162736ff25a374"},
602 | {file = "wrapt-1.13.3-cp39-cp39-win_amd64.whl", hash = "sha256:81bd7c90d28a4b2e1df135bfbd7c23aee3050078ca6441bead44c42483f9ebfb"},
603 | {file = "wrapt-1.13.3.tar.gz", hash = "sha256:1fea9cd438686e6682271d36f3481a9f3636195578bab9ca3382e2f5f01fc185"},
604 | ]
605 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "jalali_pandas"
3 | version = "0.2.2"
4 | description = "A Pandas extension to make work with Jalali Date easier."
5 | authors = ["Mehdi Ghodsizadeh "]
6 | license = "GPL-3.0-only"
7 | readme = "README.md"
8 | homepage = "https://ghodsizadeh.github.io/jalali-pandas/"
9 | repository = "https://github.com/ghodsizadeh/jalali-pandas"
10 |
11 | [tool.poetry.dependencies]
12 | python = "^3.6"
13 | jdatetime = "^3.6.4"
14 |
15 | [tool.poetry.urls]
16 | "Bug Tracker" = "https://github.com/ghodsizadeh/jalali-pandas/issues"
17 |
18 | [build-system]
19 | requires = ["poetry-core>=1.0.0"]
20 | build-backend = "poetry.core.masonry.api"
21 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | astroid==2.8.4
2 | backports.entry-points-selectable==1.1.1
3 | black==21.10b0
4 | cfgv==3.3.1
5 | click==8.0.3
6 | distlib==0.3.3
7 | filelock==3.3.2
8 | identify==2.3.5
9 | isort==5.10.1
10 | jdatetime
11 | lazy-object-proxy==1.6.0
12 | mccabe==0.6.1
13 | mypy-extensions==0.4.3
14 | nodeenv==1.6.0
15 | pathspec==0.9.0
16 | platformdirs==2.4.0
17 | pre-commit==2.15.0
18 | pylint==2.11.1
19 | pandas
20 | PyYAML==6.0
21 | regex==2021.11.10
22 | six==1.16.0
23 | toml==0.10.2
24 | tomli==1.2.2
25 | typing-extensions==3.10.0.2
26 | virtualenv==20.10.0
27 | wrapt==1.13.3
28 |
--------------------------------------------------------------------------------
/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ghodsizadeh/jalali-pandas/ce480829a3c50a53cb2a17c94e5a49648d18ca42/tests/__init__.py
--------------------------------------------------------------------------------
/tests/df_test.py:
--------------------------------------------------------------------------------
1 | """Test Series class
2 | """
3 | import pandas as pd
4 | import pytest
5 | from jalali_pandas import ( # pylint: disable=W0611
6 | JalaliSerieAccessor,
7 | JalaliDataframeAccessor,
8 | )
9 |
10 |
11 | class TestJalaliDataFrame:
12 | """Test Cases for JalaliSerieAccessor"""
13 |
14 | @property
15 | def df(self) -> pd.DataFrame:
16 | """get test dataframe
17 |
18 | Returns:
19 | pd.DataFrame: test dataframe
20 | """
21 | df = pd.DataFrame(
22 | {
23 | "date": pd.date_range("2019-01-01", periods=10, freq="M"),
24 | "value": range(10),
25 | }
26 | )
27 | df["jdate"] = df["date"].jalali.to_jalali()
28 | return df
29 |
30 | def test_jalali_groupby(self):
31 | """Test jalali property like year, month, weeknumber"""
32 | df = self.df
33 | mean = df.jalali.groupby("year").mean()
34 | assert (mean.index == [1397, 1398]).all(), "Year grouping is wrong"
35 | mean = df.jalali.groupby("month").mean()
36 | assert not set(mean.index).difference(
37 | {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
38 | ), "computaion is wrong"
39 |
40 | def test_jalali_groupby_shorts(self):
41 | """Test jalali property like ymd, ym, yq, md"""
42 | df = self.df
43 | mean = df.jalali.groupby("ymd").mean()
44 | assert mean.index.names == [
45 | "__year",
46 | "__month",
47 | "__day",
48 | ], "ymd grouping is wrong"
49 | mean = df.jalali.groupby("ym").mean()
50 | assert mean.index.names == ["__year", "__month"], "ym grouping is wrong"
51 | mean = df.jalali.groupby("yq").mean()
52 | assert mean.index.names == ["__year", "__quarter"], "yq grouping is wrong"
53 | mean = df.jalali.groupby("md").mean()
54 | assert mean.index.names == ["__month", "__day"], "md grouping is wrong"
55 |
56 | def test_check_wrong_groupby(self):
57 | """Test check_df"""
58 | df = self.df
59 | # check it raise Value Error
60 | with pytest.raises(ValueError):
61 | df.jalali.groupby("wrong")
62 |
63 | def test_not_implemeneted_resampling(self):
64 | """Test implemented resampling"""
65 | df = self.df
66 | with pytest.raises(NotImplementedError):
67 | df.jalali.resample("D").mean()
68 |
69 | def test_validation(self):
70 | """Test validation"""
71 | df = self.df.copy()
72 | del df["jdate"]
73 | with pytest.raises(ValueError):
74 | df.jalali # pylint: disable=W0104
75 |
--------------------------------------------------------------------------------
/tests/series_test.py:
--------------------------------------------------------------------------------
1 | """Test Series class
2 | """
3 | import jdatetime
4 | import pandas as pd
5 | import pytest
6 | from jalali_pandas import ( # pylint: disable=W0611
7 | JalaliDataframeAccessor,
8 | JalaliSerieAccessor,
9 | )
10 |
11 |
12 | class TestJalaliSerie:
13 | """Test Cases for JalaliSerieAccessor"""
14 |
15 | @property
16 | def df(self) -> pd.DataFrame:
17 | """get test dataframe
18 |
19 | Returns:
20 | pd.DataFrame: test dataframe
21 | """
22 | df = pd.DataFrame({"date": pd.date_range("2019-01-01", periods=10, freq="D")})
23 | df["jdate"] = df["date"].jalali.to_jalali()
24 | return df
25 |
26 | def test_jalali_convertor(self):
27 | """Test jalali convertor from gregorian to jalali"""
28 | df = self.df
29 | assert df["jdate"].iloc[0] == jdatetime.datetime(year=1397, month=10, day=11)
30 | assert df["date"].iloc[0] == pd.Timestamp("2019-01-01")
31 |
32 | def test_gregorian_convertor(self):
33 | """Test jalali convertor from jalali to gregorian"""
34 |
35 | df = self.df
36 | df["gdate"] = df["jdate"].jalali.to_gregorian()
37 | date = df["gdate"].iloc[0]
38 | assert date.year == 2019, "year is not 2019"
39 | assert date.month == 1, "month is not 1"
40 | assert date.day == 1, "day is not 1"
41 |
42 | def test_on_not_jdatetime(self):
43 | """Test jalali raise error on wrong columns"""
44 | df = self.df
45 | with pytest.raises(TypeError):
46 | df["date"].jalali.year # pylint: disable=W0104
47 |
48 | def test_jalali_property(self):
49 | """Test jalali property like year, month, weeknumber"""
50 | df = self.df
51 | assert df["jdate"].jalali.year[0] == 1397, "year is not 1397"
52 | assert df["jdate"].jalali.month[0] == 10, "month is not 10"
53 | assert df["jdate"].jalali.day[0] == 11, "day is not 11"
54 | assert df["jdate"].jalali.hour[0] == 0, "hour is not 0"
55 | assert df["jdate"].jalali.minute[0] == 0, "minute is not 0"
56 | assert df["jdate"].jalali.second[0] == 0, "second is not 0"
57 | assert df["jdate"].jalali.weekday[0] == 3, "weekday is not 4"
58 | assert df["jdate"].jalali.weeknumber[0] == 42, "weeknumber is not 42"
59 | assert df["jdate"].jalali.quarter[0] == 4, "quarter is not 4"
60 |
61 |
62 | def test_jalali_strptime():
63 | """Test jalali convertor from str to jalali"""
64 | df = pd.DataFrame({"date": ["1399/08/02", "1399/08/03", "1399/08/04"]})
65 | df["jdate"] = df["date"].jalali.parse_jalali("%Y/%m/%d")
66 | date = df["jdate"].iloc[0]
67 | assert date.year == 1399, "year is not 1399"
68 | assert date.month == 8, "month is not 8"
69 | assert date.day == 2, "day is not 2"
70 |
--------------------------------------------------------------------------------