panel-tiles 0.0.0a0__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.
@@ -0,0 +1,67 @@
1
+ module.exports = {
2
+ parserOptions: {
3
+ sourceType: "module",
4
+ ecmaVersion: 2020,
5
+ ecmaFeatures: {
6
+ jsx: true
7
+ }
8
+ },
9
+ plugins: ["@stylistic/eslint-plugin"],
10
+ extends: [],
11
+ rules: {
12
+ "no-console": ["error", {allow: ["warn", "error"]}],
13
+ "no-self-assign": ["error", {props: false}],
14
+ "brace-style": ["error", "1tbs", {allowSingleLine: true}],
15
+ "comma-dangle": ["off"],
16
+ "comma-spacing": ["error", {before: false, after: true}],
17
+ "dot-notation": "error",
18
+ "eol-last": ["error", "always"],
19
+ "no-irregular-whitespace": ["error"],
20
+ "@stylistic/indent": ["error", 2],
21
+ "@stylistic/no-mixed-spaces-and-tabs": ["error"],
22
+ "no-debugger": "error",
23
+ "no-floating-decimal": ["error"],
24
+ "no-multiple-empty-lines": ["error", {max: 1, maxBOF: 0, maxEOF: 0}],
25
+ "no-new-wrappers": "error",
26
+ "no-throw-literal": "error",
27
+ "no-trailing-spaces": ["error"],
28
+ "no-var": "error",
29
+ "object-shorthand": "error",
30
+ "prefer-const": ["error", {destructuring: "all"}],
31
+ "prefer-exponentiation-operator": "error",
32
+ "quote-props": ["error", "as-needed"],
33
+ "object-curly-spacing": ["error", "never"],
34
+ "space-before-blocks": ["error", "always"],
35
+ "space-before-function-paren": ["error", {
36
+ anonymous: "never",
37
+ named: "never",
38
+ asyncArrow: "always",
39
+ }],
40
+ "space-in-parens": ["error", "never"],
41
+ "keyword-spacing": ["error", {before: true, after: true}],
42
+ "func-call-spacing": ["error", "never"],
43
+ "no-whitespace-before-property": ["error"],
44
+ "block-spacing": ["error", "always"],
45
+ "key-spacing": ["error", {
46
+ beforeColon: false,
47
+ afterColon: true,
48
+ mode: "minimum",
49
+ }],
50
+ "space-unary-ops": ["error", {
51
+ words: true,
52
+ nonwords: false,
53
+ overrides: {},
54
+ }],
55
+ "guard-for-in": ["warn"],
56
+ quotes: ["error", "double", {avoidEscape: true, allowTemplateLiterals: true}],
57
+ curly: ["error", "all"],
58
+ "prefer-template": ["error"],
59
+ "generator-star-spacing": ["error", {
60
+ before: false,
61
+ after: true,
62
+ anonymous: {before: false, after: true},
63
+ method: {before: true, after: false},
64
+ }],
65
+ "yield-star-spacing": ["error", {before: false, after: true}],
66
+ },
67
+ }
@@ -0,0 +1 @@
1
+ * @philippjfr
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: monthly
7
+ groups:
8
+ gh-actions:
9
+ patterns:
10
+ - "*"
@@ -0,0 +1,80 @@
1
+ name: Build
2
+ on:
3
+ pull_request:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "v[0-9]+.[0-9]+.[0-9]+"
9
+ - "v[0-9]+.[0-9]+.[0-9]+a[0-9]+"
10
+ - "v[0-9]+.[0-9]+.[0-9]+b[0-9]+"
11
+ - "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
12
+
13
+ permissions: {}
14
+
15
+ concurrency:
16
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ build:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
24
+ with:
25
+ fetch-depth: 0
26
+ persist-credentials: false
27
+ - name: Set up pixi
28
+ uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
29
+ with:
30
+ environments: build
31
+ - name: Build project
32
+ run: pixi run -e build build-wheel
33
+ - name: Check package
34
+ run: pixi run -e build check-wheel
35
+ - name: Upload package
36
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
37
+ with:
38
+ name: pip
39
+ path: dist/*
40
+ - name: Upload bundle
41
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
42
+ with:
43
+ name: cdn
44
+ path: src/panel_tiles/dist/
45
+ release:
46
+ name: Publish package
47
+ if: startsWith(github.ref, 'refs/tags/')
48
+ needs: [build]
49
+ runs-on: ubuntu-latest
50
+ permissions:
51
+ id-token: write
52
+ environment: pypi
53
+ steps:
54
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
55
+ with:
56
+ name: pip
57
+ path: dist/
58
+ - name: Publish package on PyPi
59
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
60
+ publish_cdn:
61
+ name: Publish to CDN
62
+ if: startsWith(github.ref, 'refs/tags/')
63
+ needs: [build]
64
+ runs-on: ubuntu-latest
65
+ steps:
66
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
67
+ with:
68
+ name: cdn
69
+ path: dist/
70
+ - name: Get Tag Name
71
+ id: get_tag
72
+ run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
73
+ - name: Configure AWS Credentials
74
+ uses: aws-actions/configure-aws-credentials@99214aa6889fcddfa57764031d71add364327e59 # v6
75
+ with:
76
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
77
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
78
+ aws-region: us-east-1
79
+ - name: Upload to S3
80
+ run: aws s3 sync ./dist "s3://cdn.holoviz.org/panel-tiles/${TAG_NAME}/"
@@ -0,0 +1,191 @@
1
+ name: tests
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ branches:
8
+ - "*"
9
+ workflow_dispatch:
10
+ inputs:
11
+ target:
12
+ description: "How much of the test suite to run"
13
+ type: choice
14
+ default: default
15
+ options:
16
+ - default
17
+ - full
18
+ - downstream
19
+ cache:
20
+ description: "Use cache"
21
+ type: boolean
22
+ default: true
23
+ schedule:
24
+ - cron: "0 19 * * SUN"
25
+
26
+ permissions: {}
27
+
28
+ concurrency:
29
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
30
+ cancel-in-progress: true
31
+
32
+ defaults:
33
+ run:
34
+ shell: bash -e {0}
35
+
36
+ env:
37
+ COV: "--cov=./src/panel_tiles --cov-report=xml --cov-append"
38
+
39
+ jobs:
40
+ pre_commit:
41
+ name: Run pre-commit
42
+ needs: [setup]
43
+ runs-on: "ubuntu-latest"
44
+ steps:
45
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
46
+ with:
47
+ persist-credentials: false
48
+ - name: Set up pixi
49
+ uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
50
+ - uses: holoviz-dev/holoviz_tasks/pre-commit@ab994f6a87c4fdb1363925d26c85a5bab2144f28 # v1
51
+ - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
52
+ if: needs.setup.outputs.img_change == 'true'
53
+ with:
54
+ extra_args: -a --hook-stage manual oxipng || true --
55
+ - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7
56
+ if: needs.setup.outputs.img_change == 'true'
57
+ with:
58
+ commit_message: "Optimize PNG images (lossless)"
59
+ file_pattern: "*.png"
60
+ setup:
61
+ name: Setup workflow
62
+ runs-on: ubuntu-latest
63
+ permissions:
64
+ pull-requests: read
65
+ outputs:
66
+ code_change: ${{ steps.filter.outputs.code }}
67
+ matrix: ${{ env.MATRIX }}
68
+ steps:
69
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
70
+ with:
71
+ persist-credentials: false
72
+ if: github.event_name != 'pull_request'
73
+ - name: Check for code changes
74
+ uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
75
+ id: filter
76
+ with:
77
+ filters: |
78
+ code:
79
+ - 'src/**'
80
+ - 'tests/**'
81
+ - 'examples/**'
82
+ - 'pyproject.toml'
83
+ - '.github/workflows/test.yaml'
84
+ - 'pixi.toml'
85
+ - name: Set matrix option
86
+ env:
87
+ GITHUB_EVENT_INPUTS_TARGET: ${{ github.event.inputs.target }}
88
+ run: |
89
+ if [[ "${GITHUB_EVENT_NAME}" == 'workflow_dispatch' ]]; then
90
+ OPTION=${GITHUB_EVENT_INPUTS_TARGET}
91
+ elif [[ "${GITHUB_EVENT_NAME}" == 'schedule' ]]; then
92
+ OPTION="full"
93
+ elif [[ "${GITHUB_EVENT_NAME}" == 'push' && "${GITHUB_REF_TYPE}" == 'tag' ]]; then
94
+ OPTION="full"
95
+ else
96
+ OPTION="default"
97
+ fi
98
+ echo "MATRIX_OPTION=$OPTION" >> $GITHUB_ENV
99
+ - name: Set test matrix with 'default' option
100
+ if: env.MATRIX_OPTION == 'default'
101
+ run: |
102
+ MATRIX=$(jq -nsc '{
103
+ "os": ["ubuntu-latest", "macos-latest", "windows-latest"],
104
+ "environment": ["test-310", "test-314"],
105
+ }')
106
+ echo "MATRIX=$MATRIX" >> $GITHUB_ENV
107
+ - name: Set test matrix with 'full' option
108
+ if: env.MATRIX_OPTION == 'full'
109
+ run: |
110
+ MATRIX=$(jq -nsc '{
111
+ "os": ["ubuntu-latest", "macos-latest", "windows-latest"],
112
+ "environment": ["test-310", "test-311", "test-312", "test-313", "test-314"]
113
+ }')
114
+ echo "MATRIX=$MATRIX" >> $GITHUB_ENV
115
+ - name: Set test matrix with 'downstream' option
116
+ if: env.MATRIX_OPTION == 'downstream'
117
+ run: |
118
+ MATRIX=$(jq -nsc '{
119
+ "os": ["ubuntu-latest"],
120
+ "environment": ["test-310"]
121
+ }')
122
+ echo "MATRIX=$MATRIX" >> $GITHUB_ENV
123
+ pixi_lock:
124
+ name: Pixi lock
125
+ runs-on: ubuntu-latest
126
+ steps:
127
+ - uses: holoviz-dev/holoviz_tasks/pixi-lock@ab994f6a87c4fdb1363925d26c85a5bab2144f28 # v1
128
+ with:
129
+ cache: ${{ github.event.inputs.cache == 'true' || github.event.inputs.cache == '' }}
130
+ unit_test:
131
+ name: unit:${{ matrix.environment }}:${{ matrix.os }}
132
+ needs: [pre_commit, setup, pixi_lock]
133
+ runs-on: ${{ matrix.os }}
134
+ strategy:
135
+ fail-fast: false
136
+ matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
137
+ timeout-minutes: 30
138
+ env:
139
+ ENV: ${{ matrix.environment }}
140
+ steps:
141
+ - uses: holoviz-dev/holoviz_tasks/pixi-install@ab994f6a87c4fdb1363925d26c85a5bab2144f28 # v1
142
+ with:
143
+ environments: ${{ matrix.environment }}
144
+ install: false
145
+ id: install
146
+ - name: Unit tests with coverage
147
+ run: pixi run -e "${ENV}" test-coverage --color=yes $COV
148
+ - name: Upload coverage reports to Codecov
149
+ uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6
150
+ with:
151
+ token: ${{ secrets.CODECOV_TOKEN }}
152
+ slug: panel-extensions/panel-tiles
153
+ ui_test:
154
+ name: ui:${{ matrix.environment }}:${{ matrix.os }}
155
+ needs: [pre_commit, setup, pixi_lock]
156
+ runs-on: ${{ matrix.os }}
157
+ if: needs.setup.outputs.code_change == 'true'
158
+ strategy:
159
+ fail-fast: false
160
+ matrix:
161
+ os: ["ubuntu-latest", "macos-latest", "windows-latest"]
162
+ environment: ["test-ui"]
163
+ timeout-minutes: 60
164
+ env:
165
+ PANEL_LOG_LEVEL: info
166
+ ENV: ${{ matrix.environment }}
167
+ steps:
168
+ - uses: holoviz-dev/holoviz_tasks/pixi-install@ab994f6a87c4fdb1363925d26c85a5bab2144f28 # v1
169
+ with:
170
+ environments: ${{ matrix.environment }}
171
+ install: false
172
+ id: install
173
+ - name: Test UI
174
+ run: |
175
+ # Create a .uicoveragerc file to set the concurrency library to greenlet
176
+ # https://github.com/microsoft/playwright-python/issues/313
177
+ echo "[run]\nconcurrency = greenlet" > .uicoveragerc
178
+ FAIL="--screenshot only-on-failure --full-page-screenshot --output ui_screenshots --tracing retain-on-failure"
179
+ pixi run -e "${ENV}" test-ui $COV --cov-config=.uicoveragerc $FAIL
180
+ - name: Upload UI Screenshots
181
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
182
+ if: always()
183
+ with:
184
+ name: ui_screenshots_${{ runner.os }}
185
+ path: ./ui_screenshots
186
+ if-no-files-found: ignore
187
+ - name: Upload coverage reports to Codecov
188
+ uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6
189
+ with:
190
+ token: ${{ secrets.CODECOV_TOKEN }}
191
+ slug: panel-extensions/panel-tiles
@@ -0,0 +1,36 @@
1
+ name: Update lockfiles
2
+ permissions:
3
+ contents: write
4
+ pull-requests: write
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ schedule:
9
+ - cron: 0 5 1 * *
10
+
11
+ jobs:
12
+ pixi-update:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16
+ with:
17
+ persist-credentials: false
18
+ - name: Set up pixi
19
+ uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
20
+ with:
21
+ run-install: false
22
+ - name: Update lockfiles
23
+ run: |
24
+ pixi update --json --no-install | pixi exec pixi-diff-to-markdown >> diff.md
25
+ - name: Create pull request
26
+ uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
27
+ with:
28
+ token: ${{ secrets.GITHUB_TOKEN }}
29
+ commit-message: Update pixi lockfile
30
+ title: Update pixi lockfile
31
+ body-path: diff.md
32
+ branch: update-pixi
33
+ base: main
34
+ labels: pixi
35
+ delete-branch: true
36
+ add-paths: pixi.lock