Skip to content

Commit dc74579

Browse files
committed
simplify package readme
1 parent 109689d commit dc74579

File tree

4 files changed

+45
-87
lines changed

4 files changed

+45
-87
lines changed

.github/workflows/redshift.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
workflow_call:
1818

1919
env:
20-
NODE_VERSION: 14
20+
NODE_VERSION: 20.19
2121
PYTHON2_VERSION: 2.7.18
2222
PYTHON3_VERSION: 3.8.18
2323
VIRTUALENV_VERSION: 20.15.1
@@ -26,17 +26,21 @@ env:
2626
jobs:
2727

2828
test:
29-
runs-on: ubuntu-24.04
29+
runs-on: ubuntu-24.04-4cpus
3030
container: python:2.7.18-buster
31-
timeout-minutes: 30
31+
timeout-minutes: 40
3232
env:
3333
RS_PREFIX: ci_${{ github.sha }}_${{ github.run_id }}_${{ github.run_attempt }}_
3434
RS_HOST: ${{ secrets.RS_HOST_CI }}
3535
RS_DATABASE: ${{ secrets.RS_DATABASE_CI }}
3636
RS_USER: ${{ secrets.RS_USER_CI }}
3737
RS_PASSWORD: ${{ secrets.RS_PASSWORD_CI }}
3838
RS_BUCKET: ${{ secrets.RS_BUCKET_CI }}
39+
RS_LAMBDA: ${{ secrets.RS_LAMBDA_CI }}
3940
RS_ROLES: ${{ secrets.RS_ROLES_CI }}
41+
RS_API_BASE_URL: ${{ secrets.RS_API_BASE_URL_CI }}
42+
RS_API_ACCESS_TOKEN: ${{ secrets.RS_API_ACCESS_TOKEN_CI }}
43+
RS_GATEWAY_SERVICE_MOCK: 1
4044
AWS_REGION: ${{ secrets.RS_REGION_CI }}
4145
AWS_ACCESS_KEY_ID: ${{ secrets.RS_AWS_ACCESS_KEY_ID_CI }}
4246
AWS_SECRET_ACCESS_KEY: ${{ secrets.RS_AWS_SECRET_ACCESS_KEY_CI }}
@@ -52,6 +56,11 @@ jobs:
5256
node-version: ${{ env.NODE_VERSION }}
5357
- name: Setup yarn
5458
run: npm install -g yarn
59+
- name: Fix apt sources for Debian Buster
60+
run: |
61+
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list
62+
sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list
63+
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid
5564
- name: Install dependencies
5665
run: |
5766
apt-get update
@@ -98,6 +107,10 @@ jobs:
98107
password: RS_PASSWORD_CD
99108
bucket: RS_BUCKET_CD
100109
region: RS_REGION_CD
110+
lambda: RS_LAMBDA_CD
111+
roles: RS_ROLES_CD
112+
api_base_url: RS_API_BASE_URL_CD
113+
api_access_token: RS_API_ACCESS_TOKEN_CD
101114
aws_access_key_id: RS_AWS_ACCESS_KEY_ID_CD
102115
aws_secret_access_key: RS_AWS_SECRET_ACCESS_KEY_CD
103116
- host: RS_HOST_CI
@@ -106,6 +119,10 @@ jobs:
106119
password: RS_PASSWORD_CI
107120
bucket: RS_BUCKET_CI
108121
region: RS_REGION_CI
122+
lambda: RS_LAMBDA_CI
123+
roles: RS_ROLES_CI
124+
api_base_url: RS_API_BASE_URL_CI
125+
api_access_token: RS_API_ACCESS_TOKEN_CI
109126
aws_access_key_id: RS_AWS_ACCESS_KEY_ID_CI
110127
aws_secret_access_key: RS_AWS_SECRET_ACCESS_KEY_CI
111128
env:
@@ -115,7 +132,10 @@ jobs:
115132
RS_PASSWORD: ${{ secrets[matrix.password] }}
116133
RS_BUCKET: ${{ secrets[matrix.bucket] }}
117134
RS_REGION: ${{ secrets[matrix.region] }}
118-
RS_ROLES: ${{ secrets.RS_ROLES_PROD }}
135+
RS_LAMBDA: ${{ secrets[matrix.lambda] }}
136+
RS_ROLES: ${{ secrets[matrix.roles] }}
137+
RS_API_BASE_URL: ${{ secrets[matrix.api_base_url] }}
138+
RS_API_ACCESS_TOKEN: ${{ secrets[matrix.api_access_token] }}
119139
AWS_REGION: ${{ secrets[matrix.region] }}
120140
AWS_ACCESS_KEY_ID: ${{ secrets[matrix.aws_access_key_id] }}
121141
AWS_SECRET_ACCESS_KEY: ${{ secrets[matrix.aws_secret_access_key] }}
@@ -131,6 +151,11 @@ jobs:
131151
node-version: ${{ env.NODE_VERSION }}
132152
- name: Setup yarn
133153
run: npm install -g yarn
154+
- name: Fix apt sources for Debian Buster
155+
run: |
156+
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list
157+
sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list
158+
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid
134159
- name: Install dependencies
135160
run: |
136161
apt-get update

