matrix-utils 0.4__tar.gz → 0.4.2__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.
Files changed (72) hide show
  1. matrix_utils-0.4.2/.gitignore +104 -0
  2. matrix_utils-0.4.2/.pre-commit-config.yaml +53 -0
  3. {matrix_utils-0.4 → matrix_utils-0.4.2}/CHANGELOG.md +10 -0
  4. {matrix_utils-0.4 → matrix_utils-0.4.2}/PKG-INFO +2 -1
  5. matrix_utils-0.4.2/binder/Brightway 2.5 demonstration.ipynb +615 -0
  6. matrix_utils-0.4.2/binder/environment.yml +33 -0
  7. matrix_utils-0.4.2/dev/Brightway 2.5 - Linking with IAMs.ipynb +741 -0
  8. matrix_utils-0.4.2/dev/Brightway 2.5 demonstration.ipynb +648 -0
  9. matrix_utils-0.4.2/dev/Graph traversal with modification.ipynb +893 -0
  10. matrix_utils-0.4.2/dev/Indexing speed tests.ipynb +235 -0
  11. matrix_utils-0.4.2/dev/Interfaces which produce results for multiple matrices.ipynb +506 -0
  12. matrix_utils-0.4.2/dev/Mapping speed tests.ipynb +312 -0
  13. matrix_utils-0.4.2/dev/Multifunctionality with Brightway 2.5.ipynb +555 -0
  14. matrix_utils-0.4.2/dev/Real-time modification of hybrid databases.ipynb +543 -0
  15. matrix_utils-0.4.2/dev/Supply chain modification.ipynb +562 -0
  16. matrix_utils-0.4.2/dev/Untitled.ipynb +32 -0
  17. matrix_utils-0.4.2/dev/profiling/bw2.prof +0 -0
  18. matrix_utils-0.4.2/dev/profiling/bw2.svg +9638 -0
  19. matrix_utils-0.4.2/dev/profiling/bw25.prof +0 -0
  20. matrix_utils-0.4.2/dev/profiling/bw25.svg +9948 -0
  21. matrix_utils-0.4.2/dev/profiling/bw25_profile.txt +6310 -0
  22. matrix_utils-0.4.2/dev/profiling/bw25_profiling.py +12 -0
  23. matrix_utils-0.4.2/dev/profiling/bw2_profile.txt +5014 -0
  24. matrix_utils-0.4.2/dev/profiling/bw2_profiling.py +10 -0
  25. matrix_utils-0.4.2/dev/profiling/profiling-versus-bw2.py +55 -0
  26. matrix_utils-0.4.2/dev/speed_test_unique_indices.py +7 -0
  27. matrix_utils-0.4.2/dev/speed_tests.py +113 -0
  28. matrix_utils-0.4.2/docs/Makefile +20 -0
  29. matrix_utils-0.4.2/docs/conf.py +57 -0
  30. matrix_utils-0.4.2/docs/index.rst +19 -0
  31. matrix_utils-0.4.2/docs/loading.rst +4 -0
  32. matrix_utils-0.4.2/docs/make.bat +35 -0
  33. matrix_utils-0.4.2/docs/saving.rst +11 -0
  34. matrix_utils-0.4.2/docs/utilities.rst +35 -0
  35. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/__init__.py +1 -1
  36. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/aggregation.py +5 -6
  37. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/array_mapper.py +2 -4
  38. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/indexers.py +1 -1
  39. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/mapped_matrix.py +7 -21
  40. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/mapped_matrix_dict.py +11 -5
  41. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/resource_group.py +14 -17
  42. matrix_utils-0.4.2/matrix_utils/utils.py +64 -0
  43. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils.egg-info/PKG-INFO +3 -2
  44. matrix_utils-0.4.2/matrix_utils.egg-info/SOURCES.txt +68 -0
  45. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils.egg-info/requires.txt +1 -0
  46. {matrix_utils-0.4 → matrix_utils-0.4.2}/pyproject.toml +1 -0
  47. matrix_utils-0.4.2/tests/array_mapper.py +72 -0
  48. matrix_utils-0.4.2/tests/fixtures/__init__.py +1 -0
  49. matrix_utils-0.4.2/tests/fixtures/a-first.zip +0 -0
  50. matrix_utils-0.4.2/tests/fixtures/b-second.zip +0 -0
  51. matrix_utils-0.4.2/tests/fixtures/basic.py +65 -0
  52. matrix_utils-0.4.2/tests/fixtures/create_static_fixtures.py +192 -0
  53. matrix_utils-0.4.2/tests/fixtures/sa-1.zip +0 -0
  54. matrix_utils-0.4.2/tests/fixtures/sa-2.zip +0 -0
  55. matrix_utils-0.4.2/tests/indexers.py +115 -0
  56. matrix_utils-0.4.2/tests/integration.py +166 -0
  57. matrix_utils-0.4.2/tests/interfaces.py +16 -0
  58. matrix_utils-0.4.2/tests/mapped_matrix.py +837 -0
  59. matrix_utils-0.4.2/tests/masking.py +271 -0
  60. matrix_utils-0.4.2/tests/monte_carlo.py +245 -0
  61. matrix_utils-0.4.2/tests/ordering.py +32 -0
  62. matrix_utils-0.4.2/tests/utils.py +105 -0
  63. matrix_utils-0.4/matrix_utils/utils.py +0 -57
  64. matrix_utils-0.4/matrix_utils.egg-info/SOURCES.txt +0 -20
  65. {matrix_utils-0.4 → matrix_utils-0.4.2}/CODE_OF_CONDUCT.md +0 -0
  66. {matrix_utils-0.4 → matrix_utils-0.4.2}/LICENSE +0 -0
  67. {matrix_utils-0.4 → matrix_utils-0.4.2}/MANIFEST.in +0 -0
  68. {matrix_utils-0.4 → matrix_utils-0.4.2}/README.md +0 -0
  69. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils/errors.py +0 -0
  70. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils.egg-info/dependency_links.txt +0 -0
  71. {matrix_utils-0.4 → matrix_utils-0.4.2}/matrix_utils.egg-info/top_level.txt +0 -0
  72. {matrix_utils-0.4 → matrix_utils-0.4.2}/setup.cfg +0 -0
