merakisync 0.1.6__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 (84) hide show
  1. merakisync-0.1.6/.github/workflows/release.yml +102 -0
  2. merakisync-0.1.6/.gitignore +217 -0
  3. merakisync-0.1.6/CLAUDE.md +437 -0
  4. merakisync-0.1.6/LICENSE.txt +18 -0
  5. merakisync-0.1.6/PKG-INFO +527 -0
  6. merakisync-0.1.6/README.md +501 -0
  7. merakisync-0.1.6/REVIEW.md +280 -0
  8. merakisync-0.1.6/TODO.md +196 -0
  9. merakisync-0.1.6/alembic.ini +38 -0
  10. merakisync-0.1.6/docs/adding-a-model.md +456 -0
  11. merakisync-0.1.6/docs/architecture.md +188 -0
  12. merakisync-0.1.6/docs/migrations.md +277 -0
  13. merakisync-0.1.6/docs/testing.md +282 -0
  14. merakisync-0.1.6/docs/troubleshooting.md +300 -0
  15. merakisync-0.1.6/install.sh +235 -0
  16. merakisync-0.1.6/merakisync.spec +98 -0
  17. merakisync-0.1.6/pyproject.toml +80 -0
  18. merakisync-0.1.6/src/merakisync/__about__.py +4 -0
  19. merakisync-0.1.6/src/merakisync/__init__.py +60 -0
  20. merakisync-0.1.6/src/merakisync/cli/__init__.py +0 -0
  21. merakisync-0.1.6/src/merakisync/cli/cli.py +196 -0
  22. merakisync-0.1.6/src/merakisync/cli/cmd_init.py +120 -0
  23. merakisync-0.1.6/src/merakisync/cli/cmd_migrate.py +59 -0
  24. merakisync-0.1.6/src/merakisync/cli/cmd_sync.py +167 -0
  25. merakisync-0.1.6/src/merakisync/cli/cmd_update.py +60 -0
  26. merakisync-0.1.6/src/merakisync/config.py +220 -0
  27. merakisync-0.1.6/src/merakisync/dashboard.py +73 -0
  28. merakisync-0.1.6/src/merakisync/database.py +84 -0
  29. merakisync-0.1.6/src/merakisync/exceptions.py +21 -0
  30. merakisync-0.1.6/src/merakisync/logging.py +48 -0
  31. merakisync-0.1.6/src/merakisync/migrations/env.py +66 -0
  32. merakisync-0.1.6/src/merakisync/migrations/script.py.mako +28 -0
  33. merakisync-0.1.6/src/merakisync/migrations/versions/0001_initial_schema.py +321 -0
  34. merakisync-0.1.6/src/merakisync/migrations/versions/0002_add_vlan.py +61 -0
  35. merakisync-0.1.6/src/merakisync/migrations/versions/0003_reconcile_production_schema.py +257 -0
  36. merakisync-0.1.6/src/merakisync/migrations/versions/0004_add_ssid.py +72 -0
  37. merakisync-0.1.6/src/merakisync/migrations/versions/0005_drop_switchport_perdevice_fields.py +56 -0
  38. merakisync-0.1.6/src/merakisync/migrations/versions/0006_drop_switchport_legacy_columns.py +59 -0
  39. merakisync-0.1.6/src/merakisync/migrations/versions/0007_add_uplink_provider.py +29 -0
  40. merakisync-0.1.6/src/merakisync/migrations/versions/0008_add_ssid_psk.py +31 -0
  41. merakisync-0.1.6/src/merakisync/migrations/versions/0009_jsonb_tags_product_types.py +58 -0
  42. merakisync-0.1.6/src/merakisync/models/__init__.py +25 -0
  43. merakisync-0.1.6/src/merakisync/models/alert.py +194 -0
  44. merakisync-0.1.6/src/merakisync/models/base.py +564 -0
  45. merakisync-0.1.6/src/merakisync/models/device.py +226 -0
  46. merakisync-0.1.6/src/merakisync/models/dhcp_server_policy.py +120 -0
  47. merakisync-0.1.6/src/merakisync/models/l3_firewall_rule.py +160 -0
  48. merakisync-0.1.6/src/merakisync/models/network.py +183 -0
  49. merakisync-0.1.6/src/merakisync/models/organization.py +122 -0
  50. merakisync-0.1.6/src/merakisync/models/ssid.py +164 -0
  51. merakisync-0.1.6/src/merakisync/models/switchport.py +222 -0
  52. merakisync-0.1.6/src/merakisync/models/uplink.py +227 -0
  53. merakisync-0.1.6/src/merakisync/models/uplink_usage.py +268 -0
  54. merakisync-0.1.6/src/merakisync/models/vlan.py +191 -0
  55. merakisync-0.1.6/src/merakisync/utils/__init__.py +12 -0
  56. merakisync-0.1.6/src/merakisync/utils/action_batch.py +136 -0
  57. merakisync-0.1.6/src/merakisync/utils/casing.py +28 -0
  58. merakisync-0.1.6/src/merakisync/utils/confirm.py +14 -0
  59. merakisync-0.1.6/src/merakisync/utils/filter_array.py +13 -0
  60. merakisync-0.1.6/src/merakisync/utils/prompt.py +38 -0
  61. merakisync-0.1.6/tests/__init__.py +3 -0
  62. merakisync-0.1.6/tests/test_action_batch.py +163 -0
  63. merakisync-0.1.6/tests/test_alert.py +291 -0
  64. merakisync-0.1.6/tests/test_base_extra.py +377 -0
  65. merakisync-0.1.6/tests/test_casing.py +37 -0
  66. merakisync-0.1.6/tests/test_cli.py +245 -0
  67. merakisync-0.1.6/tests/test_cmd_migrate.py +41 -0
  68. merakisync-0.1.6/tests/test_cmd_sync.py +228 -0
  69. merakisync-0.1.6/tests/test_config.py +254 -0
  70. merakisync-0.1.6/tests/test_dashboard.py +120 -0
  71. merakisync-0.1.6/tests/test_database.py +99 -0
  72. merakisync-0.1.6/tests/test_device.py +352 -0
  73. merakisync-0.1.6/tests/test_dhcp_server_policy.py +219 -0
  74. merakisync-0.1.6/tests/test_filter_array.py +42 -0
  75. merakisync-0.1.6/tests/test_l3_firewall_rule.py +285 -0
  76. merakisync-0.1.6/tests/test_logging_module.py +79 -0
  77. merakisync-0.1.6/tests/test_models_base.py +344 -0
  78. merakisync-0.1.6/tests/test_network.py +319 -0
  79. merakisync-0.1.6/tests/test_organization.py +236 -0
  80. merakisync-0.1.6/tests/test_ssid.py +357 -0
  81. merakisync-0.1.6/tests/test_switchport.py +376 -0
  82. merakisync-0.1.6/tests/test_uplink.py +319 -0
  83. merakisync-0.1.6/tests/test_uplink_usage.py +351 -0
  84. merakisync-0.1.6/tests/test_vlan.py +321 -0