gateway/functions/quadbin/quadbin_polyfill/README.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

gateway/functions/quadbin/quadbin_polyfill/code/redshift.sql

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
-- Copyright (C) 2025 CARTO
33
----------------------------
44

5+
-- QUADBIN_POLYFILL
6+
-- Returns an array of Quadbin indices that cover the given geometry at a specified resolution.
7+
-- This is useful for spatial indexing and analysis of geographic data.
8+
--
9+
-- Signature: QUADBIN_POLYFILL(geom GEOMETRY, resolution INTEGER) -> SUPER (array of BIGINT)
10+
--
11+
-- Parameters:
12+
-- geom: Input geometry to cover with quadbins
13+
-- resolution: Quadbin resolution level (0-26)
14+
--
15+
-- Returns: Array of Quadbin indices covering the geometry
16+
--
17+
-- Examples:
18+
-- SELECT QUADBIN_POLYFILL(ST_POINT(-3.70325, 40.4165), 4);
19+
-- -- Returns: [5209574053332910079]
20+
521
-- Internal external function (VARCHAR in/out)
622
CREATE OR REPLACE EXTERNAL FUNCTION @@SCHEMA@@.__QUADBIN_POLYFILL_EXFUNC(
723
geom VARCHAR(MAX),

gateway/logic/common/engine/packager.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ def _create_documentation(self, package_dir: Path, functions: List[Function]):
172172
readme_content = f"""# CARTO Analytics Toolbox for Redshift
173173
174174
Version: {self.version}
175-
Generated: {datetime.now().strftime("%Y-%m-%d %H:%M:%S")} # noqa: E501
176175
177176
## Installation
178177
@@ -263,26 +262,6 @@ def _create_documentation(self, package_dir: Path, functions: List[Function]):
263262
264263
Then provide the role ARNs during installation.
265264
266-
## Included Functions
267-
268-
This package includes {len(functions)} functions:
269-
270-
"""
271-
# Group by module
272-
by_module = {}
273-
for func in functions:
274-
if func.module not in by_module:
275-
by_module[func.module] = []
276-
by_module[func.module].append(func)
277-
278-
for module in sorted(by_module.keys()):
279-
readme_content += f"\n### {module.title()}\n\n"
280-
for func in sorted(by_module[module], key=lambda f: f.name):
281-
readme_content += (
282-
f"- **{func.name.upper()}**: {func.description.split('.')[0]}\n"
283-
)
284-
285-
readme_content += """
286265
## Support
287266
288267
For issues or questions:
@@ -298,13 +277,6 @@ def _create_documentation(self, package_dir: Path, functions: List[Function]):
298277
with open(package_dir / "README.md", "w") as f:
299278
f.write(readme_content)
300279

301-
# Copy architecture doc if exists
302-
arch_doc = (
303-
Path(__file__).parent.parent.parent.parent.parent / "claude_instructions.md"
304-
)
305-
if arch_doc.exists():
306-
shutil.copy2(arch_doc, package_dir / "ARCHITECTURE.md")
307-
308280
def _create_zip(self, package_dir: Path, zip_path: Path):
309281
"""Create zip file of the package"""
310282
if zip_path.exists():

0 commit comments

Comments
 (0)