@@ -0,0 +1,104 @@
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
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+ db.sqlite3
58
+
59
+ # Flask stuff:
60
+ instance/
61
+ .webassets-cache
62
+
63
+ # Scrapy stuff:
64
+ .scrapy
65
+
66
+ # Sphinx documentation
67
+ docs/_build/
68
+
69
+ # PyBuilder
70
+ target/
71
+
72
+ # Jupyter Notebook
73
+ .ipynb_checkpoints
74
+
75
+ # pyenv
76
+ .python-version
77
+
78
+ # celery beat schedule file
79
+ celerybeat-schedule
80
+
81
+ # SageMath parsed files
82
+ *.sage.py
83
+
84
+ # Environments
85
+ .env
86
+ .venv
87
+ env/
88
+ venv/
89
+ ENV/
90
+ env.bak/
91
+ venv.bak/
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/
@@ -0,0 +1,53 @@
1
+ exclude: '^docs/conf.py'
2
+
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v4.4.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: check-added-large-files
9
+ - id: check-ast
10
+ - id: check-json
11
+ - id: check-merge-conflict
12
+ - id: check-xml
13
+ - id: check-yaml
14
+ - id: debug-statements
15
+ - id: end-of-file-fixer
16
+ - id: requirements-txt-fixer
17
+ - id: mixed-line-ending
18
+ args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19
+
20
+ ## If you want to avoid flake8 errors due to unused vars or imports:
21
+ # - repo: https://github.com/myint/autoflake
22
+ # rev: v1.4
23
+ # hooks:
24
+ # - id: autoflake
25
+ # args: [
26
+ # --in-place,
27
+ # --remove-all-unused-imports,
28
+ # --remove-unused-variables,
29
+ # ]
30
+
31
+ - repo: https://github.com/pycqa/isort
32
+ rev: 5.11.5
33
+ hooks:
34
+ - id: isort
35
+ args: [--settings-path=pyproject.toml]
36
+
37
+ - repo: https://github.com/psf/black
38
+ rev: 23.10.0
39
+ hooks:
40
+ - id: black
41
+ args: [--config=pyproject.toml]
42
+
43
+ # - repo: https://github.com/adamchainz/blacken-docs
44
+ # rev: 1.16.0
45
+ # hooks:
46
+ # - id: blacken-docs
47
+ # additional_dependencies: [black]
48
+
49
+ - repo: https://github.com/PyCQA/flake8
50
+ rev: 6.0.0
51
+ hooks:
52
+ - id: flake8
53
+ additional_dependencies: [Flake8-pyproject]
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ### [0.4.2] - 2024-06-04
4
+
5
+ * Fix diagonal `MappedMatrixDict` - `col_mapper` is not required
6
+ * Unroll tuples when multiplying `SparseMatrixDict`
7
+ * Switch from `fs` to `fsspec` (following `bw_processing`)
8
+
9
+ ### [0.4.1] - 2023-12-18
10
+
11
+ * Allow passing `MappedMatrix` subclass to `MappedMatrixDict`
12
+
3
13
  ## [0.4] - 2023-12-07
4
14
 
5
15
  * Add `SparseMatrixDict`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: matrix_utils
3
- Version: 0.4
3
+ Version: 0.4.2
4
4
  Summary: Tools to create matrices from data packages
5
5
  Author-email: Chris Mutel <cmutel@gmail.com>
6
6
  Maintainer-email: Chris Mutel <cmutel@gmail.com>
@@ -32,6 +32,7 @@ Requires-Dist: bw_processing
32
32
  Requires-Dist: stats_arrays
33
33
  Provides-Extra: testing
34
34
  Requires-Dist: matrix_utils; extra == "testing"
35
+ Requires-Dist: fsspec; extra == "testing"
35
36
  Requires-Dist: pytest; extra == "testing"
36
37
  Requires-Dist: pytest-cov; extra == "testing"
37
38
  Requires-Dist: python-coveralls; extra == "testing"