@@ -0,0 +1,102 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ name: Build ${{ matrix.os }}-${{ matrix.arch }}
15
+ runs-on: ${{ matrix.runner }}
16
+ strategy:
17
+ matrix:
18
+ include:
19
+ - runner: macos-latest # Apple Silicon
20
+ os: darwin
21
+ arch: arm64
22
+ - runner: ubuntu-latest # x86_64
23
+ os: linux
24
+ arch: x86_64
25
+ - runner: ubuntu-24.04-arm # ARM64
26
+ os: linux
27
+ arch: arm64
28
+
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+
32
+ - uses: actions/setup-python@v5
33
+ with:
34
+ python-version: "3.11"
35
+
36
+ - name: Install dependencies
37
+ run: |
38
+ python -m pip install --upgrade pip
39
+ pip install pyinstaller
40
+ pip install -e .
41
+
42
+ - name: Build binary
43
+ run: pyinstaller merakisync.spec
44
+
45
+ - name: Rename binary
46
+ run: mv dist/merakisync dist/merakisync-${{ matrix.os }}-${{ matrix.arch }}
47
+
48
+ - uses: actions/upload-artifact@v4
49
+ with:
50
+ name: merakisync-${{ matrix.os }}-${{ matrix.arch }}
51
+ path: dist/merakisync-${{ matrix.os }}-${{ matrix.arch }}
52
+ if-no-files-found: error
53
+
54
+ release:
55
+ name: Publish release
56
+ needs: build
57
+ runs-on: ubuntu-latest
58
+
59
+ steps:
60
+ - uses: actions/download-artifact@v4
61
+ with:
62
+ path: dist
63
+ merge-multiple: true
64
+
65
+ - name: Generate checksums
66
+ working-directory: dist
67
+ run: sha256sum merakisync-* > checksums.txt
68
+
69
+ - name: Create GitHub Release
70
+ env:
71
+ GH_TOKEN: ${{ github.token }}
72
+ run: |
73
+ gh release create "${{ github.ref_name }}" \
74
+ --repo "${{ github.repository }}" \
75
+ --title "${{ github.ref_name }}" \
76
+ --generate-notes \
77
+ dist/merakisync-darwin-arm64 \
78
+ dist/merakisync-linux-x86_64 \
79
+ dist/merakisync-linux-arm64 \
80
+ dist/checksums.txt
81
+
82
+ publish:
83
+ name: Publish to PyPI
84
+ needs: release
85
+ runs-on: ubuntu-latest
86
+ environment: pypi
87
+ permissions:
88
+ id-token: write
89
+ steps:
90
+ - uses: actions/checkout@v4
91
+
92
+ - uses: actions/setup-python@v5
93
+ with:
94
+ python-version: "3.11"
95
+
96
+ - name: Build distribution
97
+ run: |
98
+ pip install build
99
+ python -m build
100
+
101
+ - name: Publish to PyPI
102
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,217 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
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
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ .vscode/
203
+ .DS_Store
204
+
205
+ # Ruff stuff:
206
+ .ruff_cache/
207
+
208
+ # PyPI configuration file
209
+ .pypirc
210
+
211
+ # Marimo
212
+ marimo/_static/
213
+ marimo/_lsp/
214
+ __marimo__/
215
+
216
+ # Streamlit
217
+ .streamlit/secrets.toml