cogzen 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cogzen-0.0.1/.editorconfig +21 -0
- cogzen-0.0.1/.gitattributes +1 -0
- cogzen-0.0.1/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- cogzen-0.0.1/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- cogzen-0.0.1/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- cogzen-0.0.1/.github/workflows/build-main.yml +39 -0
- cogzen-0.0.1/.gitignore +108 -0
- cogzen-0.0.1/.readthedocs.yaml +29 -0
- cogzen-0.0.1/AUTHORS.rst +13 -0
- cogzen-0.0.1/CONTRIBUTING.rst +127 -0
- cogzen-0.0.1/HISTORY.rst +8 -0
- cogzen-0.0.1/LICENSE +33 -0
- cogzen-0.0.1/MANIFEST.in +17 -0
- cogzen-0.0.1/Makefile +111 -0
- cogzen-0.0.1/PKG-INFO +133 -0
- cogzen-0.0.1/README.rst +35 -0
- cogzen-0.0.1/cogzen/__init__.py +43 -0
- cogzen-0.0.1/cogzen/_version.py +21 -0
- cogzen-0.0.1/cogzen/aux_log/__init__.py +4 -0
- cogzen-0.0.1/cogzen/aux_log/aux_log.py +160 -0
- cogzen-0.0.1/cogzen/aux_pandas/__init__.py +5 -0
- cogzen-0.0.1/cogzen/aux_pandas/aux_pandas.py +104 -0
- cogzen-0.0.1/cogzen/aux_srsly/__init__.py +5 -0
- cogzen-0.0.1/cogzen/aux_srsly/aux_srsly.py +137 -0
- cogzen-0.0.1/cogzen/aux_str/__init__.py +18 -0
- cogzen-0.0.1/cogzen/aux_str/aux_str.py +236 -0
- cogzen-0.0.1/cogzen/aux_str/clean_str_mappings.py +116 -0
- cogzen-0.0.1/cogzen/aux_str/now.py +45 -0
- cogzen-0.0.1/cogzen/aux_str/regex.py +18 -0
- cogzen-0.0.1/cogzen/aux_sys/__init__.py +4 -0
- cogzen-0.0.1/cogzen/aux_sys/aux_sys.py +93 -0
- cogzen-0.0.1/cogzen/cli/.cogzen.py.~undo-tree~.zst +0 -0
- cogzen-0.0.1/cogzen/cli/.gitkeep +0 -0
- cogzen-0.0.1/cogzen/cli/cogzen.py +21 -0
- cogzen-0.0.1/cogzen/cogzen.py +4 -0
- cogzen-0.0.1/cogzen/data/.gitkeep +0 -0
- cogzen-0.0.1/cogzen/data/emacs-logo/emacs-128x128.png +0 -0
- cogzen-0.0.1/cogzen/data/emacs-logo/emacs.svg +286 -0
- cogzen-0.0.1/cogzen/tests/__init__.py +1 -0
- cogzen-0.0.1/cogzen/tests/test_cogzen.py +23 -0
- cogzen-0.0.1/cogzen.egg-info/PKG-INFO +133 -0
- cogzen-0.0.1/cogzen.egg-info/SOURCES.txt +63 -0
- cogzen-0.0.1/cogzen.egg-info/dependency_links.txt +1 -0
- cogzen-0.0.1/cogzen.egg-info/entry_points.txt +2 -0
- cogzen-0.0.1/cogzen.egg-info/not-zip-safe +1 -0
- cogzen-0.0.1/cogzen.egg-info/requires.txt +69 -0
- cogzen-0.0.1/cogzen.egg-info/top_level.txt +1 -0
- cogzen-0.0.1/docs/Makefile +19 -0
- cogzen-0.0.1/docs/requirements.txt +28 -0
- cogzen-0.0.1/docs/source/_static/.gitkeep +0 -0
- cogzen-0.0.1/docs/source/authors.rst +1 -0
- cogzen-0.0.1/docs/source/conf.py +212 -0
- cogzen-0.0.1/docs/source/contributing.rst +1 -0
- cogzen-0.0.1/docs/source/history.rst +1 -0
- cogzen-0.0.1/docs/source/index.rst +20 -0
- cogzen-0.0.1/docs/source/installation.rst +51 -0
- cogzen-0.0.1/docs/source/readme.rst +1 -0
- cogzen-0.0.1/docs/source/usage.rst +11 -0
- cogzen-0.0.1/pyproject.toml +25 -0
- cogzen-0.0.1/requirements_dev.txt +37 -0
- cogzen-0.0.1/setup.cfg +36 -0
- cogzen-0.0.1/setup.py +107 -0
- cogzen-0.0.1/tox.ini +25 -0
- cogzen-0.0.1/versioneer.py +2277 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
charset = utf-8
|
|
11
|
+
end_of_line = lf
|
|
12
|
+
|
|
13
|
+
[*.bat]
|
|
14
|
+
indent_style = tab
|
|
15
|
+
end_of_line = crlf
|
|
16
|
+
|
|
17
|
+
[LICENSE]
|
|
18
|
+
insert_final_newline = false
|
|
19
|
+
|
|
20
|
+
[Makefile]
|
|
21
|
+
indent_style = tab
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cogzen/_version.py export-subst
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: '"Something''s wrong..."'
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
*A clear description of the bug*
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Expected Behavior
|
|
17
|
+
*What did you expect to happen instead?*
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Reproduction
|
|
23
|
+
*A minimal example that exhibits the behavior.*
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Environment
|
|
29
|
+
*Any additional information about your environment*
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: '"It would be really cool if x did y..."'
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Use Case
|
|
11
|
+
*Please provide a use case to help us understand your request in context*
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Solution
|
|
17
|
+
*Please describe your ideal solution*
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Alternatives
|
|
23
|
+
*Please describe any alternatives you've considered, even if you've dismissed them*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
**Pull request recommendations:**
|
|
2
|
+
- [ ] Name your pull request _your-development-type/short-description_. Ex: _feature/read-tiff-files_
|
|
3
|
+
- [ ] Link to any relevant issue in the PR description. Ex: _Resolves [gh-12], adds tiff file format support_
|
|
4
|
+
- [ ] Provide context of changes.
|
|
5
|
+
- [ ] Provide relevant tests for your feature or bug fix.
|
|
6
|
+
- [ ] Provide or update documentation for any feature added by your pull request.
|
|
7
|
+
|
|
8
|
+
Thanks for contributing!
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: "CogZen: Build Main"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
tags:
|
|
9
|
+
- "cogzen-v[0-9]+.[0-9]+.[0-9]+"
|
|
10
|
+
pull_request:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.8"]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v3
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v4
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install flake8 pytest
|
|
29
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
30
|
+
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
|
|
31
|
+
- name: Lint with flake8
|
|
32
|
+
run: |
|
|
33
|
+
flake8 cogzen --count --verbose --show-source --statistics
|
|
34
|
+
- name: Check with black
|
|
35
|
+
run: |
|
|
36
|
+
black --check cogzen
|
|
37
|
+
- name: Test with pytest
|
|
38
|
+
run: |
|
|
39
|
+
pytest
|
cogzen-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.travis.yml
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
env/
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
*.egg-info/
|
|
27
|
+
.installed.cfg
|
|
28
|
+
*.egg
|
|
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
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
.pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
|
|
60
|
+
# Flask stuff:
|
|
61
|
+
instance/
|
|
62
|
+
.webassets-cache
|
|
63
|
+
|
|
64
|
+
# Scrapy stuff:
|
|
65
|
+
.scrapy
|
|
66
|
+
|
|
67
|
+
# Sphinx documentation
|
|
68
|
+
docs/_build/
|
|
69
|
+
|
|
70
|
+
# PyBuilder
|
|
71
|
+
target/
|
|
72
|
+
|
|
73
|
+
# Jupyter Notebook
|
|
74
|
+
.ipynb_checkpoints
|
|
75
|
+
|
|
76
|
+
# pyenv
|
|
77
|
+
.python-version
|
|
78
|
+
|
|
79
|
+
# celery beat schedule file
|
|
80
|
+
celerybeat-schedule
|
|
81
|
+
|
|
82
|
+
# SageMath parsed files
|
|
83
|
+
*.sage.py
|
|
84
|
+
|
|
85
|
+
# dotenv
|
|
86
|
+
.env
|
|
87
|
+
|
|
88
|
+
# virtualenv
|
|
89
|
+
.venv
|
|
90
|
+
venv/
|
|
91
|
+
ENV/
|
|
92
|
+
|
|
93
|
+
# Spyder project settings
|
|
94
|
+
.spyderproject
|
|
95
|
+
.spyproject
|
|
96
|
+
|
|
97
|
+
# Rope project settings
|
|
98
|
+
.ropeproject
|
|
99
|
+
|
|
100
|
+
# mkdocs documentation
|
|
101
|
+
/site
|
|
102
|
+
|
|
103
|
+
# mypy
|
|
104
|
+
.mypy_cache/
|
|
105
|
+
|
|
106
|
+
# IDE settings
|
|
107
|
+
.vscode/
|
|
108
|
+
.idea/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the version of Python and other tools you might need
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-22.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.8"
|
|
13
|
+
# You can also specify other tool versions:
|
|
14
|
+
# nodejs: "19"
|
|
15
|
+
# rust: "1.64"
|
|
16
|
+
# golang: "1.19"
|
|
17
|
+
|
|
18
|
+
# Build documentation in the docs/ directory with Sphinx
|
|
19
|
+
sphinx:
|
|
20
|
+
configuration: docs/source/conf.py
|
|
21
|
+
|
|
22
|
+
# If using Sphinx, optionally build your docs in additional formats such as PDF
|
|
23
|
+
# formats:
|
|
24
|
+
# - pdf
|
|
25
|
+
|
|
26
|
+
# Optionally declare the Python requirements required to build your docs
|
|
27
|
+
python:
|
|
28
|
+
install:
|
|
29
|
+
- requirements: docs/requirements.txt
|
cogzen-0.0.1/AUTHORS.rst
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
.. highlight:: shell
|
|
2
|
+
|
|
3
|
+
============
|
|
4
|
+
Contributing
|
|
5
|
+
============
|
|
6
|
+
|
|
7
|
+
Contributions are welcome, and they are greatly appreciated! Every little bit
|
|
8
|
+
helps, and credit will always be given.
|
|
9
|
+
|
|
10
|
+
You can contribute in many ways:
|
|
11
|
+
|
|
12
|
+
Types of Contributions
|
|
13
|
+
----------------------
|
|
14
|
+
|
|
15
|
+
Report Bugs
|
|
16
|
+
~~~~~~~~~~~
|
|
17
|
+
|
|
18
|
+
Report bugs at https://github.com/cogsys-io/cogzen/issues.
|
|
19
|
+
|
|
20
|
+
If you are reporting a bug, please include:
|
|
21
|
+
|
|
22
|
+
* Your operating system name and version.
|
|
23
|
+
* Any details about your local setup that might be helpful in troubleshooting.
|
|
24
|
+
* Detailed steps to reproduce the bug.
|
|
25
|
+
|
|
26
|
+
Fix Bugs
|
|
27
|
+
~~~~~~~~
|
|
28
|
+
|
|
29
|
+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
|
|
30
|
+
wanted" is open to whoever wants to implement it.
|
|
31
|
+
|
|
32
|
+
Implement Features
|
|
33
|
+
~~~~~~~~~~~~~~~~~~
|
|
34
|
+
|
|
35
|
+
Look through the GitHub issues for features. Anything tagged with "enhancement"
|
|
36
|
+
and "help wanted" is open to whoever wants to implement it.
|
|
37
|
+
|
|
38
|
+
Write Documentation
|
|
39
|
+
~~~~~~~~~~~~~~~~~~~
|
|
40
|
+
|
|
41
|
+
CogZen could always use more documentation, whether as part of the
|
|
42
|
+
official CogZen docs, in docstrings, or even on the web in blog posts,
|
|
43
|
+
articles, and such.
|
|
44
|
+
|
|
45
|
+
Submit Feedback
|
|
46
|
+
~~~~~~~~~~~~~~~
|
|
47
|
+
|
|
48
|
+
The best way to send feedback is to file an issue at https://github.com/cogsys-io/cogzen/issues.
|
|
49
|
+
|
|
50
|
+
If you are proposing a feature:
|
|
51
|
+
|
|
52
|
+
* Explain in detail how it would work.
|
|
53
|
+
* Keep the scope as narrow as possible, to make it easier to implement.
|
|
54
|
+
* Remember that this is a volunteer-driven project, and that contributions
|
|
55
|
+
are welcome :)
|
|
56
|
+
|
|
57
|
+
Get Started!
|
|
58
|
+
------------
|
|
59
|
+
|
|
60
|
+
Ready to contribute? Here's how to set up `cogzen` for local development.
|
|
61
|
+
|
|
62
|
+
1. Fork the `cogzen` repo on GitHub.
|
|
63
|
+
2. Clone your fork locally::
|
|
64
|
+
|
|
65
|
+
$ git clone git@github.com:your_name_here/cogzen.git
|
|
66
|
+
|
|
67
|
+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
|
|
68
|
+
|
|
69
|
+
$ mkvirtualenv cogzen
|
|
70
|
+
$ cd cogzen/
|
|
71
|
+
$ python setup.py develop
|
|
72
|
+
|
|
73
|
+
4. Create a branch for local development::
|
|
74
|
+
|
|
75
|
+
$ git checkout -b name-of-your-bugfix-or-feature
|
|
76
|
+
|
|
77
|
+
Now you can make your changes locally.
|
|
78
|
+
|
|
79
|
+
5. When you're done making changes, check that your changes pass flake8 and the
|
|
80
|
+
tests, including testing other Python versions with tox::
|
|
81
|
+
|
|
82
|
+
$ flake8 cogzen tests
|
|
83
|
+
$ python setup.py test or pytest
|
|
84
|
+
$ tox
|
|
85
|
+
|
|
86
|
+
To get flake8 and tox, just pip install them into your virtualenv.
|
|
87
|
+
|
|
88
|
+
6. Commit your changes and push your branch to GitHub::
|
|
89
|
+
|
|
90
|
+
$ git add .
|
|
91
|
+
$ git commit -m "Your detailed description of your changes."
|
|
92
|
+
$ git push origin name-of-your-bugfix-or-feature
|
|
93
|
+
|
|
94
|
+
7. Submit a pull request through the GitHub website.
|
|
95
|
+
|
|
96
|
+
Pull Request Guidelines
|
|
97
|
+
-----------------------
|
|
98
|
+
|
|
99
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
100
|
+
|
|
101
|
+
1. The pull request should include tests.
|
|
102
|
+
2. If the pull request adds functionality, the docs should be updated. Put
|
|
103
|
+
your new functionality into a function with a docstring, and add the
|
|
104
|
+
feature to the list in README.rst.
|
|
105
|
+
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
|
|
106
|
+
https://travis-ci.com/cogsys-io/cogzen/pull_requests
|
|
107
|
+
and make sure that the tests pass for all supported Python versions.
|
|
108
|
+
|
|
109
|
+
Tips
|
|
110
|
+
----
|
|
111
|
+
|
|
112
|
+
To run a subset of tests::
|
|
113
|
+
|
|
114
|
+
$ pytest tests.test_cogzen
|
|
115
|
+
|
|
116
|
+
Deploying
|
|
117
|
+
---------
|
|
118
|
+
|
|
119
|
+
A reminder for the maintainers on how to deploy.
|
|
120
|
+
Make sure all your changes are committed (including an entry in HISTORY.rst).
|
|
121
|
+
Then run::
|
|
122
|
+
|
|
123
|
+
$ bump2version patch # possible: major / minor / patch
|
|
124
|
+
$ git push
|
|
125
|
+
$ git push --tags
|
|
126
|
+
|
|
127
|
+
Travis will then deploy to PyPI if tests pass.
|
cogzen-0.0.1/HISTORY.rst
ADDED
cogzen-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
CogZen Project
|
|
5
|
+
Copyright (C) 2025 cogsys.io
|
|
6
|
+
|
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
|
8
|
+
it under the terms of the GNU General Public License as published by
|
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
(at your option) any later version.
|
|
11
|
+
|
|
12
|
+
This program is distributed in the hope that it will be useful,
|
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
GNU General Public License for more details.
|
|
16
|
+
|
|
17
|
+
You should have received a copy of the GNU General Public License
|
|
18
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
|
|
20
|
+
Also add information on how to contact you by electronic and paper mail.
|
|
21
|
+
|
|
22
|
+
You should also get your employer (if you work as a programmer) or school,
|
|
23
|
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
24
|
+
For more information on this, and how to apply and follow the GNU GPL, see
|
|
25
|
+
<http://www.gnu.org/licenses/>.
|
|
26
|
+
|
|
27
|
+
The GNU General Public License does not permit incorporating your program
|
|
28
|
+
into proprietary programs. If your program is a subroutine library, you
|
|
29
|
+
may consider it more useful to permit linking proprietary applications with
|
|
30
|
+
the library. If this is what you want to do, use the GNU Lesser General
|
|
31
|
+
Public License instead of this License. But first, please read
|
|
32
|
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
33
|
+
|
cogzen-0.0.1/MANIFEST.in
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
include AUTHORS.rst
|
|
2
|
+
include CONTRIBUTING.rst
|
|
3
|
+
include HISTORY.rst
|
|
4
|
+
include LICENSE
|
|
5
|
+
include README.rst
|
|
6
|
+
|
|
7
|
+
include versioneer.py
|
|
8
|
+
include cogzen/_version.py
|
|
9
|
+
|
|
10
|
+
recursive-include tests *
|
|
11
|
+
recursive-exclude * __pycache__
|
|
12
|
+
recursive-exclude * *.py[co]
|
|
13
|
+
|
|
14
|
+
recursive-include docs *.rst conf.py Makefile make.bat
|
|
15
|
+
recursive-include docs *.svg *.jpg *.jpeg *.png *.gif *.pdf
|
|
16
|
+
|
|
17
|
+
graft cogzen/data
|
cogzen-0.0.1/Makefile
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.PHONY: clean clean-build clean-pyc clean-test coverage dist docs help install lint lint/flake8 lint/black
|
|
2
|
+
.DEFAULT_GOAL := help
|
|
3
|
+
|
|
4
|
+
define BROWSER_PYSCRIPT
|
|
5
|
+
import os, webbrowser, sys
|
|
6
|
+
|
|
7
|
+
from urllib.request import pathname2url
|
|
8
|
+
|
|
9
|
+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
|
|
10
|
+
endef
|
|
11
|
+
export BROWSER_PYSCRIPT
|
|
12
|
+
|
|
13
|
+
define PRINT_HELP_PYSCRIPT
|
|
14
|
+
import re, sys
|
|
15
|
+
from blessed import Terminal
|
|
16
|
+
term = Terminal()
|
|
17
|
+
|
|
18
|
+
for line in sys.stdin:
|
|
19
|
+
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
|
|
20
|
+
if match:
|
|
21
|
+
target, help = match.groups()
|
|
22
|
+
print(f"{term.bold_bright_blue}{target:20s}{term.normal} {help}")
|
|
23
|
+
endef
|
|
24
|
+
export PRINT_HELP_PYSCRIPT
|
|
25
|
+
|
|
26
|
+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
|
|
27
|
+
|
|
28
|
+
help:
|
|
29
|
+
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
|
|
30
|
+
|
|
31
|
+
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
|
|
32
|
+
|
|
33
|
+
clean-build: ## remove build artifacts
|
|
34
|
+
rm -fr build/
|
|
35
|
+
rm -fr dist/
|
|
36
|
+
rm -fr .eggs/
|
|
37
|
+
find . -name '*.egg-info' -exec rm -fr {} +
|
|
38
|
+
find . -name '*.egg' -exec rm -f {} +
|
|
39
|
+
|
|
40
|
+
clean-pyc: ## remove Python file artifacts
|
|
41
|
+
find . -name '*.pyc' -exec rm -f {} +
|
|
42
|
+
find . -name '*.pyo' -exec rm -f {} +
|
|
43
|
+
find . -name '*~' -exec rm -f {} +
|
|
44
|
+
find . -name '__pycache__' -exec rm -fr {} +
|
|
45
|
+
|
|
46
|
+
clean-test: ## remove test and coverage artifacts
|
|
47
|
+
rm -fr .tox/
|
|
48
|
+
rm -f .coverage
|
|
49
|
+
rm -fr htmlcov/
|
|
50
|
+
rm -fr .pytest_cache
|
|
51
|
+
|
|
52
|
+
clean-docs: ## clean docs
|
|
53
|
+
rm -fv docs/source/cogzen.rst
|
|
54
|
+
rm -fv docs/source/cogzen*.rst
|
|
55
|
+
rm -fv docs/source/modules.rst
|
|
56
|
+
|
|
57
|
+
lint-flake8: ## check style with flake8
|
|
58
|
+
flake8 cogzen cogzen/tests --exit-zero --count --statistics
|
|
59
|
+
lint-black: ## check style with black
|
|
60
|
+
black --check cogzen cogzen/tests || true
|
|
61
|
+
|
|
62
|
+
lint: lint-flake8 lint-black ## check style
|
|
63
|
+
|
|
64
|
+
test: ## run tests quickly with the default Python
|
|
65
|
+
pytest -W "ignore::DeprecationWarning" -v
|
|
66
|
+
|
|
67
|
+
test-all: ## run tests on every Python version with tox
|
|
68
|
+
tox
|
|
69
|
+
|
|
70
|
+
coverage: ## check code coverage quickly with the default Python
|
|
71
|
+
coverage run --source cogzen -m pytest
|
|
72
|
+
coverage report -m
|
|
73
|
+
coverage html
|
|
74
|
+
$(BROWSER) htmlcov/index.html
|
|
75
|
+
|
|
76
|
+
docs: clean-docs ## generate Sphinx HTML documentation, including API docs
|
|
77
|
+
sphinx-apidoc -o docs/source/ cogzen
|
|
78
|
+
$(MAKE) -C docs clean
|
|
79
|
+
$(MAKE) -C docs html
|
|
80
|
+
$(BROWSER) docs/build/html/index.html
|
|
81
|
+
|
|
82
|
+
servedocs: docs ## compile the docs watching for changes
|
|
83
|
+
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
|
|
84
|
+
|
|
85
|
+
dist: clean ## builds source and wheel package
|
|
86
|
+
# python setup.py sdist
|
|
87
|
+
# python setup.py bdist_wheel
|
|
88
|
+
python -m build
|
|
89
|
+
ls -l dist
|
|
90
|
+
|
|
91
|
+
build: dist ## builds source and wheel package (same as dist)
|
|
92
|
+
|
|
93
|
+
check: dist ## check package (twine)
|
|
94
|
+
twine check dist/*
|
|
95
|
+
|
|
96
|
+
install: clean ## install the package to the active Python's site-packages
|
|
97
|
+
# python setup.py install
|
|
98
|
+
pip install .
|
|
99
|
+
|
|
100
|
+
install-editable: clean ## install the package in editable mode
|
|
101
|
+
pip install --editable .
|
|
102
|
+
|
|
103
|
+
prep: clean lint test docs dist check install-editable
|
|
104
|
+
|
|
105
|
+
release: dist ## package and upload a release
|
|
106
|
+
twine upload dist/*
|
|
107
|
+
|
|
108
|
+
version-check: ## display git versioning tags and the actual current version from versioneer
|
|
109
|
+
@git tag | grep "cogzen-v" | sed -e "s|cogzen-v||g"
|
|
110
|
+
@echo "----------------"
|
|
111
|
+
@python -c "import cogzen; print(cogzen.__version__+' [← current]')"
|