scitex 2.5.0__py3-none-any.whl → 2.7.3__py3-none-any.whl
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.
- scitex/__init__.py +25 -10
- scitex/__main__.py +2 -1
- scitex/__version__.py +1 -1
- scitex/_optional_deps.py +13 -20
- scitex/ai/__init__.py +5 -0
- scitex/ai/_gen_ai/_Anthropic.py +3 -1
- scitex/ai/_gen_ai/_BaseGenAI.py +3 -2
- scitex/ai/_gen_ai/_DeepSeek.py +1 -1
- scitex/ai/_gen_ai/_Google.py +3 -2
- scitex/ai/_gen_ai/_Llama.py +4 -2
- scitex/ai/_gen_ai/_OpenAI.py +3 -1
- scitex/ai/_gen_ai/_PARAMS.py +1 -0
- scitex/ai/_gen_ai/_Perplexity.py +3 -1
- scitex/ai/_gen_ai/__init__.py +1 -0
- scitex/ai/_gen_ai/_format_output_func.py +3 -1
- scitex/ai/classification/CrossValidationExperiment.py +8 -14
- scitex/ai/classification/examples/timeseries_cv_demo.py +128 -112
- scitex/ai/classification/reporters/_BaseClassificationReporter.py +2 -0
- scitex/ai/classification/reporters/_ClassificationReporter.py +30 -45
- scitex/ai/classification/reporters/_MultiClassificationReporter.py +8 -11
- scitex/ai/classification/reporters/_SingleClassificationReporter.py +126 -182
- scitex/ai/classification/reporters/__init__.py +1 -1
- scitex/ai/classification/reporters/reporter_utils/_Plotter.py +213 -119
- scitex/ai/classification/reporters/reporter_utils/__init__.py +28 -36
- scitex/ai/classification/reporters/reporter_utils/aggregation.py +125 -143
- scitex/ai/classification/reporters/reporter_utils/data_models.py +128 -120
- scitex/ai/classification/reporters/reporter_utils/reporting.py +507 -340
- scitex/ai/classification/reporters/reporter_utils/storage.py +4 -1
- scitex/ai/classification/reporters/reporter_utils/validation.py +141 -154
- scitex/ai/classification/timeseries/_TimeSeriesBlockingSplit.py +204 -129
- scitex/ai/classification/timeseries/_TimeSeriesCalendarSplit.py +215 -171
- scitex/ai/classification/timeseries/_TimeSeriesMetadata.py +17 -17
- scitex/ai/classification/timeseries/_TimeSeriesSlidingWindowSplit.py +67 -143
- scitex/ai/classification/timeseries/_TimeSeriesSlidingWindowSplit_v01-not-using-n_splits.py +67 -143
- scitex/ai/classification/timeseries/_TimeSeriesStrategy.py +12 -13
- scitex/ai/classification/timeseries/_TimeSeriesStratifiedSplit.py +231 -144
- scitex/ai/classification/timeseries/__init__.py +2 -4
- scitex/ai/classification/timeseries/_normalize_timestamp.py +3 -0
- scitex/ai/clustering/_pca.py +0 -1
- scitex/ai/clustering/_umap.py +1 -2
- scitex/ai/feature_extraction/__init__.py +10 -8
- scitex/ai/feature_extraction/vit.py +0 -1
- scitex/ai/feature_selection/feature_selection.py +3 -8
- scitex/ai/metrics/_calc_conf_mat.py +2 -0
- scitex/ai/metrics/_calc_feature_importance.py +3 -7
- scitex/ai/metrics/_calc_pre_rec_auc.py +5 -5
- scitex/ai/metrics/_calc_roc_auc.py +4 -2
- scitex/ai/metrics/_calc_seizure_prediction_metrics.py +35 -20
- scitex/ai/metrics/_calc_silhouette_score.py +1 -3
- scitex/ai/optim/Ranger_Deep_Learning_Optimizer/ranger/ranger.py +0 -3
- scitex/ai/optim/Ranger_Deep_Learning_Optimizer/ranger/ranger2020.py +0 -3
- scitex/ai/optim/Ranger_Deep_Learning_Optimizer/ranger/ranger913A.py +0 -3
- scitex/ai/optim/_optimizers.py +1 -1
- scitex/ai/plt/__init__.py +6 -1
- scitex/ai/plt/_plot_feature_importance.py +1 -3
- scitex/ai/plt/_plot_learning_curve.py +9 -24
- scitex/ai/plt/_plot_optuna_study.py +4 -3
- scitex/ai/plt/_plot_pre_rec_curve.py +9 -15
- scitex/ai/plt/_plot_roc_curve.py +6 -8
- scitex/ai/plt/_stx_conf_mat.py +121 -122
- scitex/ai/sampling/undersample.py +3 -2
- scitex/ai/sklearn/__init__.py +2 -2
- scitex/ai/training/_LearningCurveLogger.py +23 -10
- scitex/ai/utils/_check_params.py +0 -1
- scitex/audio/README.md +52 -0
- scitex/audio/__init__.py +384 -0
- scitex/audio/__main__.py +129 -0
- scitex/audio/_tts.py +334 -0
- scitex/audio/engines/__init__.py +44 -0
- scitex/audio/engines/base.py +275 -0
- scitex/audio/engines/elevenlabs_engine.py +143 -0
- scitex/audio/engines/gtts_engine.py +162 -0
- scitex/audio/engines/pyttsx3_engine.py +131 -0
- scitex/audio/mcp_server.py +757 -0
- scitex/benchmark/__init__.py +15 -25
- scitex/benchmark/benchmark.py +124 -117
- scitex/benchmark/monitor.py +117 -107
- scitex/benchmark/profiler.py +61 -58
- scitex/bridge/__init__.py +110 -0
- scitex/bridge/_helpers.py +149 -0
- scitex/bridge/_plt_vis.py +529 -0
- scitex/bridge/_protocol.py +283 -0
- scitex/bridge/_stats_plt.py +261 -0
- scitex/bridge/_stats_vis.py +265 -0
- scitex/browser/__init__.py +0 -2
- scitex/browser/auth/__init__.py +0 -0
- scitex/browser/auth/google.py +16 -11
- scitex/browser/automation/CookieHandler.py +2 -3
- scitex/browser/collaboration/__init__.py +3 -0
- scitex/browser/collaboration/auth_helpers.py +3 -1
- scitex/browser/collaboration/collaborative_agent.py +2 -0
- scitex/browser/collaboration/interactive_panel.py +2 -2
- scitex/browser/collaboration/shared_session.py +20 -11
- scitex/browser/collaboration/standard_interactions.py +1 -0
- scitex/browser/core/BrowserMixin.py +12 -30
- scitex/browser/core/ChromeProfileManager.py +9 -24
- scitex/browser/debugging/_browser_logger.py +15 -25
- scitex/browser/debugging/_failure_capture.py +9 -2
- scitex/browser/debugging/_highlight_element.py +15 -6
- scitex/browser/debugging/_show_grid.py +5 -6
- scitex/browser/debugging/_sync_session.py +4 -3
- scitex/browser/debugging/_test_monitor.py +14 -5
- scitex/browser/debugging/_visual_cursor.py +46 -35
- scitex/browser/interaction/click_center.py +4 -3
- scitex/browser/interaction/click_with_fallbacks.py +7 -10
- scitex/browser/interaction/close_popups.py +79 -66
- scitex/browser/interaction/fill_with_fallbacks.py +8 -8
- scitex/browser/pdf/__init__.py +3 -1
- scitex/browser/pdf/click_download_for_chrome_pdf_viewer.py +11 -10
- scitex/browser/pdf/detect_chrome_pdf_viewer.py +3 -6
- scitex/browser/remote/CaptchaHandler.py +109 -96
- scitex/browser/remote/ZenRowsAPIClient.py +91 -97
- scitex/browser/remote/ZenRowsBrowserManager.py +138 -112
- scitex/browser/stealth/HumanBehavior.py +4 -9
- scitex/browser/stealth/StealthManager.py +11 -26
- scitex/capture/__init__.py +17 -17
- scitex/capture/__main__.py +2 -3
- scitex/capture/capture.py +23 -51
- scitex/capture/cli.py +14 -39
- scitex/capture/gif.py +5 -9
- scitex/capture/mcp_server.py +7 -20
- scitex/capture/session.py +4 -3
- scitex/capture/utils.py +18 -53
- scitex/cli/__init__.py +1 -1
- scitex/cli/cloud.py +158 -116
- scitex/cli/config.py +224 -0
- scitex/cli/main.py +41 -40
- scitex/cli/scholar.py +60 -27
- scitex/cli/security.py +14 -20
- scitex/cli/web.py +87 -90
- scitex/cli/writer.py +51 -45
- scitex/cloud/__init__.py +14 -11
- scitex/cloud/_matplotlib_hook.py +6 -6
- scitex/config/README.md +313 -0
- scitex/config/{PriorityConfig.py → _PriorityConfig.py} +114 -17
- scitex/config/_ScitexConfig.py +319 -0
- scitex/config/__init__.py +41 -9
- scitex/config/_paths.py +325 -0
- scitex/config/default.yaml +81 -0
- scitex/context/_suppress_output.py +2 -3
- scitex/db/_BaseMixins/_BaseBackupMixin.py +3 -1
- scitex/db/_BaseMixins/_BaseBatchMixin.py +3 -1
- scitex/db/_BaseMixins/_BaseBlobMixin.py +3 -1
- scitex/db/_BaseMixins/_BaseImportExportMixin.py +1 -3
- scitex/db/_BaseMixins/_BaseIndexMixin.py +3 -1
- scitex/db/_BaseMixins/_BaseMaintenanceMixin.py +1 -3
- scitex/db/_BaseMixins/_BaseQueryMixin.py +3 -1
- scitex/db/_BaseMixins/_BaseRowMixin.py +3 -1
- scitex/db/_BaseMixins/_BaseTableMixin.py +3 -1
- scitex/db/_BaseMixins/_BaseTransactionMixin.py +1 -3
- scitex/db/_BaseMixins/__init__.py +1 -1
- scitex/db/__init__.py +9 -1
- scitex/db/__main__.py +8 -21
- scitex/db/_check_health.py +15 -31
- scitex/db/_delete_duplicates.py +7 -4
- scitex/db/_inspect.py +22 -38
- scitex/db/_inspect_optimized.py +89 -85
- scitex/db/_postgresql/_PostgreSQL.py +0 -1
- scitex/db/_postgresql/_PostgreSQLMixins/_BlobMixin.py +3 -1
- scitex/db/_postgresql/_PostgreSQLMixins/_ConnectionMixin.py +1 -3
- scitex/db/_postgresql/_PostgreSQLMixins/_ImportExportMixin.py +1 -3
- scitex/db/_postgresql/_PostgreSQLMixins/_MaintenanceMixin.py +1 -4
- scitex/db/_postgresql/_PostgreSQLMixins/_QueryMixin.py +3 -3
- scitex/db/_postgresql/_PostgreSQLMixins/_RowMixin.py +3 -1
- scitex/db/_postgresql/_PostgreSQLMixins/_TransactionMixin.py +1 -3
- scitex/db/_postgresql/__init__.py +1 -1
- scitex/db/_sqlite3/_SQLite3.py +2 -4
- scitex/db/_sqlite3/_SQLite3Mixins/_ArrayMixin.py +11 -12
- scitex/db/_sqlite3/_SQLite3Mixins/_ArrayMixin_v01-need-_hash-col.py +19 -14
- scitex/db/_sqlite3/_SQLite3Mixins/_BatchMixin.py +3 -1
- scitex/db/_sqlite3/_SQLite3Mixins/_BlobMixin.py +7 -7
- scitex/db/_sqlite3/_SQLite3Mixins/_ColumnMixin.py +118 -111
- scitex/db/_sqlite3/_SQLite3Mixins/_ConnectionMixin.py +8 -10
- scitex/db/_sqlite3/_SQLite3Mixins/_GitMixin.py +17 -45
- scitex/db/_sqlite3/_SQLite3Mixins/_ImportExportMixin.py +1 -3
- scitex/db/_sqlite3/_SQLite3Mixins/_IndexMixin.py +3 -1
- scitex/db/_sqlite3/_SQLite3Mixins/_QueryMixin.py +3 -4
- scitex/db/_sqlite3/_SQLite3Mixins/_RowMixin.py +9 -9
- scitex/db/_sqlite3/_SQLite3Mixins/_TableMixin.py +18 -11
- scitex/db/_sqlite3/_SQLite3Mixins/__init__.py +1 -0
- scitex/db/_sqlite3/__init__.py +1 -1
- scitex/db/_sqlite3/_delete_duplicates.py +13 -11
- scitex/decorators/__init__.py +29 -4
- scitex/decorators/_auto_order.py +43 -43
- scitex/decorators/_batch_fn.py +12 -6
- scitex/decorators/_cache_disk.py +8 -9
- scitex/decorators/_cache_disk_async.py +8 -7
- scitex/decorators/_combined.py +19 -13
- scitex/decorators/_converters.py +16 -3
- scitex/decorators/_deprecated.py +32 -22
- scitex/decorators/_numpy_fn.py +18 -4
- scitex/decorators/_pandas_fn.py +17 -5
- scitex/decorators/_signal_fn.py +17 -3
- scitex/decorators/_torch_fn.py +32 -15
- scitex/decorators/_xarray_fn.py +23 -9
- scitex/dev/_analyze_code_flow.py +0 -2
- scitex/dev/plt/__init__.py +272 -0
- scitex/dev/plt/plot_mpl_axhline.py +28 -0
- scitex/dev/plt/plot_mpl_axhspan.py +28 -0
- scitex/dev/plt/plot_mpl_axvline.py +28 -0
- scitex/dev/plt/plot_mpl_axvspan.py +28 -0
- scitex/dev/plt/plot_mpl_bar.py +29 -0
- scitex/dev/plt/plot_mpl_barh.py +29 -0
- scitex/dev/plt/plot_mpl_boxplot.py +28 -0
- scitex/dev/plt/plot_mpl_contour.py +31 -0
- scitex/dev/plt/plot_mpl_contourf.py +31 -0
- scitex/dev/plt/plot_mpl_errorbar.py +30 -0
- scitex/dev/plt/plot_mpl_eventplot.py +28 -0
- scitex/dev/plt/plot_mpl_fill.py +30 -0
- scitex/dev/plt/plot_mpl_fill_between.py +31 -0
- scitex/dev/plt/plot_mpl_hexbin.py +28 -0
- scitex/dev/plt/plot_mpl_hist.py +28 -0
- scitex/dev/plt/plot_mpl_hist2d.py +28 -0
- scitex/dev/plt/plot_mpl_imshow.py +29 -0
- scitex/dev/plt/plot_mpl_pcolormesh.py +31 -0
- scitex/dev/plt/plot_mpl_pie.py +29 -0
- scitex/dev/plt/plot_mpl_plot.py +29 -0
- scitex/dev/plt/plot_mpl_quiver.py +31 -0
- scitex/dev/plt/plot_mpl_scatter.py +28 -0
- scitex/dev/plt/plot_mpl_stackplot.py +31 -0
- scitex/dev/plt/plot_mpl_stem.py +29 -0
- scitex/dev/plt/plot_mpl_step.py +29 -0
- scitex/dev/plt/plot_mpl_violinplot.py +28 -0
- scitex/dev/plt/plot_sns_barplot.py +29 -0
- scitex/dev/plt/plot_sns_boxplot.py +29 -0
- scitex/dev/plt/plot_sns_heatmap.py +28 -0
- scitex/dev/plt/plot_sns_histplot.py +29 -0
- scitex/dev/plt/plot_sns_kdeplot.py +29 -0
- scitex/dev/plt/plot_sns_lineplot.py +31 -0
- scitex/dev/plt/plot_sns_scatterplot.py +29 -0
- scitex/dev/plt/plot_sns_stripplot.py +29 -0
- scitex/dev/plt/plot_sns_swarmplot.py +29 -0
- scitex/dev/plt/plot_sns_violinplot.py +29 -0
- scitex/dev/plt/plot_stx_bar.py +29 -0
- scitex/dev/plt/plot_stx_barh.py +29 -0
- scitex/dev/plt/plot_stx_box.py +28 -0
- scitex/dev/plt/plot_stx_boxplot.py +28 -0
- scitex/dev/plt/plot_stx_conf_mat.py +28 -0
- scitex/dev/plt/plot_stx_contour.py +31 -0
- scitex/dev/plt/plot_stx_ecdf.py +28 -0
- scitex/dev/plt/plot_stx_errorbar.py +30 -0
- scitex/dev/plt/plot_stx_fill_between.py +31 -0
- scitex/dev/plt/plot_stx_fillv.py +28 -0
- scitex/dev/plt/plot_stx_heatmap.py +28 -0
- scitex/dev/plt/plot_stx_image.py +28 -0
- scitex/dev/plt/plot_stx_imshow.py +28 -0
- scitex/dev/plt/plot_stx_joyplot.py +28 -0
- scitex/dev/plt/plot_stx_kde.py +28 -0
- scitex/dev/plt/plot_stx_line.py +28 -0
- scitex/dev/plt/plot_stx_mean_ci.py +28 -0
- scitex/dev/plt/plot_stx_mean_std.py +28 -0
- scitex/dev/plt/plot_stx_median_iqr.py +28 -0
- scitex/dev/plt/plot_stx_raster.py +28 -0
- scitex/dev/plt/plot_stx_rectangle.py +28 -0
- scitex/dev/plt/plot_stx_scatter.py +29 -0
- scitex/dev/plt/plot_stx_shaded_line.py +29 -0
- scitex/dev/plt/plot_stx_violin.py +28 -0
- scitex/dev/plt/plot_stx_violinplot.py +28 -0
- scitex/dict/_DotDict.py +15 -19
- scitex/dict/_flatten.py +1 -0
- scitex/dict/_listed_dict.py +1 -0
- scitex/dict/_pop_keys.py +1 -0
- scitex/dict/_replace.py +1 -0
- scitex/dict/_safe_merge.py +1 -0
- scitex/dict/_to_str.py +2 -3
- scitex/dsp/__init__.py +13 -4
- scitex/dsp/_crop.py +3 -1
- scitex/dsp/_detect_ripples.py +3 -1
- scitex/dsp/_modulation_index.py +3 -1
- scitex/dsp/_time.py +3 -1
- scitex/dsp/_wavelet.py +0 -1
- scitex/dsp/example.py +0 -5
- scitex/dsp/filt.py +4 -0
- scitex/dsp/utils/__init__.py +4 -1
- scitex/dsp/utils/pac.py +3 -3
- scitex/dt/_normalize_timestamp.py +4 -1
- scitex/errors.py +3 -6
- scitex/etc/__init__.py +1 -1
- scitex/fig/__init__.py +352 -0
- scitex/{vis → fig}/backend/__init__.py +3 -3
- scitex/{vis/backend/export.py → fig/backend/_export.py} +1 -1
- scitex/{vis/backend/parser.py → fig/backend/_parser.py} +2 -4
- scitex/{vis/backend/render.py → fig/backend/_render.py} +1 -1
- scitex/{vis → fig}/canvas.py +16 -4
- scitex/{vis → fig}/editor/__init__.py +0 -0
- scitex/{vis → fig}/editor/_dearpygui_editor.py +450 -304
- scitex/fig/editor/_defaults.py +300 -0
- scitex/fig/editor/_edit.py +751 -0
- scitex/{vis → fig}/editor/_flask_editor.py +8 -8
- scitex/{vis → fig}/editor/_mpl_editor.py +63 -48
- scitex/{vis → fig}/editor/_qt_editor.py +391 -160
- scitex/{vis → fig}/editor/_tkinter_editor.py +146 -89
- scitex/fig/editor/flask_editor/__init__.py +21 -0
- scitex/fig/editor/flask_editor/_bbox.py +1276 -0
- scitex/fig/editor/flask_editor/_core.py +624 -0
- scitex/fig/editor/flask_editor/_plotter.py +601 -0
- scitex/fig/editor/flask_editor/_renderer.py +739 -0
- scitex/{vis/editor/flask_editor/utils.py → fig/editor/flask_editor/_utils.py} +13 -14
- scitex/{vis → fig}/editor/flask_editor/templates/__init__.py +6 -6
- scitex/fig/editor/flask_editor/templates/_html.py +834 -0
- scitex/fig/editor/flask_editor/templates/_scripts.py +3136 -0
- scitex/fig/editor/flask_editor/templates/_styles.py +1346 -0
- scitex/{vis → fig}/io/__init__.py +18 -6
- scitex/fig/io/_bundle.py +973 -0
- scitex/{vis/io/canvas.py → fig/io/_canvas.py} +9 -5
- scitex/{vis/io/data.py → fig/io/_data.py} +14 -10
- scitex/{vis/io/directory.py → fig/io/_directory.py} +7 -4
- scitex/{vis/io/export.py → fig/io/_export.py} +16 -13
- scitex/{vis/io/load.py → fig/io/_load.py} +2 -2
- scitex/{vis/io/panel.py → fig/io/_panel.py} +22 -14
- scitex/{vis/io/save.py → fig/io/_save.py} +1 -1
- scitex/{vis → fig}/model/__init__.py +8 -8
- scitex/{vis/model/annotations.py → fig/model/_annotations.py} +3 -5
- scitex/{vis/model/axes.py → fig/model/_axes.py} +2 -2
- scitex/{vis/model/figure.py → fig/model/_figure.py} +1 -1
- scitex/{vis/model/guides.py → fig/model/_guides.py} +2 -2
- scitex/{vis/model/plot.py → fig/model/_plot.py} +3 -5
- scitex/{vis/model/plot_types.py → fig/model/_plot_types.py} +0 -0
- scitex/{vis/model/styles.py → fig/model/_styles.py} +1 -1
- scitex/{vis → fig}/utils/__init__.py +3 -3
- scitex/{vis/utils/defaults.py → fig/utils/_defaults.py} +1 -2
- scitex/{vis/utils/validate.py → fig/utils/_validate.py} +3 -9
- scitex/gen/_DimHandler.py +6 -6
- scitex/gen/__init__.py +5 -1
- scitex/gen/_deprecated_close.py +1 -0
- scitex/gen/_deprecated_start.py +5 -3
- scitex/gen/_detect_environment.py +44 -41
- scitex/gen/_detect_notebook_path.py +51 -47
- scitex/gen/_embed.py +1 -1
- scitex/gen/_get_notebook_path.py +81 -62
- scitex/gen/_inspect_module.py +0 -1
- scitex/gen/_norm.py +16 -7
- scitex/gen/_norm_cache.py +78 -65
- scitex/gen/_print_config.py +0 -3
- scitex/gen/_src.py +2 -3
- scitex/gen/_title_case.py +3 -2
- scitex/gen/_to_even.py +8 -8
- scitex/gen/_transpose.py +3 -3
- scitex/gen/misc.py +0 -3
- scitex/gists/_SigMacro_processFigure_S.py +2 -2
- scitex/gists/_SigMacro_toBlue.py +2 -2
- scitex/gists/__init__.py +4 -1
- scitex/git/_branch.py +19 -11
- scitex/git/_clone.py +23 -15
- scitex/git/_commit.py +10 -12
- scitex/git/_init.py +15 -38
- scitex/git/_remote.py +9 -3
- scitex/git/_result.py +3 -0
- scitex/git/_retry.py +2 -5
- scitex/git/_types.py +4 -0
- scitex/git/_validation.py +8 -8
- scitex/git/_workflow.py +4 -4
- scitex/io/__init__.py +12 -27
- scitex/io/_bundle.py +434 -0
- scitex/io/_flush.py +5 -2
- scitex/io/_glob.py +2 -2
- scitex/io/_json2md.py +3 -3
- scitex/io/_load.py +104 -8
- scitex/io/_load_cache.py +71 -71
- scitex/io/_load_configs.py +2 -3
- scitex/io/_load_modules/_H5Explorer.py +11 -14
- scitex/io/_load_modules/_ZarrExplorer.py +3 -3
- scitex/io/_load_modules/_bibtex.py +62 -63
- scitex/io/_load_modules/_canvas.py +6 -11
- scitex/io/_load_modules/_catboost.py +7 -2
- scitex/io/_load_modules/_hdf5.py +2 -0
- scitex/io/_load_modules/_image.py +7 -4
- scitex/io/_load_modules/_matlab.py +3 -1
- scitex/io/_load_modules/_optuna.py +0 -1
- scitex/io/_load_modules/_pdf.py +38 -29
- scitex/io/_load_modules/_sqlite3.py +1 -0
- scitex/io/_load_modules/_txt.py +6 -2
- scitex/io/_load_modules/_xml.py +9 -9
- scitex/io/_load_modules/_zarr.py +12 -10
- scitex/io/_metadata.py +34 -285
- scitex/io/_metadata_modules/__init__.py +46 -0
- scitex/io/_metadata_modules/_embed.py +70 -0
- scitex/io/_metadata_modules/_read.py +64 -0
- scitex/io/_metadata_modules/_utils.py +79 -0
- scitex/io/_metadata_modules/embed_metadata_jpeg.py +74 -0
- scitex/io/_metadata_modules/embed_metadata_pdf.py +53 -0
- scitex/io/_metadata_modules/embed_metadata_png.py +26 -0
- scitex/io/_metadata_modules/embed_metadata_svg.py +62 -0
- scitex/io/_metadata_modules/read_metadata_jpeg.py +57 -0
- scitex/io/_metadata_modules/read_metadata_pdf.py +51 -0
- scitex/io/_metadata_modules/read_metadata_png.py +39 -0
- scitex/io/_metadata_modules/read_metadata_svg.py +44 -0
- scitex/io/_qr_utils.py +21 -14
- scitex/io/_save.py +755 -80
- scitex/io/_save_modules/__init__.py +7 -2
- scitex/io/_save_modules/_bibtex.py +66 -61
- scitex/io/_save_modules/_canvas.py +8 -9
- scitex/io/_save_modules/_catboost.py +2 -2
- scitex/io/_save_modules/_csv.py +4 -4
- scitex/io/_save_modules/_excel.py +5 -9
- scitex/io/_save_modules/_hdf5.py +9 -21
- scitex/io/_save_modules/_html.py +5 -5
- scitex/io/_save_modules/_image.py +107 -14
- scitex/io/_save_modules/_joblib.py +2 -2
- scitex/io/_save_modules/_json.py +51 -6
- scitex/io/_save_modules/_listed_dfs_as_csv.py +2 -1
- scitex/io/_save_modules/_listed_scalars_as_csv.py +2 -1
- scitex/io/_save_modules/_matlab.py +2 -2
- scitex/io/_save_modules/_numpy.py +6 -8
- scitex/io/_save_modules/_pickle.py +4 -4
- scitex/io/_save_modules/_plotly.py +3 -3
- scitex/io/_save_modules/_tex.py +30 -29
- scitex/io/_save_modules/_text.py +2 -2
- scitex/io/_save_modules/_yaml.py +9 -9
- scitex/io/_save_modules/_zarr.py +15 -15
- scitex/io/utils/__init__.py +2 -1
- scitex/io/utils/h5_to_zarr.py +183 -163
- scitex/linalg/__init__.py +1 -1
- scitex/linalg/_geometric_median.py +4 -3
- scitex/logging/_Tee.py +5 -7
- scitex/logging/__init__.py +18 -19
- scitex/logging/_config.py +4 -1
- scitex/logging/_context.py +6 -5
- scitex/logging/_formatters.py +2 -3
- scitex/logging/_handlers.py +19 -20
- scitex/logging/_levels.py +9 -17
- scitex/logging/_logger.py +74 -15
- scitex/logging/_print_capture.py +17 -17
- scitex/msword/__init__.py +255 -0
- scitex/msword/profiles.py +357 -0
- scitex/msword/reader.py +753 -0
- scitex/msword/utils.py +289 -0
- scitex/msword/writer.py +362 -0
- scitex/nn/_BNet.py +1 -3
- scitex/nn/_Filters.py +6 -2
- scitex/nn/_ModulationIndex.py +3 -1
- scitex/nn/_PAC.py +3 -2
- scitex/nn/_PSD.py +0 -1
- scitex/nn/__init__.py +16 -3
- scitex/path/_clean.py +10 -8
- scitex/path/_find.py +1 -1
- scitex/path/_get_spath.py +1 -2
- scitex/path/_mk_spath.py +1 -1
- scitex/path/_symlink.py +5 -10
- scitex/pd/__init__.py +4 -1
- scitex/pd/_force_df.py +24 -24
- scitex/pd/_get_unique.py +1 -0
- scitex/pd/_merge_columns.py +1 -1
- scitex/pd/_round.py +11 -7
- scitex/pd/_to_xy.py +0 -1
- scitex/plt/__init__.py +190 -89
- scitex/plt/_subplots/_AxesWrapper.py +28 -12
- scitex/plt/_subplots/_AxisWrapper.py +114 -47
- scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/__init__.py +36 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/_labels.py +264 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/_metadata.py +213 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/_visual.py +128 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/__init__.py +59 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_base.py +34 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_scientific.py +593 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_statistical.py +654 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_stx_aliases.py +527 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_RawMatplotlibMixin.py +321 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/__init__.py +33 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/_base.py +152 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/_wrappers.py +600 -0
- scitex/plt/_subplots/_AxisWrapperMixins/_TrackingMixin.py +26 -14
- scitex/plt/_subplots/_AxisWrapperMixins/_UnitAwareMixin.py +80 -73
- scitex/plt/_subplots/_AxisWrapperMixins/__init__.py +79 -5
- scitex/plt/_subplots/_FigWrapper.py +97 -64
- scitex/plt/_subplots/_SubplotsWrapper.py +161 -84
- scitex/plt/_subplots/__init__.py +10 -0
- scitex/plt/_subplots/_export_as_csv.py +124 -52
- scitex/plt/_subplots/_export_as_csv_formatters/__init__.py +9 -0
- scitex/plt/_subplots/_export_as_csv_formatters/_format_annotate.py +14 -23
- scitex/plt/_subplots/_export_as_csv_formatters/_format_bar.py +88 -38
- scitex/plt/_subplots/_export_as_csv_formatters/_format_barh.py +25 -31
- scitex/plt/_subplots/_export_as_csv_formatters/_format_boxplot.py +53 -23
- scitex/plt/_subplots/_export_as_csv_formatters/_format_contour.py +38 -25
- scitex/plt/_subplots/_export_as_csv_formatters/_format_contourf.py +17 -9
- scitex/plt/_subplots/_export_as_csv_formatters/_format_errorbar.py +70 -124
- scitex/plt/_subplots/_export_as_csv_formatters/_format_eventplot.py +30 -17
- scitex/plt/_subplots/_export_as_csv_formatters/_format_fill.py +31 -17
- scitex/plt/_subplots/_export_as_csv_formatters/_format_fill_between.py +33 -21
- scitex/plt/_subplots/_export_as_csv_formatters/_format_hexbin.py +14 -4
- scitex/plt/_subplots/_export_as_csv_formatters/_format_hist.py +43 -29
- scitex/plt/_subplots/_export_as_csv_formatters/_format_hist2d.py +14 -4
- scitex/plt/_subplots/_export_as_csv_formatters/_format_imshow.py +27 -11
- scitex/plt/_subplots/_export_as_csv_formatters/_format_imshow2d.py +34 -16
- scitex/plt/_subplots/_export_as_csv_formatters/_format_matshow.py +16 -8
- scitex/plt/_subplots/_export_as_csv_formatters/_format_pie.py +15 -6
- scitex/plt/_subplots/_export_as_csv_formatters/_format_plot.py +85 -46
- scitex/plt/_subplots/_export_as_csv_formatters/_format_plot_box.py +52 -27
- scitex/plt/_subplots/_export_as_csv_formatters/_format_plot_imshow.py +14 -1
- scitex/plt/_subplots/_export_as_csv_formatters/_format_plot_kde.py +27 -18
- scitex/plt/_subplots/_export_as_csv_formatters/_format_plot_scatter.py +14 -5
- scitex/plt/_subplots/_export_as_csv_formatters/_format_quiver.py +16 -8
- scitex/plt/_subplots/_export_as_csv_formatters/_format_scatter.py +17 -6
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_barplot.py +43 -26
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_boxplot.py +68 -47
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_heatmap.py +52 -64
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_histplot.py +55 -50
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_jointplot.py +23 -10
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_kdeplot.py +63 -29
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_lineplot.py +48 -40
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_pairplot.py +20 -6
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_scatterplot.py +44 -40
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_stripplot.py +46 -39
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_swarmplot.py +46 -39
- scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_violinplot.py +75 -94
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stem.py +12 -3
- scitex/plt/_subplots/_export_as_csv_formatters/_format_step.py +12 -3
- scitex/plt/_subplots/_export_as_csv_formatters/_format_streamplot.py +17 -9
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_bar.py +84 -0
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_barh.py +85 -0
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_conf_mat.py +31 -18
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_contour.py +54 -0
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_ecdf.py +24 -11
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_errorbar.py +120 -0
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_fillv.py +35 -31
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_heatmap.py +33 -23
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_image.py +44 -28
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_imshow.py +63 -0
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_joyplot.py +31 -12
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_line.py +34 -23
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_mean_ci.py +32 -26
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_mean_std.py +29 -23
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_median_iqr.py +32 -26
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_raster.py +21 -11
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_rectangle.py +84 -56
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_scatter.py +51 -0
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_scatter_hist.py +46 -34
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_shaded_line.py +46 -30
- scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_violin.py +51 -51
- scitex/plt/_subplots/_export_as_csv_formatters/_format_text.py +32 -31
- scitex/plt/_subplots/_export_as_csv_formatters/_format_violin.py +34 -31
- scitex/plt/_subplots/_export_as_csv_formatters/_format_violinplot.py +44 -37
- scitex/plt/_subplots/_export_as_csv_formatters/verify_formatters.py +91 -74
- scitex/plt/_tpl.py +6 -5
- scitex/plt/ax/_plot/__init__.py +24 -0
- scitex/plt/ax/_plot/_add_fitted_line.py +12 -11
- scitex/plt/ax/_plot/_plot_circular_hist.py +3 -1
- scitex/plt/ax/_plot/_plot_statistical_shaded_line.py +25 -19
- scitex/plt/ax/_plot/_stx_conf_mat.py +6 -3
- scitex/plt/ax/_plot/_stx_ecdf.py +9 -5
- scitex/plt/ax/_plot/_stx_fillv.py +4 -2
- scitex/plt/ax/_plot/_stx_heatmap.py +7 -4
- scitex/plt/ax/_plot/_stx_image.py +7 -5
- scitex/plt/ax/_plot/_stx_joyplot.py +32 -10
- scitex/plt/ax/_plot/_stx_raster.py +26 -11
- scitex/plt/ax/_plot/_stx_rectangle.py +2 -2
- scitex/plt/ax/_plot/_stx_shaded_line.py +15 -11
- scitex/plt/ax/_plot/_stx_violin.py +3 -1
- scitex/plt/ax/_style/_add_marginal_ax.py +6 -4
- scitex/plt/ax/_style/_auto_scale_axis.py +14 -10
- scitex/plt/ax/_style/_extend.py +3 -1
- scitex/plt/ax/_style/_force_aspect.py +5 -3
- scitex/plt/ax/_style/_format_units.py +2 -2
- scitex/plt/ax/_style/_hide_spines.py +5 -1
- scitex/plt/ax/_style/_map_ticks.py +5 -3
- scitex/plt/ax/_style/_rotate_labels.py +5 -4
- scitex/plt/ax/_style/_rotate_labels_v01.py +73 -63
- scitex/plt/ax/_style/_set_log_scale.py +120 -85
- scitex/plt/ax/_style/_set_meta.py +99 -76
- scitex/plt/ax/_style/_set_supxyt.py +33 -16
- scitex/plt/ax/_style/_set_xyt.py +27 -18
- scitex/plt/ax/_style/_share_axes.py +15 -5
- scitex/plt/ax/_style/_show_spines.py +58 -57
- scitex/plt/ax/_style/_style_barplot.py +1 -1
- scitex/plt/ax/_style/_style_boxplot.py +25 -14
- scitex/plt/ax/_style/_style_errorbar.py +0 -0
- scitex/plt/ax/_style/_style_scatter.py +1 -1
- scitex/plt/ax/_style/_style_suptitles.py +3 -3
- scitex/plt/ax/_style/_style_violinplot.py +8 -2
- scitex/plt/color/__init__.py +34 -2
- scitex/plt/color/_add_hue_col.py +1 -0
- scitex/plt/color/_colors.py +0 -1
- scitex/plt/color/_get_colors_from_conf_matap.py +3 -1
- scitex/plt/color/_vizualize_colors.py +0 -1
- scitex/plt/docs/FIGURE_ARCHITECTURE.md +155 -97
- scitex/plt/gallery/README.md +75 -0
- scitex/plt/gallery/__init__.py +29 -0
- scitex/plt/gallery/_generate.py +560 -0
- scitex/plt/gallery/_plots.py +594 -0
- scitex/plt/gallery/_registry.py +153 -0
- scitex/plt/io/__init__.py +53 -0
- scitex/plt/io/_bundle.py +490 -0
- scitex/plt/io/_layered_bundle.py +1343 -0
- scitex/plt/styles/SCITEX_STYLE.yaml +26 -0
- scitex/plt/styles/__init__.py +23 -9
- scitex/plt/styles/_plot_defaults.py +62 -61
- scitex/plt/styles/_plot_postprocess.py +126 -77
- scitex/plt/styles/_style_loader.py +0 -0
- scitex/plt/styles/presets.py +121 -18
- scitex/plt/utils/__init__.py +42 -3
- scitex/plt/utils/_close.py +8 -3
- scitex/plt/utils/_collect_figure_metadata.py +3033 -271
- scitex/plt/utils/_colorbar.py +15 -17
- scitex/plt/utils/_configure_mpl.py +26 -30
- scitex/plt/utils/_crop.py +87 -36
- scitex/plt/utils/_csv_column_naming.py +177 -72
- scitex/plt/utils/_dimension_viewer.py +7 -19
- scitex/plt/utils/_figure_from_axes_mm.py +70 -16
- scitex/plt/utils/_figure_mm.py +119 -3
- scitex/plt/utils/_get_actual_font.py +5 -4
- scitex/plt/utils/_histogram_utils.py +52 -48
- scitex/plt/utils/_hitmap.py +1643 -0
- scitex/plt/utils/_is_valid_axis.py +19 -13
- scitex/plt/utils/_mk_colorbar.py +3 -3
- scitex/plt/utils/_scientific_captions.py +202 -139
- scitex/plt/utils/_scitex_config.py +98 -98
- scitex/plt/utils/_units.py +0 -0
- scitex/plt/utils/metadata/__init__.py +61 -0
- scitex/plt/utils/metadata/_artist_extraction.py +119 -0
- scitex/plt/utils/metadata/_axes_metadata.py +93 -0
- scitex/plt/utils/metadata/_collection_artists.py +292 -0
- scitex/plt/utils/metadata/_core.py +207 -0
- scitex/plt/utils/metadata/_csv_column_extraction.py +186 -0
- scitex/plt/utils/metadata/_csv_hash.py +115 -0
- scitex/plt/utils/metadata/_csv_verification.py +95 -0
- scitex/plt/utils/metadata/_data_linkage.py +263 -0
- scitex/plt/utils/metadata/_dimensions.py +242 -0
- scitex/plt/utils/metadata/_editable_export.py +405 -0
- scitex/plt/utils/metadata/_figure_metadata.py +58 -0
- scitex/plt/utils/metadata/_geometry_extraction.py +570 -0
- scitex/plt/utils/metadata/_image_text_artists.py +168 -0
- scitex/plt/utils/metadata/_label_parsing.py +82 -0
- scitex/plt/utils/metadata/_legend_extraction.py +120 -0
- scitex/plt/utils/metadata/_line_artists.py +367 -0
- scitex/plt/utils/metadata/_line_semantic_handling.py +173 -0
- scitex/plt/utils/metadata/_patch_artists.py +211 -0
- scitex/plt/utils/metadata/_plot_content.py +26 -0
- scitex/plt/utils/metadata/_plot_type_detection.py +184 -0
- scitex/plt/utils/metadata/_precision.py +134 -0
- scitex/plt/utils/metadata/_precision_config.py +68 -0
- scitex/plt/utils/metadata/_precision_sections.py +211 -0
- scitex/plt/utils/metadata/_recipe_extraction.py +267 -0
- scitex/plt/utils/metadata/_style_parsing.py +174 -0
- scitex/repro/_RandomStateManager.py +33 -38
- scitex/repro/__init__.py +16 -7
- scitex/repro/_gen_ID.py +7 -9
- scitex/repro/_gen_timestamp.py +7 -6
- scitex/repro/_hash_array.py +8 -12
- scitex/reproduce/__init__.py +1 -1
- scitex/resource/_get_processor_usages.py +3 -1
- scitex/resource/_log_processor_usages.py +3 -1
- scitex/rng/__init__.py +1 -1
- scitex/schema/README.md +178 -0
- scitex/schema/__init__.py +237 -0
- scitex/schema/_canvas.py +444 -0
- scitex/schema/_plot.py +1015 -0
- scitex/schema/_stats.py +762 -0
- scitex/schema/_validation.py +590 -0
- scitex/scholar/.legacy/Scholar.py +5 -12
- scitex/scholar/.legacy/_Scholar.py +66 -99
- scitex/scholar/.legacy/_ScholarAPI.py +75 -66
- scitex/scholar/.legacy/_tmp/search_engine/_BaseSearchEngine.py +3 -3
- scitex/scholar/.legacy/_tmp/search_engine/_UnifiedSearcher.py +4 -9
- scitex/scholar/.legacy/_tmp/search_engine/__init__.py +14 -21
- scitex/scholar/.legacy/_tmp/search_engine/local/_LocalSearchEngine.py +40 -37
- scitex/scholar/.legacy/_tmp/search_engine/local/_VectorSearchEngine.py +31 -28
- scitex/scholar/.legacy/_tmp/search_engine/web/_ArxivSearchEngine.py +74 -65
- scitex/scholar/.legacy/_tmp/search_engine/web/_CrossRefSearchEngine.py +122 -116
- scitex/scholar/.legacy/_tmp/search_engine/web/_GoogleScholarSearchEngine.py +65 -59
- scitex/scholar/.legacy/_tmp/search_engine/web/_PubMedSearchEngine.py +121 -107
- scitex/scholar/.legacy/_tmp/search_engine/web/_SemanticScholarSearchEngine.py +5 -12
- scitex/scholar/.legacy/database/_DatabaseEntry.py +49 -45
- scitex/scholar/.legacy/database/_DatabaseIndex.py +131 -94
- scitex/scholar/.legacy/database/_LibraryManager.py +65 -63
- scitex/scholar/.legacy/database/_PaperDatabase.py +138 -124
- scitex/scholar/.legacy/database/_ScholarDatabaseIntegration.py +14 -36
- scitex/scholar/.legacy/database/_StorageIntegratedDB.py +192 -156
- scitex/scholar/.legacy/database/_ZoteroCompatibleDB.py +300 -237
- scitex/scholar/.legacy/database/__init__.py +2 -1
- scitex/scholar/.legacy/database/manage.py +92 -84
- scitex/scholar/.legacy/lookup/_LookupIndex.py +157 -101
- scitex/scholar/.legacy/lookup/__init__.py +2 -1
- scitex/scholar/.legacy/metadata/doi/batch/_MetadataHandlerForBatchDOIResolution.py +4 -9
- scitex/scholar/.legacy/metadata/doi/batch/_ProgressManagerForBatchDOIResolution.py +10 -23
- scitex/scholar/.legacy/metadata/doi/batch/_SourceStatsManagerForBatchDOIResolution.py +4 -9
- scitex/scholar/.legacy/metadata/doi/batch/__init__.py +3 -1
- scitex/scholar/.legacy/metadata/doi/resolvers/_BatchDOIResolver.py +10 -25
- scitex/scholar/.legacy/metadata/doi/resolvers/_BibTeXDOIResolver.py +19 -49
- scitex/scholar/.legacy/metadata/doi/resolvers/_DOIResolver.py +1 -0
- scitex/scholar/.legacy/metadata/doi/resolvers/_SingleDOIResolver.py +8 -20
- scitex/scholar/.legacy/metadata/doi/sources/.combined-SemanticScholarSource/_SemanticScholarSource.py +37 -35
- scitex/scholar/.legacy/metadata/doi/sources/.combined-SemanticScholarSource/_SemanticScholarSourceEnhanced.py +49 -37
- scitex/scholar/.legacy/metadata/doi/sources/_ArXivSource.py +11 -30
- scitex/scholar/.legacy/metadata/doi/sources/_BaseDOISource.py +19 -47
- scitex/scholar/.legacy/metadata/doi/sources/_CrossRefLocalSource.py +1 -0
- scitex/scholar/.legacy/metadata/doi/sources/_CrossRefSource.py +12 -33
- scitex/scholar/.legacy/metadata/doi/sources/_OpenAlexSource.py +8 -20
- scitex/scholar/.legacy/metadata/doi/sources/_PubMedSource.py +10 -27
- scitex/scholar/.legacy/metadata/doi/sources/_SemanticScholarSource.py +11 -29
- scitex/scholar/.legacy/metadata/doi/sources/_SourceManager.py +8 -21
- scitex/scholar/.legacy/metadata/doi/sources/_SourceResolutionStrategy.py +24 -55
- scitex/scholar/.legacy/metadata/doi/sources/_SourceRotationManager.py +8 -21
- scitex/scholar/.legacy/metadata/doi/sources/_URLDOISource.py +9 -16
- scitex/scholar/.legacy/metadata/doi/sources/_UnifiedSource.py +8 -22
- scitex/scholar/.legacy/metadata/doi/sources/__init__.py +1 -0
- scitex/scholar/.legacy/metadata/doi/utils/_PubMedConverter.py +4 -8
- scitex/scholar/.legacy/metadata/doi/utils/_RateLimitHandler.py +17 -43
- scitex/scholar/.legacy/metadata/doi/utils/_TextNormalizer.py +8 -18
- scitex/scholar/.legacy/metadata/doi/utils/_URLDOIExtractor.py +4 -8
- scitex/scholar/.legacy/metadata/doi/utils/__init__.py +1 -0
- scitex/scholar/.legacy/metadata/doi/utils/_to_complete_metadata_structure.py +1 -0
- scitex/scholar/.legacy/metadata/enrichment/_LibraryEnricher.py +2 -3
- scitex/scholar/.legacy/metadata/enrichment/enrichers/_ImpactFactorEnricher.py +6 -12
- scitex/scholar/.legacy/metadata/enrichment/enrichers/_SmartEnricher.py +5 -10
- scitex/scholar/.legacy/metadata/enrichment/sources/_UnifiedMetadataSource.py +4 -5
- scitex/scholar/.legacy/metadata/query_to_full_meta_json.py +8 -12
- scitex/scholar/.legacy/metadata/urls/_URLMetadataHandler.py +3 -3
- scitex/scholar/.legacy/metadata/urls/_ZoteroTranslatorRunner.py +15 -21
- scitex/scholar/.legacy/metadata/urls/__init__.py +3 -3
- scitex/scholar/.legacy/metadata/urls/_finder.py +4 -6
- scitex/scholar/.legacy/metadata/urls/_handler.py +7 -15
- scitex/scholar/.legacy/metadata/urls/_resolver.py +6 -12
- scitex/scholar/.legacy/search/_Embedder.py +74 -69
- scitex/scholar/.legacy/search/_SemanticSearch.py +91 -90
- scitex/scholar/.legacy/search/_SemanticSearchEngine.py +104 -109
- scitex/scholar/.legacy/search/_UnifiedSearcher.py +530 -471
- scitex/scholar/.legacy/search/_VectorDatabase.py +111 -92
- scitex/scholar/.legacy/search/__init__.py +1 -0
- scitex/scholar/.legacy/storage/_EnhancedStorageManager.py +182 -154
- scitex/scholar/.legacy/storage/__init__.py +2 -1
- scitex/scholar/__init__.py +0 -2
- scitex/scholar/__main__.py +1 -3
- scitex/scholar/auth/ScholarAuthManager.py +13 -36
- scitex/scholar/auth/core/AuthenticationGateway.py +15 -29
- scitex/scholar/auth/core/BrowserAuthenticator.py +22 -57
- scitex/scholar/auth/core/StrategyResolver.py +10 -27
- scitex/scholar/auth/core/__init__.py +5 -1
- scitex/scholar/auth/gateway/_OpenURLLinkFinder.py +11 -21
- scitex/scholar/auth/gateway/_OpenURLResolver.py +10 -18
- scitex/scholar/auth/gateway/_resolve_functions.py +3 -3
- scitex/scholar/auth/providers/BaseAuthenticator.py +1 -0
- scitex/scholar/auth/providers/EZProxyAuthenticator.py +7 -14
- scitex/scholar/auth/providers/OpenAthensAuthenticator.py +29 -57
- scitex/scholar/auth/providers/ShibbolethAuthenticator.py +87 -73
- scitex/scholar/auth/session/AuthCacheManager.py +12 -22
- scitex/scholar/auth/session/SessionManager.py +4 -6
- scitex/scholar/auth/sso/BaseSSOAutomator.py +13 -19
- scitex/scholar/auth/sso/OpenAthensSSOAutomator.py +16 -45
- scitex/scholar/auth/sso/SSOAutomator.py +8 -15
- scitex/scholar/auth/sso/UniversityOfMelbourneSSOAutomator.py +13 -23
- scitex/scholar/browser/ScholarBrowserManager.py +31 -56
- scitex/scholar/browser/__init__.py +1 -0
- scitex/scholar/browser/utils/click_and_wait.py +3 -4
- scitex/scholar/browser/utils/close_unwanted_pages.py +4 -7
- scitex/scholar/browser/utils/wait_redirects.py +15 -40
- scitex/scholar/citation_graph/__init__.py +0 -0
- scitex/scholar/citation_graph/builder.py +3 -7
- scitex/scholar/citation_graph/database.py +4 -11
- scitex/scholar/citation_graph/example.py +5 -10
- scitex/scholar/citation_graph/models.py +0 -0
- scitex/scholar/cli/_url_utils.py +1 -1
- scitex/scholar/cli/chrome.py +5 -3
- scitex/scholar/cli/download_pdf.py +13 -14
- scitex/scholar/cli/handlers/bibtex_handler.py +4 -12
- scitex/scholar/cli/handlers/doi_handler.py +1 -3
- scitex/scholar/cli/handlers/project_handler.py +6 -20
- scitex/scholar/cli/open_browser.py +41 -39
- scitex/scholar/cli/open_browser_auto.py +31 -39
- scitex/scholar/cli/open_browser_monitored.py +27 -24
- scitex/scholar/config/ScholarConfig.py +5 -8
- scitex/scholar/config/__init__.py +1 -0
- scitex/scholar/config/core/_CascadeConfig.py +3 -3
- scitex/scholar/config/core/_PathManager.py +16 -28
- scitex/scholar/core/Paper.py +79 -78
- scitex/scholar/core/Papers.py +16 -27
- scitex/scholar/core/Scholar.py +98 -229
- scitex/scholar/core/journal_normalizer.py +52 -49
- scitex/scholar/core/oa_cache.py +27 -23
- scitex/scholar/core/open_access.py +17 -8
- scitex/scholar/docs/template.py +4 -3
- scitex/scholar/docs/to_claude/examples/example-python-project-scitex/scripts/mnist/clf_svm.py +0 -0
- scitex/scholar/docs/to_claude/examples/example-python-project-scitex/scripts/mnist/download.py +0 -0
- scitex/scholar/docs/to_claude/examples/example-python-project-scitex/scripts/mnist/plot_conf_mat.py +0 -0
- scitex/scholar/docs/to_claude/examples/example-python-project-scitex/scripts/mnist/plot_digits.py +0 -0
- scitex/scholar/docs/to_claude/examples/example-python-project-scitex/scripts/mnist/plot_umap_space.py +0 -0
- scitex/scholar/examples/00_config.py +10 -9
- scitex/scholar/examples/01_auth.py +3 -0
- scitex/scholar/examples/02_browser.py +14 -10
- scitex/scholar/examples/03_01-engine.py +3 -0
- scitex/scholar/examples/03_02-engine-for-bibtex.py +4 -3
- scitex/scholar/examples/04_01-url.py +9 -9
- scitex/scholar/examples/04_02-url-for-bibtex.py +7 -3
- scitex/scholar/examples/04_02-url-for-dois.py +87 -97
- scitex/scholar/examples/05_download_pdf.py +10 -4
- scitex/scholar/examples/06_find_and_download.py +6 -6
- scitex/scholar/examples/06_parse_bibtex.py +17 -17
- scitex/scholar/examples/07_storage_integration.py +6 -9
- scitex/scholar/examples/99_fullpipeline-for-bibtex.py +14 -15
- scitex/scholar/examples/99_fullpipeline-for-one-entry.py +31 -23
- scitex/scholar/examples/99_maintenance.py +3 -0
- scitex/scholar/examples/dev.py +2 -3
- scitex/scholar/examples/zotero_integration.py +11 -18
- scitex/scholar/impact_factor/ImpactFactorEngine.py +7 -9
- scitex/scholar/impact_factor/estimation/__init__.py +4 -4
- scitex/scholar/impact_factor/estimation/core/__init__.py +3 -7
- scitex/scholar/impact_factor/estimation/core/cache_manager.py +223 -211
- scitex/scholar/impact_factor/estimation/core/calculator.py +165 -131
- scitex/scholar/impact_factor/estimation/core/journal_matcher.py +217 -172
- scitex/scholar/impact_factor/jcr/ImpactFactorJCREngine.py +6 -14
- scitex/scholar/impact_factor/jcr/build_database.py +4 -3
- scitex/scholar/integration/base.py +9 -17
- scitex/scholar/integration/mendeley/exporter.py +2 -4
- scitex/scholar/integration/mendeley/importer.py +3 -3
- scitex/scholar/integration/mendeley/linker.py +3 -3
- scitex/scholar/integration/mendeley/mapper.py +9 -6
- scitex/scholar/integration/zotero/__main__.py +26 -43
- scitex/scholar/integration/zotero/exporter.py +15 -11
- scitex/scholar/integration/zotero/importer.py +12 -10
- scitex/scholar/integration/zotero/linker.py +8 -12
- scitex/scholar/integration/zotero/mapper.py +17 -12
- scitex/scholar/metadata_engines/.combined-SemanticScholarSource/_SemanticScholarSource.py +37 -35
- scitex/scholar/metadata_engines/.combined-SemanticScholarSource/_SemanticScholarSourceEnhanced.py +47 -35
- scitex/scholar/metadata_engines/ScholarEngine.py +21 -43
- scitex/scholar/metadata_engines/__init__.py +1 -0
- scitex/scholar/metadata_engines/individual/ArXivEngine.py +15 -37
- scitex/scholar/metadata_engines/individual/CrossRefEngine.py +15 -42
- scitex/scholar/metadata_engines/individual/CrossRefLocalEngine.py +24 -45
- scitex/scholar/metadata_engines/individual/OpenAlexEngine.py +11 -21
- scitex/scholar/metadata_engines/individual/PubMedEngine.py +10 -27
- scitex/scholar/metadata_engines/individual/SemanticScholarEngine.py +28 -35
- scitex/scholar/metadata_engines/individual/URLDOIEngine.py +11 -22
- scitex/scholar/metadata_engines/individual/_BaseDOIEngine.py +20 -49
- scitex/scholar/metadata_engines/utils/_PubMedConverter.py +4 -8
- scitex/scholar/metadata_engines/utils/_URLDOIExtractor.py +5 -10
- scitex/scholar/metadata_engines/utils/__init__.py +2 -0
- scitex/scholar/metadata_engines/utils/_metadata2bibtex.py +3 -0
- scitex/scholar/metadata_engines/utils/_standardize_metadata.py +2 -3
- scitex/scholar/pdf_download/ScholarPDFDownloader.py +25 -37
- scitex/scholar/pdf_download/strategies/chrome_pdf_viewer.py +11 -19
- scitex/scholar/pdf_download/strategies/direct_download.py +5 -9
- scitex/scholar/pdf_download/strategies/manual_download_fallback.py +3 -3
- scitex/scholar/pdf_download/strategies/manual_download_utils.py +6 -13
- scitex/scholar/pdf_download/strategies/open_access_download.py +49 -31
- scitex/scholar/pdf_download/strategies/response_body.py +8 -19
- scitex/scholar/pipelines/ScholarPipelineBibTeX.py +9 -18
- scitex/scholar/pipelines/ScholarPipelineMetadataParallel.py +25 -26
- scitex/scholar/pipelines/ScholarPipelineMetadataSingle.py +62 -23
- scitex/scholar/pipelines/ScholarPipelineParallel.py +13 -30
- scitex/scholar/pipelines/ScholarPipelineSearchParallel.py +299 -220
- scitex/scholar/pipelines/ScholarPipelineSearchSingle.py +202 -165
- scitex/scholar/pipelines/ScholarPipelineSingle.py +25 -51
- scitex/scholar/pipelines/SearchQueryParser.py +55 -55
- scitex/scholar/search_engines/ScholarSearchEngine.py +31 -27
- scitex/scholar/search_engines/_BaseSearchEngine.py +20 -23
- scitex/scholar/search_engines/individual/ArXivSearchEngine.py +53 -35
- scitex/scholar/search_engines/individual/CrossRefSearchEngine.py +47 -40
- scitex/scholar/search_engines/individual/OpenAlexSearchEngine.py +55 -50
- scitex/scholar/search_engines/individual/PubMedSearchEngine.py +8 -10
- scitex/scholar/search_engines/individual/SemanticScholarSearchEngine.py +55 -49
- scitex/scholar/storage/BibTeXHandler.py +150 -95
- scitex/scholar/storage/PaperIO.py +3 -6
- scitex/scholar/storage/ScholarLibrary.py +70 -49
- scitex/scholar/storage/_DeduplicationManager.py +52 -25
- scitex/scholar/storage/_LibraryCacheManager.py +19 -46
- scitex/scholar/storage/_LibraryManager.py +65 -175
- scitex/scholar/url_finder/ScholarURLFinder.py +9 -25
- scitex/scholar/url_finder/strategies/find_pdf_urls_by_direct_links.py +1 -1
- scitex/scholar/url_finder/strategies/find_pdf_urls_by_href.py +6 -10
- scitex/scholar/url_finder/strategies/find_pdf_urls_by_navigation.py +4 -6
- scitex/scholar/url_finder/strategies/find_pdf_urls_by_publisher_patterns.py +8 -15
- scitex/scholar/url_finder/strategies/find_pdf_urls_by_zotero_translators.py +3 -3
- scitex/scholar/url_finder/strategies/find_supplementary_urls_by_href.py +3 -3
- scitex/scholar/url_finder/translators/core/patterns.py +6 -4
- scitex/scholar/url_finder/translators/core/registry.py +6 -9
- scitex/scholar/url_finder/translators/individual/BOFiP_Impots.py +60 -52
- scitex/scholar/url_finder/translators/individual/Baidu_Scholar.py +54 -62
- scitex/scholar/url_finder/translators/individual/Bangkok_Post.py +38 -44
- scitex/scholar/url_finder/translators/individual/Baruch_Foundation.py +43 -47
- scitex/scholar/url_finder/translators/individual/Beobachter.py +46 -50
- scitex/scholar/url_finder/translators/individual/Bezneng_Gajit.py +37 -41
- scitex/scholar/url_finder/translators/individual/BibLaTeX.py +59 -52
- scitex/scholar/url_finder/translators/individual/BibTeX.py +83 -79
- scitex/scholar/url_finder/translators/individual/Biblio_com.py +48 -51
- scitex/scholar/url_finder/translators/individual/Bibliontology_RDF.py +58 -56
- scitex/scholar/url_finder/translators/individual/Camara_Brasileira_do_Livro_ISBN.py +102 -99
- scitex/scholar/url_finder/translators/individual/CanLII.py +49 -43
- scitex/scholar/url_finder/translators/individual/Canada_com.py +36 -40
- scitex/scholar/url_finder/translators/individual/Canadian_Letters_and_Images.py +43 -43
- scitex/scholar/url_finder/translators/individual/Canadiana_ca.py +77 -66
- scitex/scholar/url_finder/translators/individual/Cascadilla_Proceedings_Project.py +68 -62
- scitex/scholar/url_finder/translators/individual/Central_and_Eastern_European_Online_Library_Journals.py +60 -60
- scitex/scholar/url_finder/translators/individual/Champlain_Society_Collection.py +63 -61
- scitex/scholar/url_finder/translators/individual/Chicago_Journal_of_Theoretical_Computer_Science.py +74 -58
- scitex/scholar/url_finder/translators/individual/Christian_Science_Monitor.py +32 -38
- scitex/scholar/url_finder/translators/individual/Columbia_University_Press.py +51 -47
- scitex/scholar/url_finder/translators/individual/Common_Place.py +66 -57
- scitex/scholar/url_finder/translators/individual/Cornell_LII.py +66 -62
- scitex/scholar/url_finder/translators/individual/Cornell_University_Press.py +38 -45
- scitex/scholar/url_finder/translators/individual/CourtListener.py +52 -56
- scitex/scholar/url_finder/translators/individual/DAI_Zenon.py +53 -54
- scitex/scholar/url_finder/translators/individual/access_medicine.py +27 -33
- scitex/scholar/url_finder/translators/individual/acm.py +1 -1
- scitex/scholar/url_finder/translators/individual/acm_digital_library.py +93 -63
- scitex/scholar/url_finder/translators/individual/airiti.py +3 -1
- scitex/scholar/url_finder/translators/individual/aosic.py +3 -1
- scitex/scholar/url_finder/translators/individual/archive_ouverte_aosic.py +3 -1
- scitex/scholar/url_finder/translators/individual/archive_ouverte_en_sciences_de_l_information_et_de_la_communication___aosic_.py +6 -2
- scitex/scholar/url_finder/translators/individual/artforum.py +35 -27
- scitex/scholar/url_finder/translators/individual/arxiv.py +1 -1
- scitex/scholar/url_finder/translators/individual/arxiv_org.py +8 -4
- scitex/scholar/url_finder/translators/individual/atlanta_journal_constitution.py +22 -18
- scitex/scholar/url_finder/translators/individual/atypon_journals.py +19 -11
- scitex/scholar/url_finder/translators/individual/austlii_and_nzlii.py +48 -44
- scitex/scholar/url_finder/translators/individual/australian_dictionary_of_biography.py +21 -17
- scitex/scholar/url_finder/translators/individual/bailii.py +22 -19
- scitex/scholar/url_finder/translators/individual/bbc.py +46 -42
- scitex/scholar/url_finder/translators/individual/bbc_genome.py +37 -25
- scitex/scholar/url_finder/translators/individual/biblioteca_nacional_de_maestros.py +24 -20
- scitex/scholar/url_finder/translators/individual/bibliotheque_archives_nationale_quebec_pistard.py +42 -43
- scitex/scholar/url_finder/translators/individual/bibliotheque_archives_nationales_quebec.py +87 -81
- scitex/scholar/url_finder/translators/individual/bibliotheque_nationale_france.py +39 -37
- scitex/scholar/url_finder/translators/individual/bibsys.py +32 -28
- scitex/scholar/url_finder/translators/individual/bioconductor.py +58 -52
- scitex/scholar/url_finder/translators/individual/biomed_central.py +23 -15
- scitex/scholar/url_finder/translators/individual/biorxiv.py +26 -13
- scitex/scholar/url_finder/translators/individual/blogger.py +39 -43
- scitex/scholar/url_finder/translators/individual/bloomberg.py +48 -52
- scitex/scholar/url_finder/translators/individual/bloomsbury_food_library.py +37 -37
- scitex/scholar/url_finder/translators/individual/bluesky.py +30 -28
- scitex/scholar/url_finder/translators/individual/bnf_isbn.py +1 -1
- scitex/scholar/url_finder/translators/individual/bocc.py +66 -60
- scitex/scholar/url_finder/translators/individual/boe.py +52 -52
- scitex/scholar/url_finder/translators/individual/brill.py +3 -1
- scitex/scholar/url_finder/translators/individual/business_standard.py +36 -38
- scitex/scholar/url_finder/translators/individual/cabi_cab_abstracts.py +39 -41
- scitex/scholar/url_finder/translators/individual/cambridge.py +3 -1
- scitex/scholar/url_finder/translators/individual/cambridge_core.py +30 -24
- scitex/scholar/url_finder/translators/individual/caod.py +50 -46
- scitex/scholar/url_finder/translators/individual/cbc.py +91 -67
- scitex/scholar/url_finder/translators/individual/ccfr_bnf.py +49 -53
- scitex/scholar/url_finder/translators/individual/cia_world_factbook.py +43 -33
- scitex/scholar/url_finder/translators/individual/crossref_rest.py +208 -174
- scitex/scholar/url_finder/translators/individual/current_affairs.py +29 -35
- scitex/scholar/url_finder/translators/individual/dabi.py +70 -66
- scitex/scholar/url_finder/translators/individual/dagens_nyheter.py +3 -1
- scitex/scholar/url_finder/translators/individual/dagstuhl.py +10 -15
- scitex/scholar/url_finder/translators/individual/dar_almandumah.py +13 -9
- scitex/scholar/url_finder/translators/individual/dart_europe.py +19 -22
- scitex/scholar/url_finder/translators/individual/data_gov.py +2 -2
- scitex/scholar/url_finder/translators/individual/databrary.py +27 -28
- scitex/scholar/url_finder/translators/individual/datacite_json.py +152 -137
- scitex/scholar/url_finder/translators/individual/dataverse.py +68 -64
- scitex/scholar/url_finder/translators/individual/daum_news.py +38 -38
- scitex/scholar/url_finder/translators/individual/dblp.py +4 -8
- scitex/scholar/url_finder/translators/individual/dblp_computer_science_bibliography.py +8 -3
- scitex/scholar/url_finder/translators/individual/dbpia.py +5 -3
- scitex/scholar/url_finder/translators/individual/defense_technical_information_center.py +30 -28
- scitex/scholar/url_finder/translators/individual/delpher.py +102 -79
- scitex/scholar/url_finder/translators/individual/demographic_research.py +35 -31
- scitex/scholar/url_finder/translators/individual/denik_cz.py +58 -54
- scitex/scholar/url_finder/translators/individual/depatisnet.py +7 -10
- scitex/scholar/url_finder/translators/individual/der_freitag.py +81 -66
- scitex/scholar/url_finder/translators/individual/der_spiegel.py +56 -54
- scitex/scholar/url_finder/translators/individual/digibib_net.py +3 -1
- scitex/scholar/url_finder/translators/individual/digizeitschriften.py +3 -1
- scitex/scholar/url_finder/translators/individual/dpla.py +13 -14
- scitex/scholar/url_finder/translators/individual/dspace.py +2 -2
- scitex/scholar/url_finder/translators/individual/ebrary.py +3 -1
- scitex/scholar/url_finder/translators/individual/ebscohost.py +3 -1
- scitex/scholar/url_finder/translators/individual/electronic_colloquium_on_computational_complexity.py +3 -1
- scitex/scholar/url_finder/translators/individual/elife.py +3 -1
- scitex/scholar/url_finder/translators/individual/elsevier_health_journals.py +3 -1
- scitex/scholar/url_finder/translators/individual/emerald.py +3 -1
- scitex/scholar/url_finder/translators/individual/emerald_insight.py +3 -1
- scitex/scholar/url_finder/translators/individual/epicurious.py +3 -1
- scitex/scholar/url_finder/translators/individual/eurogamerusgamer.py +3 -1
- scitex/scholar/url_finder/translators/individual/fachportal_padagogik.py +3 -1
- scitex/scholar/url_finder/translators/individual/frontiers.py +1 -1
- scitex/scholar/url_finder/translators/individual/gale_databases.py +3 -1
- scitex/scholar/url_finder/translators/individual/gms_german_medical_science.py +6 -2
- scitex/scholar/url_finder/translators/individual/ieee_computer_society.py +6 -2
- scitex/scholar/url_finder/translators/individual/ieee_xplore.py +41 -35
- scitex/scholar/url_finder/translators/individual/inter_research_science_center.py +6 -2
- scitex/scholar/url_finder/translators/individual/jisc_historical_texts.py +3 -1
- scitex/scholar/url_finder/translators/individual/jstor.py +14 -12
- scitex/scholar/url_finder/translators/individual/korean_national_library.py +3 -1
- scitex/scholar/url_finder/translators/individual/la_times.py +3 -1
- scitex/scholar/url_finder/translators/individual/landesbibliographie_baden_wurttemberg.py +3 -1
- scitex/scholar/url_finder/translators/individual/legislative_insight.py +3 -1
- scitex/scholar/url_finder/translators/individual/libraries_tasmania.py +3 -1
- scitex/scholar/url_finder/translators/individual/library_catalog__koha_.py +3 -1
- scitex/scholar/url_finder/translators/individual/lingbuzz.py +2 -2
- scitex/scholar/url_finder/translators/individual/max_planck_institute_for_the_history_of_science_virtual_laboratory_library.py +3 -1
- scitex/scholar/url_finder/translators/individual/mdpi.py +12 -6
- scitex/scholar/url_finder/translators/individual/microbiology_society_journals.py +3 -1
- scitex/scholar/url_finder/translators/individual/midas_journals.py +3 -1
- scitex/scholar/url_finder/translators/individual/nagoya_university_opac.py +3 -1
- scitex/scholar/url_finder/translators/individual/nature_publishing_group.py +32 -19
- scitex/scholar/url_finder/translators/individual/ntsb_accident_reports.py +3 -1
- scitex/scholar/url_finder/translators/individual/openedition_journals.py +8 -4
- scitex/scholar/url_finder/translators/individual/orcid.py +16 -15
- scitex/scholar/url_finder/translators/individual/oxford.py +25 -19
- scitex/scholar/url_finder/translators/individual/oxford_dictionaries_premium.py +3 -1
- scitex/scholar/url_finder/translators/individual/ozon_ru.py +3 -1
- scitex/scholar/url_finder/translators/individual/plos.py +9 -12
- scitex/scholar/url_finder/translators/individual/polygon.py +3 -1
- scitex/scholar/url_finder/translators/individual/primo.py +3 -1
- scitex/scholar/url_finder/translators/individual/project_muse.py +3 -1
- scitex/scholar/url_finder/translators/individual/pubfactory_journals.py +3 -1
- scitex/scholar/url_finder/translators/individual/pubmed.py +71 -65
- scitex/scholar/url_finder/translators/individual/pubmed_central.py +8 -6
- scitex/scholar/url_finder/translators/individual/rechtspraak_nl.py +3 -1
- scitex/scholar/url_finder/translators/individual/sage_journals.py +25 -17
- scitex/scholar/url_finder/translators/individual/sciencedirect.py +36 -17
- scitex/scholar/url_finder/translators/individual/semantics_visual_library.py +3 -1
- scitex/scholar/url_finder/translators/individual/silverchair.py +70 -52
- scitex/scholar/url_finder/translators/individual/sora.py +3 -1
- scitex/scholar/url_finder/translators/individual/springer.py +15 -11
- scitex/scholar/url_finder/translators/individual/ssrn.py +3 -3
- scitex/scholar/url_finder/translators/individual/stanford_encyclopedia_of_philosophy.py +3 -1
- scitex/scholar/url_finder/translators/individual/superlib.py +3 -1
- scitex/scholar/url_finder/translators/individual/treesearch.py +3 -1
- scitex/scholar/url_finder/translators/individual/university_of_chicago_press_books.py +3 -1
- scitex/scholar/url_finder/translators/individual/vlex.py +3 -1
- scitex/scholar/url_finder/translators/individual/web_of_science.py +3 -1
- scitex/scholar/url_finder/translators/individual/web_of_science_nextgen.py +3 -1
- scitex/scholar/url_finder/translators/individual/wiley.py +31 -25
- scitex/scholar/url_finder/translators/individual/wilson_center_digital_archive.py +3 -1
- scitex/scholar/utils/bibtex/_parse_bibtex.py +3 -3
- scitex/scholar/utils/cleanup/_cleanup_scholar_processes.py +5 -9
- scitex/scholar/utils/text/_TextNormalizer.py +249 -176
- scitex/scholar/utils/validation/DOIValidator.py +31 -28
- scitex/scholar/utils/validation/__init__.py +0 -0
- scitex/scholar/utils/validation/validate_library_dois.py +61 -57
- scitex/scholar/zotero/__init__.py +1 -1
- scitex/security/cli.py +7 -20
- scitex/security/github.py +45 -32
- scitex/session/__init__.py +8 -9
- scitex/session/_decorator.py +49 -42
- scitex/session/_lifecycle.py +39 -39
- scitex/session/_manager.py +24 -20
- scitex/sh/__init__.py +4 -3
- scitex/sh/_execute.py +10 -7
- scitex/sh/_security.py +3 -3
- scitex/sh/_types.py +2 -3
- scitex/stats/__init__.py +174 -6
- scitex/stats/_schema.py +42 -569
- scitex/stats/auto/__init__.py +188 -0
- scitex/stats/auto/_context.py +331 -0
- scitex/stats/auto/_formatting.py +679 -0
- scitex/stats/auto/_rules.py +901 -0
- scitex/stats/auto/_selector.py +554 -0
- scitex/stats/auto/_styles.py +721 -0
- scitex/stats/correct/__init__.py +4 -4
- scitex/stats/correct/_correct_bonferroni.py +43 -34
- scitex/stats/correct/_correct_fdr.py +14 -40
- scitex/stats/correct/_correct_fdr_.py +39 -46
- scitex/stats/correct/_correct_holm.py +14 -32
- scitex/stats/correct/_correct_sidak.py +36 -21
- scitex/stats/descriptive/_circular.py +20 -21
- scitex/stats/descriptive/_describe.py +19 -5
- scitex/stats/descriptive/_nan.py +5 -7
- scitex/stats/descriptive/_real.py +4 -3
- scitex/stats/effect_sizes/__init__.py +10 -11
- scitex/stats/effect_sizes/_cliffs_delta.py +35 -32
- scitex/stats/effect_sizes/_cohens_d.py +30 -31
- scitex/stats/effect_sizes/_epsilon_squared.py +19 -22
- scitex/stats/effect_sizes/_eta_squared.py +23 -27
- scitex/stats/effect_sizes/_prob_superiority.py +18 -21
- scitex/stats/io/__init__.py +29 -0
- scitex/stats/io/_bundle.py +156 -0
- scitex/stats/posthoc/__init__.py +3 -3
- scitex/stats/posthoc/_dunnett.py +75 -55
- scitex/stats/posthoc/_games_howell.py +61 -43
- scitex/stats/posthoc/_tukey_hsd.py +42 -34
- scitex/stats/power/__init__.py +2 -2
- scitex/stats/power/_power.py +56 -56
- scitex/stats/tests/__init__.py +1 -1
- scitex/stats/tests/correlation/__init__.py +1 -1
- scitex/stats/tests/correlation/_test_pearson.py +28 -38
- scitex/stats/utils/__init__.py +14 -17
- scitex/stats/utils/_effect_size.py +85 -78
- scitex/stats/utils/_formatters.py +49 -43
- scitex/stats/utils/_normalizers.py +7 -14
- scitex/stats/utils/_power.py +56 -56
- scitex/str/__init__.py +1 -0
- scitex/str/_clean_path.py +3 -3
- scitex/str/_factor_out_digits.py +86 -58
- scitex/str/_format_plot_text.py +180 -111
- scitex/str/_latex.py +19 -19
- scitex/str/_latex_fallback.py +9 -10
- scitex/str/_parse.py +3 -6
- scitex/str/_print_debug.py +13 -13
- scitex/str/_printc.py +2 -0
- scitex/str/_search.py +3 -3
- scitex/template/.legacy/_clone_project.py +9 -13
- scitex/template/__init__.py +10 -2
- scitex/template/_clone_project.py +7 -2
- scitex/template/_copy.py +1 -0
- scitex/template/_customize.py +3 -6
- scitex/template/_git_strategy.py +2 -3
- scitex/template/_rename.py +1 -0
- scitex/template/clone_pip_project.py +6 -7
- scitex/template/clone_research.py +7 -10
- scitex/template/clone_singularity.py +6 -7
- scitex/template/clone_writer_directory.py +6 -7
- scitex/tex/__init__.py +4 -0
- scitex/tex/_export.py +890 -0
- scitex/tex/_preview.py +26 -11
- scitex/tex/_to_vec.py +10 -7
- scitex/torch/__init__.py +11 -1
- scitex/types/_ArrayLike.py +2 -0
- scitex/types/_is_listed_X.py +3 -3
- scitex/units.py +110 -77
- scitex/utils/_compress_hdf5.py +3 -3
- scitex/utils/_email.py +8 -4
- scitex/utils/_notify.py +14 -8
- scitex/utils/_search.py +6 -6
- scitex/utils/_verify_scitex_format.py +17 -42
- scitex/utils/_verify_scitex_format_v01.py +12 -34
- scitex/utils/template.py +4 -3
- scitex/web/__init__.py +7 -1
- scitex/web/_scraping.py +54 -38
- scitex/web/_search_pubmed.py +30 -14
- scitex/writer/.legacy/Writer_v01-refactored.py +4 -4
- scitex/writer/.legacy/_compile.py +18 -28
- scitex/writer/Writer.py +8 -21
- scitex/writer/__init__.py +11 -11
- scitex/writer/_clone_writer_project.py +2 -6
- scitex/writer/_compile/__init__.py +1 -0
- scitex/writer/_compile/_parser.py +1 -0
- scitex/writer/_compile/_runner.py +35 -38
- scitex/writer/_compile/_validator.py +1 -0
- scitex/writer/_compile/manuscript.py +1 -0
- scitex/writer/_compile/revision.py +1 -0
- scitex/writer/_compile/supplementary.py +1 -0
- scitex/writer/_compile_async.py +5 -12
- scitex/writer/_project/__init__.py +1 -0
- scitex/writer/_project/_create.py +10 -25
- scitex/writer/_project/_trees.py +4 -9
- scitex/writer/_project/_validate.py +2 -3
- scitex/writer/_validate_tree_structures.py +7 -18
- scitex/writer/dataclasses/__init__.py +8 -10
- scitex/writer/dataclasses/config/_CONSTANTS.py +2 -3
- scitex/writer/dataclasses/config/_WriterConfig.py +4 -9
- scitex/writer/dataclasses/contents/_ManuscriptContents.py +14 -25
- scitex/writer/dataclasses/contents/_RevisionContents.py +21 -16
- scitex/writer/dataclasses/contents/_SupplementaryContents.py +21 -24
- scitex/writer/dataclasses/core/_Document.py +2 -3
- scitex/writer/dataclasses/core/_DocumentSection.py +8 -23
- scitex/writer/dataclasses/results/_CompilationResult.py +2 -3
- scitex/writer/dataclasses/results/_LaTeXIssue.py +3 -6
- scitex/writer/dataclasses/results/_SaveSectionsResponse.py +20 -9
- scitex/writer/dataclasses/results/_SectionReadResponse.py +24 -10
- scitex/writer/dataclasses/tree/_ConfigTree.py +7 -4
- scitex/writer/dataclasses/tree/_ManuscriptTree.py +10 -13
- scitex/writer/dataclasses/tree/_RevisionTree.py +16 -17
- scitex/writer/dataclasses/tree/_ScriptsTree.py +10 -5
- scitex/writer/dataclasses/tree/_SharedTree.py +10 -13
- scitex/writer/dataclasses/tree/_SupplementaryTree.py +15 -14
- scitex/writer/utils/.legacy_git_retry.py +3 -8
- scitex/writer/utils/_parse_latex_logs.py +2 -3
- scitex/writer/utils/_parse_script_args.py +20 -23
- scitex/writer/utils/_watch.py +5 -5
- {scitex-2.5.0.dist-info → scitex-2.7.3.dist-info}/METADATA +14 -10
- {scitex-2.5.0.dist-info → scitex-2.7.3.dist-info}/RECORD +1149 -985
- scitex/db/_sqlite3/_SQLite3Mixins/_ColumnMixin_v01-indentation-issues.py +0 -583
- scitex/io/memo.md +0 -2827
- scitex/plt/_subplots/TODO.md +0 -53
- scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin.py +0 -537
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin.py +0 -1499
- scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin.py +0 -431
- scitex/plt/_subplots/_export_as_csv_formatters.py +0 -112
- scitex/vis/__init__.py +0 -177
- scitex/vis/editor/_defaults.py +0 -244
- scitex/vis/editor/_edit.py +0 -378
- scitex/vis/editor/flask_editor/__init__.py +0 -21
- scitex/vis/editor/flask_editor/bbox.py +0 -216
- scitex/vis/editor/flask_editor/core.py +0 -152
- scitex/vis/editor/flask_editor/plotter.py +0 -130
- scitex/vis/editor/flask_editor/renderer.py +0 -184
- scitex/vis/editor/flask_editor/templates/html.py +0 -295
- scitex/vis/editor/flask_editor/templates/scripts.py +0 -614
- scitex/vis/editor/flask_editor/templates/styles.py +0 -549
- /scitex/{vis → fig}/README.md +0 -0
- /scitex/{vis → fig}/docs/CANVAS_ARCHITECTURE.md +0 -0
- {scitex-2.5.0.dist-info → scitex-2.7.3.dist-info}/WHEEL +0 -0
- {scitex-2.5.0.dist-info → scitex-2.7.3.dist-info}/entry_points.txt +0 -0
- {scitex-2.5.0.dist-info → scitex-2.7.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
# ----------------------------------------
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
import os
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
)
|
|
8
|
+
|
|
9
|
+
__FILE__ = "./src/scitex/scholar/storage/_LibraryManager.py"
|
|
11
10
|
__DIR__ = os.path.dirname(__FILE__)
|
|
12
11
|
# ----------------------------------------
|
|
13
12
|
|
|
@@ -78,7 +77,7 @@ class LibraryManager:
|
|
|
78
77
|
|
|
79
78
|
metadata_file = self.library_master_dir / paper_id / "metadata.json"
|
|
80
79
|
try:
|
|
81
|
-
with open(metadata_file,
|
|
80
|
+
with open(metadata_file, "r") as f:
|
|
82
81
|
data = json.load(f)
|
|
83
82
|
|
|
84
83
|
# Check nested structure: metadata.url.pdfs
|
|
@@ -121,7 +120,7 @@ class LibraryManager:
|
|
|
121
120
|
return None
|
|
122
121
|
|
|
123
122
|
try:
|
|
124
|
-
with open(metadata_file,
|
|
123
|
+
with open(metadata_file, "r") as f:
|
|
125
124
|
data = json.load(f)
|
|
126
125
|
|
|
127
126
|
# Use Paper.from_dict() which handles Pydantic validation
|
|
@@ -151,7 +150,7 @@ class LibraryManager:
|
|
|
151
150
|
existing_data = {}
|
|
152
151
|
if metadata_file.exists():
|
|
153
152
|
try:
|
|
154
|
-
with open(metadata_file,
|
|
153
|
+
with open(metadata_file, "r") as f:
|
|
155
154
|
existing_data = json.load(f)
|
|
156
155
|
except Exception:
|
|
157
156
|
pass
|
|
@@ -168,7 +167,7 @@ class LibraryManager:
|
|
|
168
167
|
merged_data["container"]["updated_at"] = datetime.now().isoformat()
|
|
169
168
|
|
|
170
169
|
# Save to file
|
|
171
|
-
with open(metadata_file,
|
|
170
|
+
with open(metadata_file, "w") as f:
|
|
172
171
|
json.dump(merged_data, f, indent=2, ensure_ascii=False)
|
|
173
172
|
|
|
174
173
|
logger.debug(f"Saved paper {paper_id} to storage")
|
|
@@ -217,9 +216,7 @@ class LibraryManager:
|
|
|
217
216
|
if source and source not in engines_list:
|
|
218
217
|
engines_list.append(source)
|
|
219
218
|
|
|
220
|
-
def _convert_to_standardized_metadata(
|
|
221
|
-
self, flat_metadata: Dict
|
|
222
|
-
) -> OrderedDict:
|
|
219
|
+
def _convert_to_standardized_metadata(self, flat_metadata: Dict) -> OrderedDict:
|
|
223
220
|
"""Convert flat metadata dict to standardized nested structure with _engines tracking."""
|
|
224
221
|
standardized = copy.deepcopy(BASE_STRUCTURE)
|
|
225
222
|
|
|
@@ -289,9 +286,7 @@ class LibraryManager:
|
|
|
289
286
|
standardized["citation_count"][year] = cc_value[year]
|
|
290
287
|
if f"{year}_source" in cc_value:
|
|
291
288
|
self._add_engine_to_list(
|
|
292
|
-
standardized["citation_count"][
|
|
293
|
-
f"{year}_engines"
|
|
294
|
-
],
|
|
289
|
+
standardized["citation_count"][f"{year}_engines"],
|
|
295
290
|
cc_value.get(f"{year}_source"),
|
|
296
291
|
)
|
|
297
292
|
else:
|
|
@@ -331,9 +326,7 @@ class LibraryManager:
|
|
|
331
326
|
standardized["publication"]["first_page"] = first.strip()
|
|
332
327
|
standardized["publication"]["last_page"] = last.strip()
|
|
333
328
|
if "publisher" in flat_metadata:
|
|
334
|
-
standardized["publication"]["publisher"] = flat_metadata[
|
|
335
|
-
"publisher"
|
|
336
|
-
]
|
|
329
|
+
standardized["publication"]["publisher"] = flat_metadata["publisher"]
|
|
337
330
|
|
|
338
331
|
# URL section
|
|
339
332
|
if "url_doi" in flat_metadata:
|
|
@@ -344,9 +337,7 @@ class LibraryManager:
|
|
|
344
337
|
standardized["url"]["publisher_engines"], "ScholarURLFinder"
|
|
345
338
|
)
|
|
346
339
|
if "url_openurl_query" in flat_metadata:
|
|
347
|
-
standardized["url"]["openurl_query"] = flat_metadata[
|
|
348
|
-
"url_openurl_query"
|
|
349
|
-
]
|
|
340
|
+
standardized["url"]["openurl_query"] = flat_metadata["url_openurl_query"]
|
|
350
341
|
if "url_openurl_resolved" in flat_metadata:
|
|
351
342
|
standardized["url"]["openurl_resolved"] = flat_metadata[
|
|
352
343
|
"url_openurl_resolved"
|
|
@@ -421,9 +412,7 @@ class LibraryManager:
|
|
|
421
412
|
stored_year = metadata.get("year")
|
|
422
413
|
stored_doi = metadata.get("doi")
|
|
423
414
|
|
|
424
|
-
title_match = self._is_title_similar(
|
|
425
|
-
title, stored_title
|
|
426
|
-
)
|
|
415
|
+
title_match = self._is_title_similar(title, stored_title)
|
|
427
416
|
year_match = (
|
|
428
417
|
not year
|
|
429
418
|
or not stored_year
|
|
@@ -506,12 +495,9 @@ class LibraryManager:
|
|
|
506
495
|
year = year or paper_data.metadata.basic.year
|
|
507
496
|
journal = journal or paper_data.metadata.publication.journal
|
|
508
497
|
abstract = abstract or paper_data.metadata.basic.abstract
|
|
509
|
-
publisher =
|
|
510
|
-
publisher or paper_data.metadata.publication.publisher
|
|
511
|
-
)
|
|
498
|
+
publisher = publisher or paper_data.metadata.publication.publisher
|
|
512
499
|
impact_factor = (
|
|
513
|
-
impact_factor
|
|
514
|
-
or paper_data.metadata.publication.impact_factor
|
|
500
|
+
impact_factor or paper_data.metadata.publication.impact_factor
|
|
515
501
|
)
|
|
516
502
|
library_id = library_id or paper_data.container.library_id
|
|
517
503
|
elif isinstance(paper_data, dict):
|
|
@@ -523,9 +509,7 @@ class LibraryManager:
|
|
|
523
509
|
journal = journal or paper_data.get("journal")
|
|
524
510
|
abstract = abstract or paper_data.get("abstract")
|
|
525
511
|
publisher = publisher or paper_data.get("publisher")
|
|
526
|
-
impact_factor = impact_factor or paper_data.get(
|
|
527
|
-
"impact_factor"
|
|
528
|
-
)
|
|
512
|
+
impact_factor = impact_factor or paper_data.get("impact_factor")
|
|
529
513
|
library_id = (
|
|
530
514
|
library_id
|
|
531
515
|
or paper_data.get("scitex_id")
|
|
@@ -566,9 +550,7 @@ class LibraryManager:
|
|
|
566
550
|
"authors": authors or [],
|
|
567
551
|
"year": year,
|
|
568
552
|
}
|
|
569
|
-
existing_paper_dir = self.dedup_manager.check_for_existing_paper(
|
|
570
|
-
check_metadata
|
|
571
|
-
)
|
|
553
|
+
existing_paper_dir = self.dedup_manager.check_for_existing_paper(check_metadata)
|
|
572
554
|
|
|
573
555
|
if existing_paper_dir:
|
|
574
556
|
logger.info(f"Found existing paper: {existing_paper_dir.name}")
|
|
@@ -614,9 +596,7 @@ class LibraryManager:
|
|
|
614
596
|
if abstract:
|
|
615
597
|
clean_abstract = TextNormalizer.clean_metadata_text(abstract)
|
|
616
598
|
elif metadata and metadata.get("abstract"):
|
|
617
|
-
clean_abstract = TextNormalizer.clean_metadata_text(
|
|
618
|
-
metadata["abstract"]
|
|
619
|
-
)
|
|
599
|
+
clean_abstract = TextNormalizer.clean_metadata_text(metadata["abstract"])
|
|
620
600
|
elif existing_metadata.get("abstract"):
|
|
621
601
|
clean_abstract = TextNormalizer.clean_metadata_text(
|
|
622
602
|
existing_metadata["abstract"]
|
|
@@ -649,45 +629,31 @@ class LibraryManager:
|
|
|
649
629
|
or existing_metadata.get("year_source", "input" if year else None),
|
|
650
630
|
"authors": existing_metadata.get("authors", authors or []),
|
|
651
631
|
"authors_source": authors_source
|
|
652
|
-
or existing_metadata.get(
|
|
653
|
-
"authors_source", "input" if authors else None
|
|
654
|
-
),
|
|
632
|
+
or existing_metadata.get("authors_source", "input" if authors else None),
|
|
655
633
|
"journal": existing_metadata.get("journal", journal),
|
|
656
634
|
"journal_source": journal_source
|
|
657
|
-
or existing_metadata.get(
|
|
658
|
-
"journal_source", "input" if journal else None
|
|
659
|
-
),
|
|
635
|
+
or existing_metadata.get("journal_source", "input" if journal else None),
|
|
660
636
|
# Additional bibliographic fields from explicit parameters
|
|
661
637
|
"volume": existing_metadata.get("volume", volume),
|
|
662
638
|
"issue": existing_metadata.get("issue", issue),
|
|
663
639
|
"pages": existing_metadata.get("pages", pages),
|
|
664
640
|
"publisher": existing_metadata.get("publisher", publisher),
|
|
665
641
|
"issn": existing_metadata.get("issn", issn),
|
|
666
|
-
"short_journal": existing_metadata.get(
|
|
667
|
-
"short_journal", short_journal
|
|
668
|
-
),
|
|
642
|
+
"short_journal": existing_metadata.get("short_journal", short_journal),
|
|
669
643
|
# Abstract with source tracking
|
|
670
644
|
"abstract": existing_metadata.get("abstract", clean_abstract),
|
|
671
645
|
"abstract_source": abstract_source
|
|
672
|
-
or existing_metadata.get(
|
|
673
|
-
"abstract_source", "input" if abstract else None
|
|
674
|
-
),
|
|
646
|
+
or existing_metadata.get("abstract_source", "input" if abstract else None),
|
|
675
647
|
# Enrichment fields
|
|
676
|
-
"citation_count": existing_metadata.get(
|
|
677
|
-
|
|
678
|
-
),
|
|
679
|
-
"impact_factor": existing_metadata.get(
|
|
680
|
-
"impact_factor", impact_factor
|
|
681
|
-
),
|
|
648
|
+
"citation_count": existing_metadata.get("citation_count", citation_count),
|
|
649
|
+
"impact_factor": existing_metadata.get("impact_factor", impact_factor),
|
|
682
650
|
"scitex_id": existing_metadata.get(
|
|
683
651
|
"scitex_id", existing_metadata.get("scholar_id", paper_id)
|
|
684
652
|
),
|
|
685
653
|
"created_at": existing_metadata.get(
|
|
686
654
|
"created_at", datetime.now().isoformat()
|
|
687
655
|
),
|
|
688
|
-
"created_by": existing_metadata.get(
|
|
689
|
-
"created_by", "SciTeX Scholar"
|
|
690
|
-
),
|
|
656
|
+
"created_by": existing_metadata.get("created_by", "SciTeX Scholar"),
|
|
691
657
|
"updated_at": datetime.now().isoformat(),
|
|
692
658
|
"projects": existing_metadata.get(
|
|
693
659
|
"projects", [] if self.project == "master" else [self.project]
|
|
@@ -698,9 +664,7 @@ class LibraryManager:
|
|
|
698
664
|
}
|
|
699
665
|
|
|
700
666
|
# Store plain dict version for JSON serialization
|
|
701
|
-
comprehensive_metadata_plain = self._dotdict_to_dict(
|
|
702
|
-
comprehensive_metadata
|
|
703
|
-
)
|
|
667
|
+
comprehensive_metadata_plain = self._dotdict_to_dict(comprehensive_metadata)
|
|
704
668
|
|
|
705
669
|
# Convert to standardized format before saving
|
|
706
670
|
standardized_metadata = self._convert_to_standardized_metadata(
|
|
@@ -734,24 +698,18 @@ class LibraryManager:
|
|
|
734
698
|
),
|
|
735
699
|
(
|
|
736
700
|
"projects",
|
|
737
|
-
comprehensive_metadata_plain.get(
|
|
738
|
-
"projects", []
|
|
739
|
-
),
|
|
701
|
+
comprehensive_metadata_plain.get("projects", []),
|
|
740
702
|
),
|
|
741
703
|
("master_storage_path", str(master_storage_path)),
|
|
742
704
|
("readable_name", readable_name),
|
|
743
705
|
("metadata_file", str(master_metadata_file)),
|
|
744
706
|
(
|
|
745
707
|
"pdf_downloaded_at",
|
|
746
|
-
comprehensive_metadata_plain.get(
|
|
747
|
-
"pdf_downloaded_at"
|
|
748
|
-
),
|
|
708
|
+
comprehensive_metadata_plain.get("pdf_downloaded_at"),
|
|
749
709
|
),
|
|
750
710
|
(
|
|
751
711
|
"pdf_size_bytes",
|
|
752
|
-
comprehensive_metadata_plain.get(
|
|
753
|
-
"pdf_size_bytes"
|
|
754
|
-
),
|
|
712
|
+
comprehensive_metadata_plain.get("pdf_size_bytes"),
|
|
755
713
|
),
|
|
756
714
|
]
|
|
757
715
|
),
|
|
@@ -782,9 +740,7 @@ class LibraryManager:
|
|
|
782
740
|
readable_name=readable_name,
|
|
783
741
|
)
|
|
784
742
|
except Exception as exc_:
|
|
785
|
-
logger.error(
|
|
786
|
-
f"Failed to create symlink for {paper_id}: {exc_}"
|
|
787
|
-
)
|
|
743
|
+
logger.error(f"Failed to create symlink for {paper_id}: {exc_}")
|
|
788
744
|
|
|
789
745
|
return paper_id
|
|
790
746
|
|
|
@@ -797,9 +753,7 @@ class LibraryManager:
|
|
|
797
753
|
bibtex_source: Optional[str] = None,
|
|
798
754
|
) -> None:
|
|
799
755
|
"""Save paper that couldn't be resolved to unresolved directory."""
|
|
800
|
-
clean_title = (
|
|
801
|
-
TextNormalizer.clean_metadata_text(title) if title else ""
|
|
802
|
-
)
|
|
756
|
+
clean_title = TextNormalizer.clean_metadata_text(title) if title else ""
|
|
803
757
|
unresolved_info = {
|
|
804
758
|
"title": clean_title,
|
|
805
759
|
"year": year,
|
|
@@ -836,9 +790,7 @@ class LibraryManager:
|
|
|
836
790
|
) -> Dict[str, Dict[str, str]]:
|
|
837
791
|
"""Resolve DOIs and create full Scholar library structure with proper paths."""
|
|
838
792
|
if not self.single_doi_resolver:
|
|
839
|
-
raise ValueError(
|
|
840
|
-
"SingleDOIResolver is required for resolving DOIs"
|
|
841
|
-
)
|
|
793
|
+
raise ValueError("SingleDOIResolver is required for resolving DOIs")
|
|
842
794
|
|
|
843
795
|
results = {}
|
|
844
796
|
for paper in papers:
|
|
@@ -857,9 +809,7 @@ class LibraryManager:
|
|
|
857
809
|
sources=sources,
|
|
858
810
|
)
|
|
859
811
|
|
|
860
|
-
enhanced_metadata = self._extract_enhanced_metadata(
|
|
861
|
-
doi_result, paper
|
|
862
|
-
)
|
|
812
|
+
enhanced_metadata = self._extract_enhanced_metadata(doi_result, paper)
|
|
863
813
|
paper_info = {**paper, **enhanced_metadata}
|
|
864
814
|
|
|
865
815
|
storage_paths = self._call_path_manager_get_storage_paths(
|
|
@@ -886,9 +836,7 @@ class LibraryManager:
|
|
|
886
836
|
readable_name=storage_paths["readable_name"],
|
|
887
837
|
)
|
|
888
838
|
|
|
889
|
-
bibtex_source_filename = getattr(
|
|
890
|
-
self, "_source_filename", "papers"
|
|
891
|
-
)
|
|
839
|
+
bibtex_source_filename = getattr(self, "_source_filename", "papers")
|
|
892
840
|
info_dir = self._create_bibtex_info_structure(
|
|
893
841
|
project=project,
|
|
894
842
|
paper_info={**paper, **enhanced_metadata},
|
|
@@ -902,9 +850,7 @@ class LibraryManager:
|
|
|
902
850
|
"doi": complete_metadata.get("doi"),
|
|
903
851
|
"master_storage_path": str(storage_path),
|
|
904
852
|
"project_symlink_path": (
|
|
905
|
-
str(project_symlink_path)
|
|
906
|
-
if project_symlink_path
|
|
907
|
-
else None
|
|
853
|
+
str(project_symlink_path) if project_symlink_path else None
|
|
908
854
|
),
|
|
909
855
|
"readable_name": storage_paths["readable_name"],
|
|
910
856
|
"metadata_file": str(metadata_file),
|
|
@@ -963,14 +909,10 @@ class LibraryManager:
|
|
|
963
909
|
or doi_result.get("abstract"),
|
|
964
910
|
"publisher": metadata_source.get("publisher")
|
|
965
911
|
or doi_result.get("publisher"),
|
|
966
|
-
"volume": metadata_source.get("volume")
|
|
967
|
-
or doi_result.get("
|
|
968
|
-
"
|
|
969
|
-
or doi_result.get("
|
|
970
|
-
"pages": metadata_source.get("pages")
|
|
971
|
-
or doi_result.get("pages"),
|
|
972
|
-
"issn": metadata_source.get("issn")
|
|
973
|
-
or doi_result.get("issn"),
|
|
912
|
+
"volume": metadata_source.get("volume") or doi_result.get("volume"),
|
|
913
|
+
"issue": metadata_source.get("issue") or doi_result.get("issue"),
|
|
914
|
+
"pages": metadata_source.get("pages") or doi_result.get("pages"),
|
|
915
|
+
"issn": metadata_source.get("issn") or doi_result.get("issn"),
|
|
974
916
|
"short_journal": metadata_source.get("short_journal")
|
|
975
917
|
or doi_result.get("short_journal"),
|
|
976
918
|
}
|
|
@@ -992,9 +934,7 @@ class LibraryManager:
|
|
|
992
934
|
) -> Dict[str, Any]:
|
|
993
935
|
"""Create complete metadata dictionary with source tracking."""
|
|
994
936
|
raw_title = enhanced_metadata.get("title") or paper.get("title")
|
|
995
|
-
clean_title = (
|
|
996
|
-
TextNormalizer.clean_metadata_text(raw_title) if raw_title else ""
|
|
997
|
-
)
|
|
937
|
+
clean_title = TextNormalizer.clean_metadata_text(raw_title) if raw_title else ""
|
|
998
938
|
raw_abstract = None
|
|
999
939
|
if enhanced_metadata.get("abstract"):
|
|
1000
940
|
raw_abstract = TextNormalizer.clean_metadata_text(
|
|
@@ -1022,8 +962,7 @@ class LibraryManager:
|
|
|
1022
962
|
if enhanced_metadata.get("title") != paper.get("title")
|
|
1023
963
|
else "manual"
|
|
1024
964
|
),
|
|
1025
|
-
"authors": enhanced_metadata.get("authors")
|
|
1026
|
-
or paper.get("authors"),
|
|
965
|
+
"authors": enhanced_metadata.get("authors") or paper.get("authors"),
|
|
1027
966
|
"authors_source": (
|
|
1028
967
|
doi_source_value
|
|
1029
968
|
if enhanced_metadata.get("authors") != paper.get("authors")
|
|
@@ -1035,8 +974,7 @@ class LibraryManager:
|
|
|
1035
974
|
if enhanced_metadata.get("year") != paper.get("year")
|
|
1036
975
|
else ("manual" if paper.get("year") else None)
|
|
1037
976
|
),
|
|
1038
|
-
"journal": enhanced_metadata.get("journal")
|
|
1039
|
-
or paper.get("journal"),
|
|
977
|
+
"journal": enhanced_metadata.get("journal") or paper.get("journal"),
|
|
1040
978
|
"journal_source": (
|
|
1041
979
|
doi_source_value
|
|
1042
980
|
if enhanced_metadata.get("journal") != paper.get("journal")
|
|
@@ -1099,10 +1037,7 @@ class LibraryManager:
|
|
|
1099
1037
|
|
|
1100
1038
|
missing_fields = []
|
|
1101
1039
|
for field, default_value in standard_fields.items():
|
|
1102
|
-
if
|
|
1103
|
-
field not in complete_metadata
|
|
1104
|
-
or complete_metadata[field] is None
|
|
1105
|
-
):
|
|
1040
|
+
if field not in complete_metadata or complete_metadata[field] is None:
|
|
1106
1041
|
complete_metadata[field] = default_value
|
|
1107
1042
|
missing_fields.append(field)
|
|
1108
1043
|
|
|
@@ -1145,18 +1080,16 @@ class LibraryManager:
|
|
|
1145
1080
|
first_author = (
|
|
1146
1081
|
author_parts[-1] if len(author_parts) > 1 else author_parts[0]
|
|
1147
1082
|
)
|
|
1148
|
-
first_author = "".join(
|
|
1149
|
-
|
|
1150
|
-
|
|
1083
|
+
first_author = "".join(c for c in first_author if c.isalnum() or c == "-")[
|
|
1084
|
+
:20
|
|
1085
|
+
]
|
|
1151
1086
|
|
|
1152
1087
|
# Format year (handle DotDict and other non-int types)
|
|
1153
1088
|
from scitex.dict import DotDict
|
|
1154
1089
|
|
|
1155
1090
|
if isinstance(year, DotDict):
|
|
1156
1091
|
# Extract value if it's a DotDict
|
|
1157
|
-
year =
|
|
1158
|
-
None # Can't extract year from DotDict structure, use Unknown
|
|
1159
|
-
)
|
|
1092
|
+
year = None # Can't extract year from DotDict structure, use Unknown
|
|
1160
1093
|
|
|
1161
1094
|
# Convert to int if it's a string representation
|
|
1162
1095
|
if isinstance(year, str) and year.isdigit():
|
|
@@ -1204,9 +1137,7 @@ class LibraryManager:
|
|
|
1204
1137
|
if_val = (
|
|
1205
1138
|
comprehensive_metadata.get("journal_impact_factor")
|
|
1206
1139
|
or comprehensive_metadata.get("impact_factor")
|
|
1207
|
-
or comprehensive_metadata.get("publication", {}).get(
|
|
1208
|
-
"impact_factor"
|
|
1209
|
-
)
|
|
1140
|
+
or comprehensive_metadata.get("publication", {}).get("impact_factor")
|
|
1210
1141
|
)
|
|
1211
1142
|
if isinstance(if_val, dict):
|
|
1212
1143
|
if_val = if_val.get("value", 0.0) or 0.0
|
|
@@ -1216,9 +1147,7 @@ class LibraryManager:
|
|
|
1216
1147
|
# Check PDF status with more granular states
|
|
1217
1148
|
pdf_files = list(master_storage_path.glob("*.pdf"))
|
|
1218
1149
|
screenshot_dir = master_storage_path / "screenshots"
|
|
1219
|
-
has_screenshots = screenshot_dir.exists() and any(
|
|
1220
|
-
screenshot_dir.iterdir()
|
|
1221
|
-
)
|
|
1150
|
+
has_screenshots = screenshot_dir.exists() and any(screenshot_dir.iterdir())
|
|
1222
1151
|
downloading_marker = master_storage_path / ".downloading"
|
|
1223
1152
|
attempted_marker = master_storage_path / ".download_attempted"
|
|
1224
1153
|
|
|
@@ -1226,11 +1155,7 @@ class LibraryManager:
|
|
|
1226
1155
|
doi = None
|
|
1227
1156
|
if "metadata" in comprehensive_metadata:
|
|
1228
1157
|
# Nested structure from file
|
|
1229
|
-
doi = (
|
|
1230
|
-
comprehensive_metadata.get("metadata", {})
|
|
1231
|
-
.get("id", {})
|
|
1232
|
-
.get("doi")
|
|
1233
|
-
)
|
|
1158
|
+
doi = comprehensive_metadata.get("metadata", {}).get("id", {}).get("doi")
|
|
1234
1159
|
else:
|
|
1235
1160
|
# Flat structure (during initial save)
|
|
1236
1161
|
doi = comprehensive_metadata.get("doi")
|
|
@@ -1260,9 +1185,7 @@ class LibraryManager:
|
|
|
1260
1185
|
"f": 2,
|
|
1261
1186
|
"s": 3,
|
|
1262
1187
|
}
|
|
1263
|
-
pdf_status_str =
|
|
1264
|
-
f"{pdf_status_id_map[pdf_status_letter]}{pdf_status_letter}"
|
|
1265
|
-
)
|
|
1188
|
+
pdf_status_str = f"{pdf_status_id_map[pdf_status_letter]}{pdf_status_letter}"
|
|
1266
1189
|
# Format: CC_000000-PDF_s-IF_032-2016-Author-Journal
|
|
1267
1190
|
# PDF status: r=running, s=successful, f=failed, p=pending
|
|
1268
1191
|
# readable_name = f"CC_{cc:06d}-PDF_{pdf_status_letter}-IF_{int(if_val):03d}-{year_str}-{first_author}-{journal_clean}"
|
|
@@ -1300,9 +1223,7 @@ class LibraryManager:
|
|
|
1300
1223
|
with open(metadata_file, "r") as f:
|
|
1301
1224
|
metadata = json.load(f)
|
|
1302
1225
|
else:
|
|
1303
|
-
logger.warning(
|
|
1304
|
-
f"No metadata found for {master_storage_path.name}"
|
|
1305
|
-
)
|
|
1226
|
+
logger.warning(f"No metadata found for {master_storage_path.name}")
|
|
1306
1227
|
return None
|
|
1307
1228
|
|
|
1308
1229
|
# Extract metadata from nested structure if needed
|
|
@@ -1368,27 +1289,18 @@ class LibraryManager:
|
|
|
1368
1289
|
# Check if this symlink points to the same master entry
|
|
1369
1290
|
try:
|
|
1370
1291
|
target = existing_link.resolve()
|
|
1371
|
-
if
|
|
1372
|
-
target.name == master_id
|
|
1373
|
-
and existing_link.name != readable_name
|
|
1374
|
-
):
|
|
1292
|
+
if target.name == master_id and existing_link.name != readable_name:
|
|
1375
1293
|
# This is an old symlink for the same paper
|
|
1376
|
-
logger.debug(
|
|
1377
|
-
f"Removing old symlink: {existing_link.name}"
|
|
1378
|
-
)
|
|
1294
|
+
logger.debug(f"Removing old symlink: {existing_link.name}")
|
|
1379
1295
|
existing_link.unlink()
|
|
1380
1296
|
except Exception as e:
|
|
1381
1297
|
# Handle broken symlinks
|
|
1382
|
-
logger.debug(
|
|
1383
|
-
f"Skipping broken symlink {existing_link.name}: {e}"
|
|
1384
|
-
)
|
|
1298
|
+
logger.debug(f"Skipping broken symlink {existing_link.name}: {e}")
|
|
1385
1299
|
continue
|
|
1386
1300
|
|
|
1387
1301
|
# Create new symlink
|
|
1388
1302
|
if not symlink_path.exists():
|
|
1389
|
-
relative_path = os.path.relpath(
|
|
1390
|
-
master_storage_path, project_dir
|
|
1391
|
-
)
|
|
1303
|
+
relative_path = os.path.relpath(master_storage_path, project_dir)
|
|
1392
1304
|
symlink_path.symlink_to(relative_path)
|
|
1393
1305
|
logger.success(
|
|
1394
1306
|
f"Created project symlink: {symlink_path} -> {relative_path}"
|
|
@@ -1430,9 +1342,7 @@ class LibraryManager:
|
|
|
1430
1342
|
year = complete_metadata.get("year", "unknown")
|
|
1431
1343
|
entry_key = f"{first_author}{year}"
|
|
1432
1344
|
|
|
1433
|
-
bibtex_entry = self._generate_bibtex_entry(
|
|
1434
|
-
complete_metadata, entry_key
|
|
1435
|
-
)
|
|
1345
|
+
bibtex_entry = self._generate_bibtex_entry(complete_metadata, entry_key)
|
|
1436
1346
|
|
|
1437
1347
|
if bibtex_file.exists():
|
|
1438
1348
|
with open(bibtex_file, "a", encoding="utf-8") as file_:
|
|
@@ -1463,9 +1373,7 @@ class LibraryManager:
|
|
|
1463
1373
|
logger.warning(f"Failed to create BibTeX info structure: {exc_}")
|
|
1464
1374
|
return None
|
|
1465
1375
|
|
|
1466
|
-
def _generate_bibtex_entry(
|
|
1467
|
-
self, metadata: Dict[str, Any], entry_key: str
|
|
1468
|
-
) -> str:
|
|
1376
|
+
def _generate_bibtex_entry(self, metadata: Dict[str, Any], entry_key: str) -> str:
|
|
1469
1377
|
"""Generate BibTeX entry from metadata."""
|
|
1470
1378
|
entry_type = "article"
|
|
1471
1379
|
if metadata.get("journal"):
|
|
@@ -1496,24 +1404,16 @@ class LibraryManager:
|
|
|
1496
1404
|
if value:
|
|
1497
1405
|
if isinstance(value, list):
|
|
1498
1406
|
value = " and ".join(str(val_) for val_ in value)
|
|
1499
|
-
value_escaped = (
|
|
1500
|
-
str(value).replace("{", "\\{").replace("}", "\\}")
|
|
1501
|
-
)
|
|
1407
|
+
value_escaped = str(value).replace("{", "\\{").replace("}", "\\}")
|
|
1502
1408
|
bibtex += f" {bibtex_field} = {{{value_escaped}}},\n"
|
|
1503
1409
|
|
|
1504
1410
|
source_field = f"{meta_field}_source"
|
|
1505
1411
|
if source_field in metadata:
|
|
1506
1412
|
bibtex += f" % {bibtex_field}_source = {metadata[source_field]}\n"
|
|
1507
1413
|
|
|
1508
|
-
bibtex += (
|
|
1509
|
-
|
|
1510
|
-
)
|
|
1511
|
-
bibtex += (
|
|
1512
|
-
f" % created_at = {metadata.get('created_at', 'unknown')},\n"
|
|
1513
|
-
)
|
|
1514
|
-
bibtex += (
|
|
1515
|
-
f" % created_by = {metadata.get('created_by', 'unknown')},\n"
|
|
1516
|
-
)
|
|
1414
|
+
bibtex += f" % scholar_id = {metadata.get('scholar_id', 'unknown')},\n"
|
|
1415
|
+
bibtex += f" % created_at = {metadata.get('created_at', 'unknown')},\n"
|
|
1416
|
+
bibtex += f" % created_by = {metadata.get('created_by', 'unknown')},\n"
|
|
1517
1417
|
bibtex += "}\n"
|
|
1518
1418
|
|
|
1519
1419
|
return bibtex
|
|
@@ -1566,14 +1466,12 @@ class LibraryManager:
|
|
|
1566
1466
|
paper_id: str = None,
|
|
1567
1467
|
master_storage_path: Path = None,
|
|
1568
1468
|
) -> None:
|
|
1569
|
-
|
|
1570
1469
|
try:
|
|
1571
1470
|
if not paper_id or not master_storage_path:
|
|
1572
1471
|
return
|
|
1573
1472
|
|
|
1574
1473
|
project_lib_path = (
|
|
1575
|
-
self.config.path_manager.get_scholar_library_path()
|
|
1576
|
-
/ self.project
|
|
1474
|
+
self.config.path_manager.get_scholar_library_path() / self.project
|
|
1577
1475
|
)
|
|
1578
1476
|
project_lib_path.mkdir(parents=True, exist_ok=True)
|
|
1579
1477
|
|
|
@@ -1666,14 +1564,10 @@ class LibraryManager:
|
|
|
1666
1564
|
return True
|
|
1667
1565
|
|
|
1668
1566
|
except Exception as exc_:
|
|
1669
|
-
logger.error(
|
|
1670
|
-
f"Error updating library metadata for {paper_id}: {exc_}"
|
|
1671
|
-
)
|
|
1567
|
+
logger.error(f"Error updating library metadata for {paper_id}: {exc_}")
|
|
1672
1568
|
return False
|
|
1673
1569
|
|
|
1674
|
-
def create_writer_directory_structure(
|
|
1675
|
-
self, paper_id: str, project: str
|
|
1676
|
-
) -> Path:
|
|
1570
|
+
def create_writer_directory_structure(self, paper_id: str, project: str) -> Path:
|
|
1677
1571
|
"""Create basic paper directory structure."""
|
|
1678
1572
|
library_path = self.config.path_manager.library_dir
|
|
1679
1573
|
paper_dir = library_path / project / paper_id
|
|
@@ -1728,9 +1622,7 @@ class LibraryManager:
|
|
|
1728
1622
|
) -> Dict[str, str]:
|
|
1729
1623
|
"""Resolve DOIs and update Scholar library metadata.json files."""
|
|
1730
1624
|
if not self.single_doi_resolver:
|
|
1731
|
-
raise ValueError(
|
|
1732
|
-
"SingleDOIResolver is required for resolving DOIs"
|
|
1733
|
-
)
|
|
1625
|
+
raise ValueError("SingleDOIResolver is required for resolving DOIs")
|
|
1734
1626
|
|
|
1735
1627
|
results = {}
|
|
1736
1628
|
for paper in papers_with_ids:
|
|
@@ -1769,9 +1661,7 @@ class LibraryManager:
|
|
|
1769
1661
|
"title": title,
|
|
1770
1662
|
"title_source": "input",
|
|
1771
1663
|
"year": paper.get("year"),
|
|
1772
|
-
"year_source": (
|
|
1773
|
-
"input" if paper.get("year") else None
|
|
1774
|
-
),
|
|
1664
|
+
"year_source": ("input" if paper.get("year") else None),
|
|
1775
1665
|
"authors": paper.get("authors"),
|
|
1776
1666
|
"authors_source": (
|
|
1777
1667
|
"input" if paper.get("authors") else None
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
# ----------------------------------------
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
import os
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
)
|
|
8
|
+
|
|
9
|
+
__FILE__ = "./src/scitex/scholar/url_finder/ScholarURLFinder.py"
|
|
11
10
|
__DIR__ = os.path.dirname(__FILE__)
|
|
12
11
|
# ----------------------------------------
|
|
13
12
|
|
|
@@ -125,10 +124,7 @@ class ScholarURLFinder:
|
|
|
125
124
|
for i_strategy, strategy in enumerate(STRATEGIES, 1):
|
|
126
125
|
# Check if strategy should run for this URL
|
|
127
126
|
publisher_filter = strategy.get("publisher_filter")
|
|
128
|
-
if (
|
|
129
|
-
publisher_filter
|
|
130
|
-
and publisher_filter.lower() not in base_url.lower()
|
|
131
|
-
):
|
|
127
|
+
if publisher_filter and publisher_filter.lower() not in base_url.lower():
|
|
132
128
|
# logger.debug(
|
|
133
129
|
# f"{self.name}: Skipping {strategy['name']} (filtered)"
|
|
134
130
|
# )
|
|
@@ -212,13 +208,9 @@ class ScholarURLFinder:
|
|
|
212
208
|
if doi:
|
|
213
209
|
logger.info(f"{self.name}: Detected DOI: {doi}")
|
|
214
210
|
async with self._managed_page() as page:
|
|
215
|
-
resolved_url = await self.openurl_resolver.resolve_doi(
|
|
216
|
-
doi, page
|
|
217
|
-
)
|
|
211
|
+
resolved_url = await self.openurl_resolver.resolve_doi(doi, page)
|
|
218
212
|
if resolved_url:
|
|
219
|
-
logger.info(
|
|
220
|
-
f"{self.name}: Resolved DOI to: {resolved_url}"
|
|
221
|
-
)
|
|
213
|
+
logger.info(f"{self.name}: Resolved DOI to: {resolved_url}")
|
|
222
214
|
url = resolved_url
|
|
223
215
|
else:
|
|
224
216
|
# Fallback to direct DOI URL (works for open access papers like arXiv)
|
|
@@ -246,9 +238,7 @@ class ScholarURLFinder:
|
|
|
246
238
|
return pdfs
|
|
247
239
|
except Exception as e:
|
|
248
240
|
# logger.warning(f"{self.name}: Failed to load page: {e}")
|
|
249
|
-
await browser_logger.error(
|
|
250
|
-
page, f"{self.name}: Navigation Error {e}"
|
|
251
|
-
)
|
|
241
|
+
await browser_logger.error(page, f"{self.name}: Navigation Error {e}")
|
|
252
242
|
return []
|
|
253
243
|
|
|
254
244
|
async def _find_from_page(
|
|
@@ -259,16 +249,12 @@ class ScholarURLFinder:
|
|
|
259
249
|
pdfs = await self._find_pdf_urls_with_strategies(page, base_url)
|
|
260
250
|
|
|
261
251
|
if not pdfs:
|
|
262
|
-
await browser_logger.warning(
|
|
263
|
-
page, f"{self.name}: No PDFs on page"
|
|
264
|
-
)
|
|
252
|
+
await browser_logger.warning(page, f"{self.name}: No PDFs on page")
|
|
265
253
|
|
|
266
254
|
return pdfs
|
|
267
255
|
except Exception as e:
|
|
268
256
|
# logger.error(f"{self.name}: Error finding PDFs: {e}")
|
|
269
|
-
await browser_logger.error(
|
|
270
|
-
page, f"{self.name}: PDF Search Error {e}"
|
|
271
|
-
)
|
|
257
|
+
await browser_logger.error(page, f"{self.name}: PDF Search Error {e}")
|
|
272
258
|
return []
|
|
273
259
|
|
|
274
260
|
# ==========================================================================
|
|
@@ -335,9 +321,7 @@ if __name__ == "__main__":
|
|
|
335
321
|
browser_mode=args.browser_mode,
|
|
336
322
|
chrome_profile_name=args.chrome_profile,
|
|
337
323
|
)
|
|
338
|
-
_, context = (
|
|
339
|
-
await browser_manager.get_authenticated_browser_and_context_async()
|
|
340
|
-
)
|
|
324
|
+
_, context = await browser_manager.get_authenticated_browser_and_context_async()
|
|
341
325
|
# time.sleep(1)
|
|
342
326
|
|
|
343
327
|
# Find PDFs
|
|
@@ -50,7 +50,7 @@ async def find_pdf_urls_by_direct_links(
|
|
|
50
50
|
await browser_logger.debug(
|
|
51
51
|
page,
|
|
52
52
|
f"{func_name}: Found {len(all_urls)} URLs "
|
|
53
|
-
f"({len(href_urls)} href, {len(dropdown_urls)} dropdown)"
|
|
53
|
+
f"({len(href_urls)} href, {len(dropdown_urls)} dropdown)",
|
|
54
54
|
)
|
|
55
55
|
|
|
56
56
|
return list(all_urls)
|