Skip to content

Commit 638ad1d

Browse files
vdusekclaude
andauthored
docs: Remove apify-shared from documentation build (#639)
## Summary - Removes `apify-shared` from the docs build pipeline — it is no longer a dependency of `apify-client-python` - Removes cloning of `apify-shared-python` repo and its docspec dump generation from `build_api_reference.sh` - Removes `apify_shared` references from `transformDocs.js` (repo URL, version detection, docspec merging) - Removes `apify_shared` from the module list in `generate_module_shortcuts.py` Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7895a4e commit 638ad1d

File tree

3 files changed

+4
-27
lines changed

3 files changed

+4
-27
lines changed

website/build_api_reference.sh

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,6 @@ sed_no_backup() {
1414
pydoc-markdown --quiet --dump > docspec-dump.jsonl
1515
sed_no_backup "s#${PWD}/..#REPO_ROOT_PLACEHOLDER#g" docspec-dump.jsonl
1616

17-
# Create docpec dump from the right version of the apify-shared package
18-
apify_shared_version=$(python -c "import apify_shared; print(apify_shared.__version__)")
19-
apify_shared_tempdir=$(realpath "$(mktemp -d)")
20-
git clone --quiet https://github.com/apify/apify-shared-python.git "${apify_shared_tempdir}"
21-
cp ./pydoc-markdown.yml "${apify_shared_tempdir}/pydoc-markdown.yml"
22-
sed_no_backup "s#search_path: \[../src\]#search_path: \[./src\]#g" "${apify_shared_tempdir}/pydoc-markdown.yml"
23-
24-
(
25-
cd "${apify_shared_tempdir}";
26-
git checkout --quiet "v${apify_shared_version}";
27-
pydoc-markdown --quiet --dump > ./apify-shared-docspec-dump.jsonl
28-
)
29-
30-
cp "${apify_shared_tempdir}/apify-shared-docspec-dump.jsonl" .
31-
sed_no_backup "s#${apify_shared_tempdir}#REPO_ROOT_PLACEHOLDER#g" apify-shared-docspec-dump.jsonl
32-
33-
rm -rf "${apify_shared_tempdir}"
34-
3517
# Generate import shortcuts from the modules
3618
python generate_module_shortcuts.py
3719

website/generate_module_shortcuts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def resolve_shortcuts(shortcuts: dict) -> None:
4545

4646

4747
shortcuts = {}
48-
for module_name in ['apify', 'apify_client', 'apify_shared']:
48+
for module_name in ['apify', 'apify_client']:
4949
try:
5050
module = importlib.import_module(module_name)
5151
module_shortcuts = get_module_shortcuts(module)

website/transformDocs.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ const REPO_ROOT_PLACEHOLDER = 'REPO_ROOT_PLACEHOLDER';
99

1010
const APIFY_CLIENT_REPO_URL = 'https://github.com/apify/apify-client-python';
1111
const APIFY_SDK_REPO_URL = 'https://github.com/apify/apify-sdk-python';
12-
const APIFY_SHARED_REPO_URL = 'https://github.com/apify/apify-shared-python';
1312

1413
const REPO_URL_PER_PACKAGE = {
1514
'apify': APIFY_SDK_REPO_URL,
1615
'apify_client': APIFY_CLIENT_REPO_URL,
17-
'apify_shared': APIFY_SHARED_REPO_URL,
1816
};
1917

2018
// For each package, get the installed version, and set the tag to the corresponding version
2119
const TAG_PER_PACKAGE = {};
22-
for (const pkg of ['apify', 'apify_client', 'apify_shared']) {
20+
for (const pkg of ['apify', 'apify_client']) {
2321
const spawnResult = spawnSync('python', ['-c', `import ${pkg}; print(${pkg}.__version__)`]);
2422
if (spawnResult.status === 0) {
2523
TAG_PER_PACKAGE[pkg] = `v${spawnResult.stdout.toString().trim()}`;
@@ -319,15 +317,12 @@ function main() {
319317
]
320318
};
321319

322-
// Load the docspec dump files of this module and of apify-shared
320+
// Load the docspec dump file of this module
323321
const thisPackageDocspecDump = fs.readFileSync('docspec-dump.jsonl', 'utf8');
324322
const thisPackageModules = thisPackageDocspecDump.split('\n').filter((line) => line !== '');
325323

326-
const apifySharedDocspecDump = fs.readFileSync('apify-shared-docspec-dump.jsonl', 'utf8');
327-
const apifySharedModules = apifySharedDocspecDump.split('\n').filter((line) => line !== '');
328-
329324
// Convert all the modules, store them in the root object
330-
for (const module of [...thisPackageModules, ...apifySharedModules]) {
325+
for (const module of thisPackageModules) {
331326
const parsedModule = JSON.parse(module);
332327
convertObject(parsedModule, typedocApiReference, parsedModule);
333328
};

0 commit comments

Comments
 (0)