molgr 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- molgr-0.1.2/.dockerignore +18 -0
- molgr-0.1.2/.gitea/workflows/ci.yaml +506 -0
- molgr-0.1.2/.github/workflows/ci.yaml +368 -0
- molgr-0.1.2/.gitignore +452 -0
- molgr-0.1.2/.python-version +1 -0
- molgr-0.1.2/CMakeLists.txt +154 -0
- molgr-0.1.2/Dockerfile.review +95 -0
- molgr-0.1.2/LICENSE +339 -0
- molgr-0.1.2/PKG-INFO +689 -0
- molgr-0.1.2/README.md +331 -0
- molgr-0.1.2/README.zh-CN.md +308 -0
- molgr-0.1.2/benchmarks/README.md +194 -0
- molgr-0.1.2/benchmarks/README.zh-CN.md +186 -0
- molgr-0.1.2/benchmarks/_timeout.py +36 -0
- molgr-0.1.2/benchmarks/molfile_xyz_benchmark/README.md +99 -0
- molgr-0.1.2/benchmarks/molfile_xyz_benchmark/README.zh-CN.md +96 -0
- molgr-0.1.2/benchmarks/molfile_xyz_benchmark/__init__.py +10 -0
- molgr-0.1.2/benchmarks/molfile_xyz_benchmark/io.py +18 -0
- molgr-0.1.2/benchmarks/molfile_xyz_benchmark/methods/__init__.py +8 -0
- molgr-0.1.2/benchmarks/molfile_xyz_benchmark/run.py +191 -0
- molgr-0.1.2/benchmarks/molfile_xyz_benchmark/schema.py +4 -0
- molgr-0.1.2/benchmarks/pyproject.toml +34 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/README.md +108 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/README.zh-CN.md +105 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/__init__.py +10 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/io.py +138 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/__init__.py +57 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/base.py +28 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/cell2mol_v2.py +127 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/molgr_cpp.py +131 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/molgr_fallback.py +108 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/openbabel_read_xyz.py +88 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/postprocess.py +22 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/rdkit_determine_bonds.py +108 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/methods/xyzgraph_cheminf_full.py +265 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/run.py +187 -0
- molgr-0.1.2/benchmarks/smiles_xyz_benchmark/schema.py +28 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/README.md +66 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/README.zh-CN.md +58 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/__init__.py +10 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/comparison_annotations.json +22 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/comparison_annotations.py +124 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/io.py +18 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/methods/__init__.py +8 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/report.py +273 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/run.py +741 -0
- molgr-0.1.2/benchmarks/tmqmg_xyz_benchmark/schema.py +4 -0
- molgr-0.1.2/benchmarks/uv.lock +864 -0
- molgr-0.1.2/ci/rdkit-constraints.txt +8 -0
- molgr-0.1.2/docker/molgr-review-entrypoint.sh +46 -0
- molgr-0.1.2/docs/README.md +34 -0
- molgr-0.1.2/docs/README.zh-CN.md +33 -0
- molgr-0.1.2/docs/architecture/ALGORITHM_ARCHITECTURE.md +749 -0
- molgr-0.1.2/docs/architecture/ALGORITHM_ARCHITECTURE.zh-CN.md +565 -0
- molgr-0.1.2/docs/development/MOLECULE_REVIEW_TOOL.md +23 -0
- molgr-0.1.2/docs/development/MOLECULE_REVIEW_TOOL.zh-CN.md +170 -0
- molgr-0.1.2/docs/release/DEVELOPMENT_RELEASE_GUIDE.md +142 -0
- molgr-0.1.2/docs/release/DEVELOPMENT_RELEASE_GUIDE.zh-CN.md +134 -0
- molgr-0.1.2/makefile +307 -0
- molgr-0.1.2/pyproject.toml +141 -0
- molgr-0.1.2/scripts/__init__.py +0 -0
- molgr-0.1.2/scripts/benchmark_env.sh +59 -0
- molgr-0.1.2/scripts/ci_cleanup_cibuildwheel.sh +20 -0
- molgr-0.1.2/scripts/ci_disable_proxy.sh +16 -0
- molgr-0.1.2/scripts/ci_install_cibuildwheel.sh +48 -0
- molgr-0.1.2/scripts/ci_install_uv.sh +44 -0
- molgr-0.1.2/scripts/freeze_tmqmg_fixtures.py +139 -0
- molgr-0.1.2/scripts/gen_vscode_config_with_ob.py +265 -0
- molgr-0.1.2/scripts/molgr_cases_molfile.py +91 -0
- molgr-0.1.2/scripts/molgr_cases_smiles_csv.py +92 -0
- molgr-0.1.2/scripts/reconstruction_trace.py +6216 -0
- molgr-0.1.2/scripts/split_pipeline_stub.py +82 -0
- molgr-0.1.2/scripts/templates/molgr_debug_trace_report.html.j2 +955 -0
- molgr-0.1.2/scripts/tmqmg_manual_whitelist.json +22 -0
- molgr-0.1.2/scripts/tmqmg_metal_candidate_trace.py +453 -0
- molgr-0.1.2/scripts/tmqmg_reconstruction_speed.py +593 -0
- molgr-0.1.2/scripts/tmqmg_reference_formula_check.py +304 -0
- molgr-0.1.2/scripts/tmqmg_regression.py +1199 -0
- molgr-0.1.2/src/bindings/bind_pipeline.cpp +1169 -0
- molgr-0.1.2/src/bindings/bind_stages.cpp +527 -0
- molgr-0.1.2/src/bindings/bind_utils.cpp +319 -0
- molgr-0.1.2/src/bindings/bindings.h +24 -0
- molgr-0.1.2/src/bindings/module.cpp +63 -0
- molgr-0.1.2/src/cpp/include/molgr/compat/msvc_openbabel_stl.h +23 -0
- molgr-0.1.2/src/cpp/include/molgr/compat/openbabel_iter.h +73 -0
- molgr-0.1.2/src/cpp/include/molgr/config.h +82 -0
- molgr-0.1.2/src/cpp/include/molgr/context.h +58 -0
- molgr-0.1.2/src/cpp/include/molgr/pipeline/reconstruct_with_metals.h +22 -0
- molgr-0.1.2/src/cpp/include/molgr/pipeline/reconstruct_without_metals.h +78 -0
- molgr-0.1.2/src/cpp/include/molgr/pipeline/resonance.h +64 -0
- molgr-0.1.2/src/cpp/include/molgr/python_config.h +10 -0
- molgr-0.1.2/src/cpp/include/molgr/stages/break_bond.h +19 -0
- molgr-0.1.2/src/cpp/include/molgr/stages/clean.h +31 -0
- molgr-0.1.2/src/cpp/include/molgr/stages/eliminate.h +25 -0
- molgr-0.1.2/src/cpp/include/molgr/stages/fresh.h +14 -0
- molgr-0.1.2/src/cpp/include/molgr/stages/internal_helpers.h +18 -0
- molgr-0.1.2/src/cpp/include/molgr/stages/preprocess.h +17 -0
- molgr-0.1.2/src/cpp/include/molgr/state.h +246 -0
- molgr-0.1.2/src/cpp/include/molgr/types.h +28 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/consts.h +43 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/conversions.h +13 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/coordination.h +21 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/electrons.h +117 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/force_field.h +62 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/logger.h +54 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/lru_cache.h +89 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/metal_radical_inference.h +36 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/metals/preparation.h +41 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/metals/scoring.h +45 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/metals/search.h +143 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/no_metals/neighbor_radicals.h +25 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/no_metals/preparation.h +42 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/no_metals/recovery.h +20 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/no_metals/resonance.h +43 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/no_metals/selection.h +41 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/organic_topology.h +33 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/parallel.h +261 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/perf.h +97 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/resonance.h +114 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/scoring.h +51 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/smarts.h +91 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/utils.h +56 -0
- molgr-0.1.2/src/cpp/include/molgr/utils/xyz.h +13 -0
- molgr-0.1.2/src/cpp/include/molgr/vendor/forcefielduff.h +270 -0
- molgr-0.1.2/src/cpp/include/molgr/vendor/openbabel_threading.h +27 -0
- molgr-0.1.2/src/cpp/src/config.cpp +200 -0
- molgr-0.1.2/src/cpp/src/pipeline/reconstruct_with_metals.cpp +445 -0
- molgr-0.1.2/src/cpp/src/pipeline/reconstruct_without_metals.cpp +406 -0
- molgr-0.1.2/src/cpp/src/pipeline/resonance.cpp +216 -0
- molgr-0.1.2/src/cpp/src/stages/break_bond.cpp +223 -0
- molgr-0.1.2/src/cpp/src/stages/clean.cpp +1106 -0
- molgr-0.1.2/src/cpp/src/stages/eliminate.cpp +863 -0
- molgr-0.1.2/src/cpp/src/stages/fresh.cpp +189 -0
- molgr-0.1.2/src/cpp/src/stages/preprocess.cpp +336 -0
- molgr-0.1.2/src/cpp/src/state.cpp +549 -0
- molgr-0.1.2/src/cpp/src/utils/consts.cpp +495 -0
- molgr-0.1.2/src/cpp/src/utils/conversions.cpp +162 -0
- molgr-0.1.2/src/cpp/src/utils/force_field.cpp +702 -0
- molgr-0.1.2/src/cpp/src/utils/logger.cpp +19 -0
- molgr-0.1.2/src/cpp/src/utils/metal_radical_inference.cpp +512 -0
- molgr-0.1.2/src/cpp/src/utils/metals/preparation.cpp +257 -0
- molgr-0.1.2/src/cpp/src/utils/metals/scoring.cpp +2162 -0
- molgr-0.1.2/src/cpp/src/utils/metals/search.cpp +876 -0
- molgr-0.1.2/src/cpp/src/utils/no_metals/neighbor_radicals.cpp +293 -0
- molgr-0.1.2/src/cpp/src/utils/no_metals/preparation.cpp +145 -0
- molgr-0.1.2/src/cpp/src/utils/no_metals/recovery.cpp +92 -0
- molgr-0.1.2/src/cpp/src/utils/no_metals/resonance.cpp +363 -0
- molgr-0.1.2/src/cpp/src/utils/no_metals/selection.cpp +201 -0
- molgr-0.1.2/src/cpp/src/utils/organic_topology.cpp +1088 -0
- molgr-0.1.2/src/cpp/src/utils/perf.cpp +207 -0
- molgr-0.1.2/src/cpp/src/utils/resonance.cpp +1044 -0
- molgr-0.1.2/src/cpp/src/utils/scoring.cpp +522 -0
- molgr-0.1.2/src/cpp/src/utils/smarts.cpp +138 -0
- molgr-0.1.2/src/cpp/src/utils/utils.cpp +88 -0
- molgr-0.1.2/src/cpp/src/utils/xyz.cpp +172 -0
- molgr-0.1.2/src/cpp/src/vendor/forcefielduff.cpp +2997 -0
- molgr-0.1.2/src/cpp/src/vendor/openbabel_threading.cpp +1978 -0
- molgr-0.1.2/src/molgr/__init__.py +84 -0
- molgr-0.1.2/src/molgr/_core/__init__.pyi +81 -0
- molgr-0.1.2/src/molgr/_core/dev/__init__.pyi +9 -0
- molgr-0.1.2/src/molgr/_core/dev/pipeline/__init__.pyi +31 -0
- molgr-0.1.2/src/molgr/_core/dev/pipeline/reconstruct_with_metals.pyi +92 -0
- molgr-0.1.2/src/molgr/_core/dev/pipeline/reconstruct_without_metals.pyi +45 -0
- molgr-0.1.2/src/molgr/_core/dev/pipeline/resonance.pyi +50 -0
- molgr-0.1.2/src/molgr/_core/dev/stages/__init__.pyi +9 -0
- molgr-0.1.2/src/molgr/_core/dev/stages/break_bond.pyi +39 -0
- molgr-0.1.2/src/molgr/_core/dev/stages/clean.pyi +68 -0
- molgr-0.1.2/src/molgr/_core/dev/stages/eliminate.pyi +118 -0
- molgr-0.1.2/src/molgr/_core/dev/stages/fresh.pyi +42 -0
- molgr-0.1.2/src/molgr/_core/dev/stages/preprocess.pyi +40 -0
- molgr-0.1.2/src/molgr/_core/dev/utils.pyi +71 -0
- molgr-0.1.2/src/molgr/_core/pipeline/__init__.pyi +35 -0
- molgr-0.1.2/src/molgr/_core/pipeline/reconstruct_with_metals.pyi +23 -0
- molgr-0.1.2/src/molgr/_core/pipeline/reconstruct_without_metals.pyi +23 -0
- molgr-0.1.2/src/molgr/_core/utils.pyi +160 -0
- molgr-0.1.2/src/molgr/config.py +109 -0
- molgr-0.1.2/src/molgr/data/UFF.prm +278 -0
- molgr-0.1.2/src/molgr/fallback/__init__.py +13 -0
- molgr-0.1.2/src/molgr/fallback/pipeline/__init__.py +13 -0
- molgr-0.1.2/src/molgr/fallback/pipeline/reconstruct_with_metals.py +174 -0
- molgr-0.1.2/src/molgr/fallback/pipeline/reconstruct_without_metals.py +352 -0
- molgr-0.1.2/src/molgr/fallback/pipeline/resonance.py +220 -0
- molgr-0.1.2/src/molgr/fallback/stages/__init__.py +1 -0
- molgr-0.1.2/src/molgr/fallback/stages/break_bond.py +158 -0
- molgr-0.1.2/src/molgr/fallback/stages/clean.py +923 -0
- molgr-0.1.2/src/molgr/fallback/stages/eliminate.py +749 -0
- molgr-0.1.2/src/molgr/fallback/stages/fresh.py +165 -0
- molgr-0.1.2/src/molgr/fallback/stages/preprocess.py +203 -0
- molgr-0.1.2/src/molgr/fallback/state.py +703 -0
- molgr-0.1.2/src/molgr/fallback/utils/__init__.py +80 -0
- molgr-0.1.2/src/molgr/fallback/utils/consts.py +375 -0
- molgr-0.1.2/src/molgr/fallback/utils/dataclasses.py +31 -0
- molgr-0.1.2/src/molgr/fallback/utils/electrons.py +79 -0
- molgr-0.1.2/src/molgr/fallback/utils/force_field.py +406 -0
- molgr-0.1.2/src/molgr/fallback/utils/metal_radical_inference.py +479 -0
- molgr-0.1.2/src/molgr/fallback/utils/metals/__init__.py +10 -0
- molgr-0.1.2/src/molgr/fallback/utils/metals/preparation.py +181 -0
- molgr-0.1.2/src/molgr/fallback/utils/metals/scoring.py +1588 -0
- molgr-0.1.2/src/molgr/fallback/utils/metals/search.py +598 -0
- molgr-0.1.2/src/molgr/fallback/utils/no_metals/__init__.py +12 -0
- molgr-0.1.2/src/molgr/fallback/utils/no_metals/neighbor_radicals.py +230 -0
- molgr-0.1.2/src/molgr/fallback/utils/no_metals/preparation.py +88 -0
- molgr-0.1.2/src/molgr/fallback/utils/no_metals/recovery.py +84 -0
- molgr-0.1.2/src/molgr/fallback/utils/no_metals/resonance.py +328 -0
- molgr-0.1.2/src/molgr/fallback/utils/no_metals/selection.py +189 -0
- molgr-0.1.2/src/molgr/fallback/utils/organic_topology.py +712 -0
- molgr-0.1.2/src/molgr/fallback/utils/resonance.py +886 -0
- molgr-0.1.2/src/molgr/fallback/utils/smarts.py +152 -0
- molgr-0.1.2/src/molgr/fallback/utils/tools.py +44 -0
- molgr-0.1.2/src/molgr/interface.py +141 -0
- molgr-0.1.2/src/molgr/py.typed +1 -0
- molgr-0.1.2/src/molgr/utils/__init__.py +0 -0
- molgr-0.1.2/src/molgr/utils/converter.py +300 -0
- molgr-0.1.2/src/molgr/utils/coordination.py +20 -0
- molgr-0.1.2/src/molgr/utils/coordination_visibility.py +124 -0
- molgr-0.1.2/src/molgr/utils/equivalence.py +909 -0
- molgr-0.1.2/src/molgr/utils/post_process.py +277 -0
- molgr-0.1.2/src/molgr/utils/radical_resonance.py +271 -0
- molgr-0.1.2/tests/data/reviewed/README.md +18 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ABARAX.sdf +209 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ABETIK.sdf +195 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ABETOQ.sdf +203 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ABEVAG.sdf +103 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ACEGAT.sdf +169 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ACUGIP.sdf +166 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ACUGOV.sdf +149 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/approved_graph/ACUHAI.sdf +149 -0
- molgr-0.1.2/tests/data/reviewed/tmqmg/manifest.json +143 -0
- molgr-0.1.2/tests/data/sdf/MoNNMo.sdf +379 -0
- molgr-0.1.2/tests/data/tmqmg/README.md +65 -0
- molgr-0.1.2/tests/data/tmqmg/fixture_sources.json +81 -0
- molgr-0.1.2/tests/data/tmqmg/reconstruction/ABACAL.xyz +29 -0
- molgr-0.1.2/tests/data/tmqmg/reconstruction/ABAGAM.xyz +73 -0
- molgr-0.1.2/tests/data/tmqmg/reconstruction/ABELOK.xyz +51 -0
- molgr-0.1.2/tests/data/tmqmg/reconstruction/ABIRIO.xyz +43 -0
- molgr-0.1.2/tests/data/tmqmg/reconstruction/ABUMUH.xyz +60 -0
- molgr-0.1.2/tests/data/tmqmg/reconstruction/ACEKAU.xyz +64 -0
- molgr-0.1.2/tests/data/tmqmg/reconstruction/manifest.csv +7 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ABARAX.xyz +84 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ABATEC.xyz +71 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ABEGOD.xyz +57 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ABETIK.xyz +74 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ABETOQ.xyz +80 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ABEVAG.xyz +36 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ACUGIP.xyz +63 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/ACUGOV.xyz +54 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/AKAGEZ.xyz +71 -0
- molgr-0.1.2/tests/data/tmqmg/source_issues/manifest.csv +10 -0
- molgr-0.1.2/tests/data/xyz/ADOQEP.xyz +61 -0
- molgr-0.1.2/tests/data/xyz/ADUGEO.xyz +77 -0
- molgr-0.1.2/tests/data/xyz/AGODEG.xyz +63 -0
- molgr-0.1.2/tests/data/xyz/AKUFIV.xyz +31 -0
- molgr-0.1.2/tests/data/xyz/test.xyz +124 -0
- molgr-0.1.2/tests/test_backend_reconstruction_regression.py +352 -0
- molgr-0.1.2/tests/test_cases.csv +44 -0
- molgr-0.1.2/tests/test_cpp_python_metal_candidate_parity.py +990 -0
- molgr-0.1.2/tests/test_cpp_uff_atom_typing_cache.py +434 -0
- molgr-0.1.2/tests/test_equivalence_fallback.py +344 -0
- molgr-0.1.2/tests/test_fallback_charge_localization.py +178 -0
- molgr-0.1.2/tests/test_fallback_get_possible_metal_radicals.py +36 -0
- molgr-0.1.2/tests/test_fallback_metal_radical_inference.py +212 -0
- molgr-0.1.2/tests/test_fallback_metal_reinsertion.py +34 -0
- molgr-0.1.2/tests/test_fallback_metal_states.py +38 -0
- molgr-0.1.2/tests/test_fallback_molfile_regression.py +47 -0
- molgr-0.1.2/tests/test_fallback_no_metal_alignment.py +3070 -0
- molgr-0.1.2/tests/test_fallback_resonance.py +841 -0
- molgr-0.1.2/tests/test_fallback_scoring_cache.py +348 -0
- molgr-0.1.2/tests/test_fallback_scoring_feedback.py +207 -0
- molgr-0.1.2/tests/test_fallback_smiles_regression.py +181 -0
- molgr-0.1.2/tests/test_fallback_utils_imports.py +28 -0
- molgr-0.1.2/tests/test_fallback_validate_omol.py +106 -0
- molgr-0.1.2/tests/test_fallback_with_metals_alignment.py +3344 -0
- molgr-0.1.2/tests/test_force_field_scoring_policy.py +226 -0
- molgr-0.1.2/tests/test_interface_reconstruction_failure_policy.py +114 -0
- molgr-0.1.2/tests/test_interface_spin_multiplicity.py +132 -0
- molgr-0.1.2/tests/test_main.py +159 -0
- molgr-0.1.2/tests/test_metal_radical_inference.py +85 -0
- molgr-0.1.2/tests/test_molecule_data_roundtrip.py +84 -0
- molgr-0.1.2/tests/test_molecule_data_to_rdkit_positions.py +226 -0
- molgr-0.1.2/tests/test_no_metal_unified_resonance_pool.py +448 -0
- molgr-0.1.2/tests/test_organic_topology.py +572 -0
- molgr-0.1.2/tests/test_post_process_config.py +314 -0
- molgr-0.1.2/tests/test_reconstruction_trace_dof.py +447 -0
- molgr-0.1.2/tests/test_tmqmg_adoqep_regression.py +208 -0
- molgr-0.1.2/tests/test_tmqmg_adugeo_regression.py +39 -0
- molgr-0.1.2/tests/test_tmqmg_agodeg_regression.py +39 -0
- molgr-0.1.2/tests/test_tmqmg_akufiv_regression.py +42 -0
- molgr-0.1.2/tests/test_tmqmg_benchmark.py +770 -0
- molgr-0.1.2/tests/test_tmqmg_fixtures.py +92 -0
- molgr-0.1.2/tests/test_tmqmg_regression_helpers.py +85 -0
- molgr-0.1.2/tests/test_tmqmg_review_fixtures.py +176 -0
- molgr-0.1.2/tests/test_uff_resource.py +26 -0
- molgr-0.1.2/tools/molgr_review/README.md +49 -0
- molgr-0.1.2/tools/molgr_review/adapters/__init__.py +1 -0
- molgr-0.1.2/tools/molgr_review/adapters/tmqmg.py +1230 -0
- molgr-0.1.2/tools/molgr_review/build_fixtures.py +93 -0
- molgr-0.1.2/tools/molgr_review/export_reviews.py +82 -0
- molgr-0.1.2/tools/molgr_review/fixture_builder.py +408 -0
- molgr-0.1.2/tools/molgr_review/import_cases.py +265 -0
- molgr-0.1.2/tools/molgr_review/prepare_tmqmg_queue.py +10 -0
- molgr-0.1.2/tools/molgr_review/project_runtime.py +92 -0
- molgr-0.1.2/tools/molgr_review/schema.sql +46 -0
- molgr-0.1.2/tools/molgr_review/server.py +940 -0
- molgr-0.1.2/tools/molgr_review/static/app.js +1333 -0
- molgr-0.1.2/tools/molgr_review/static/index.html +261 -0
- molgr-0.1.2/tools/molgr_review/static/style.css +952 -0
- molgr-0.1.2/tools/molgr_review/tests/test_fixture_builder.py +813 -0
- molgr-0.1.2/tools/molgr_review/tests/test_import_cases.py +63 -0
- molgr-0.1.2/tools/molgr_review/tests/test_project_runtime.py +19 -0
- molgr-0.1.2/tools/molgr_review/tests/test_tmqmg_adapter.py +277 -0
- molgr-0.1.2/uv.lock +3750 -0
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
name: Gitea CI/CD Workflow
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- develop
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- main
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
PYPI_INDEX_URL: https://mirrors.zju.edu.cn/pypi/web/simple
|
|
17
|
+
UV_INDEX: https://mirrors.zju.edu.cn/pypi/web/simple
|
|
18
|
+
UV_DEFAULT_INDEX: https://mirrors.zju.edu.cn/pypi/web/simple
|
|
19
|
+
PIP_INDEX_URL: https://mirrors.zju.edu.cn/pypi/web/simple
|
|
20
|
+
PIP_DEFAULT_TIMEOUT: "120"
|
|
21
|
+
SERVER_URL: ${{ vars.SERVER_URL }}
|
|
22
|
+
CIBW_CACHE_PATH: ${{ vars.CIBW_CACHE_PATH }}
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
lint:
|
|
26
|
+
name: Lint (ubuntu-latest, Py 3.11)
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout code
|
|
30
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
|
|
34
|
+
- name: Disable proxy for package installs
|
|
35
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
36
|
+
|
|
37
|
+
- name: Install uv
|
|
38
|
+
run: sh scripts/ci_install_uv.sh
|
|
39
|
+
|
|
40
|
+
- name: Set up Python 3.11
|
|
41
|
+
run: |
|
|
42
|
+
"$UV_BIN" python install 3.11
|
|
43
|
+
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: |
|
|
46
|
+
"$UV_BIN" sync --python 3.11 --no-dev --no-install-project --index "$PYPI_INDEX_URL" --default-index "$PYPI_INDEX_URL"
|
|
47
|
+
"$UV_BIN" pip install --python 3.11 ruff --index "$PYPI_INDEX_URL" --default-index "$PYPI_INDEX_URL"
|
|
48
|
+
|
|
49
|
+
- name: Lint and format check
|
|
50
|
+
run: |
|
|
51
|
+
"$UV_BIN" run --no-sync --python 3.11 ruff check src
|
|
52
|
+
"$UV_BIN" run --no-sync --python 3.11 ruff format --check src
|
|
53
|
+
|
|
54
|
+
build-test-linux-matrix:
|
|
55
|
+
name: Build/Test ubuntu-latest Py${{ matrix.python-version }}
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
strategy:
|
|
58
|
+
fail-fast: false
|
|
59
|
+
matrix:
|
|
60
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
61
|
+
|
|
62
|
+
steps:
|
|
63
|
+
- name: Checkout code
|
|
64
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
65
|
+
with:
|
|
66
|
+
fetch-depth: 0
|
|
67
|
+
|
|
68
|
+
- name: Disable proxy for package installs
|
|
69
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
70
|
+
|
|
71
|
+
- name: Install uv
|
|
72
|
+
run: sh scripts/ci_install_uv.sh
|
|
73
|
+
|
|
74
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
75
|
+
run: |
|
|
76
|
+
"$UV_BIN" python install ${{ matrix.python-version }}
|
|
77
|
+
|
|
78
|
+
- name: Install dependencies
|
|
79
|
+
run: |
|
|
80
|
+
"$UV_BIN" sync --python ${{ matrix.python-version }} --no-dev --no-install-project --index "$PYPI_INDEX_URL" --default-index "$PYPI_INDEX_URL"
|
|
81
|
+
"$UV_BIN" pip install --python ${{ matrix.python-version }} pytest pytest-cov pandas pybind11 scikit-build-core setuptools-scm typing-extensions 'rdkit-dof>=0.2.1' --index "$PYPI_INDEX_URL" --default-index "$PYPI_INDEX_URL"
|
|
82
|
+
|
|
83
|
+
- name: Ensure CMake available
|
|
84
|
+
run: |
|
|
85
|
+
"$UV_BIN" pip install --python ${{ matrix.python-version }} "cmake>=3.15" --index "$PYPI_INDEX_URL" --default-index "$PYPI_INDEX_URL"
|
|
86
|
+
|
|
87
|
+
- name: Build extension (editable install)
|
|
88
|
+
run: |
|
|
89
|
+
"$UV_BIN" pip install -e . -v --no-build-isolation --constraint ci/rdkit-constraints.txt --python ${{ matrix.python-version }} --index "$PYPI_INDEX_URL" --default-index "$PYPI_INDEX_URL"
|
|
90
|
+
|
|
91
|
+
- name: Compile smoke check
|
|
92
|
+
run: |
|
|
93
|
+
"$UV_BIN" run --no-sync --python ${{ matrix.python-version }} python -c "import molgr; import molgr._core"
|
|
94
|
+
|
|
95
|
+
- name: Run tests
|
|
96
|
+
run: |
|
|
97
|
+
"$UV_BIN" run --no-sync --python ${{ matrix.python-version }} pytest
|
|
98
|
+
|
|
99
|
+
build-internal-release-linux-x86_64-manylinux2014-wheels:
|
|
100
|
+
name: Build internal Linux x86_64 manylinux2014 wheel (${{ matrix.python_abi }})
|
|
101
|
+
needs: [lint, build-test-linux-matrix]
|
|
102
|
+
runs-on: ubuntu-latest
|
|
103
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || (startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, 'rc') || contains(github.ref_name, '.dev'))))
|
|
104
|
+
strategy:
|
|
105
|
+
fail-fast: false
|
|
106
|
+
matrix:
|
|
107
|
+
python_abi: ["cp38", "cp39", "cp310", "cp311", "cp312"]
|
|
108
|
+
|
|
109
|
+
steps:
|
|
110
|
+
- name: Checkout code
|
|
111
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
112
|
+
with:
|
|
113
|
+
fetch-depth: 0
|
|
114
|
+
|
|
115
|
+
- name: Disable proxy for package installs
|
|
116
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
117
|
+
|
|
118
|
+
- name: Validate prerelease tag is on main
|
|
119
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
120
|
+
run: |
|
|
121
|
+
git fetch origin main:refs/remotes/origin/main --prune
|
|
122
|
+
if ! git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
123
|
+
echo "Prerelease tags must point to a commit reachable from origin/main."
|
|
124
|
+
exit 1
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
- name: Install build tools
|
|
128
|
+
run: |
|
|
129
|
+
sh scripts/ci_install_uv.sh
|
|
130
|
+
sh scripts/ci_install_cibuildwheel.sh
|
|
131
|
+
|
|
132
|
+
- name: Build wheels via cibuildwheel
|
|
133
|
+
env:
|
|
134
|
+
CIBW_BUILD: ${{ matrix.python_abi }}-manylinux_*
|
|
135
|
+
CIBW_ARCHS_LINUX: x86_64
|
|
136
|
+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
|
137
|
+
CIBW_ENVIRONMENT: >
|
|
138
|
+
PIP_INDEX_URL=https://mirrors.zju.edu.cn/pypi/web/simple
|
|
139
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
140
|
+
CIBW_ENVIRONMENT_LINUX: >
|
|
141
|
+
PIP_INDEX_URL=https://mirrors.zju.edu.cn/pypi/web/simple
|
|
142
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
143
|
+
PIP_CONSTRAINT=/project/ci/rdkit-constraints.txt
|
|
144
|
+
CIBW_BUILD_VERBOSITY: "1"
|
|
145
|
+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
|
|
146
|
+
sh -c 'libdir=$(python -c "import openbabel, os; print(os.path.join(os.path.dirname(openbabel.__file__), \"lib\"))");
|
|
147
|
+
case "{wheel}" in *cp38*|*cp39*) soname=libopenbabel.so.7 ;; *) soname=libopenbabel.so.8 ;; esac;
|
|
148
|
+
LD_LIBRARY_PATH="$libdir:${LD_LIBRARY_PATH:-}" auditwheel repair --exclude "$soname" -w {dest_dir} {wheel}'
|
|
149
|
+
CIBW_TEST_COMMAND: python -c "import molgr; import molgr._core; from molgr.interface import xyz_to_rdmol"
|
|
150
|
+
run: |
|
|
151
|
+
"$CIBUILDWHEEL" --platform linux
|
|
152
|
+
|
|
153
|
+
- name: Publish wheels to Gitea Registry
|
|
154
|
+
env:
|
|
155
|
+
UV_PUBLISH_USERNAME: ${{ secrets.OWNER }}
|
|
156
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.PASSWORD }}
|
|
157
|
+
run: |
|
|
158
|
+
if [ -z "${SERVER_URL}" ]; then
|
|
159
|
+
echo "SERVER_URL is empty. Set repository variable SERVER_URL, for example: https://gitea.example.com:13000."
|
|
160
|
+
exit 1
|
|
161
|
+
fi
|
|
162
|
+
PUBLISH_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi"
|
|
163
|
+
CHECK_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi/simple"
|
|
164
|
+
"$UV_BIN" publish --publish-url "$PUBLISH_URL" --check-url "$CHECK_URL" wheelhouse/*.whl
|
|
165
|
+
|
|
166
|
+
- name: Cleanup cibuildwheel environment
|
|
167
|
+
if: always()
|
|
168
|
+
run: sh scripts/ci_cleanup_cibuildwheel.sh
|
|
169
|
+
|
|
170
|
+
build-internal-release-linux-aarch64-manylinux2014-wheels:
|
|
171
|
+
name: Build internal Linux aarch64 manylinux2014 wheel (${{ matrix.python_abi }})
|
|
172
|
+
needs: [lint, build-test-linux-matrix]
|
|
173
|
+
runs-on: ubuntu-24.04-arm64
|
|
174
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || (startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, 'rc') || contains(github.ref_name, '.dev'))))
|
|
175
|
+
strategy:
|
|
176
|
+
fail-fast: false
|
|
177
|
+
matrix:
|
|
178
|
+
python_abi: ["cp38", "cp39", "cp310", "cp311", "cp312"]
|
|
179
|
+
|
|
180
|
+
steps:
|
|
181
|
+
- name: Checkout code
|
|
182
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
183
|
+
with:
|
|
184
|
+
fetch-depth: 0
|
|
185
|
+
|
|
186
|
+
- name: Disable proxy for package installs
|
|
187
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
188
|
+
|
|
189
|
+
- name: Validate prerelease tag is on main
|
|
190
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
191
|
+
run: |
|
|
192
|
+
git fetch origin main:refs/remotes/origin/main --prune
|
|
193
|
+
if ! git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
194
|
+
echo "Prerelease tags must point to a commit reachable from origin/main."
|
|
195
|
+
exit 1
|
|
196
|
+
fi
|
|
197
|
+
|
|
198
|
+
- name: Install build tools
|
|
199
|
+
run: |
|
|
200
|
+
sh scripts/ci_install_uv.sh
|
|
201
|
+
CIBUILDWHEEL_INDEX_URL=https://pypi.org/simple sh scripts/ci_install_cibuildwheel.sh
|
|
202
|
+
|
|
203
|
+
- name: Build wheels via cibuildwheel
|
|
204
|
+
env:
|
|
205
|
+
CIBW_BUILD: ${{ matrix.python_abi }}-manylinux_*
|
|
206
|
+
CIBW_ARCHS_LINUX: aarch64
|
|
207
|
+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
|
|
208
|
+
CIBW_ENVIRONMENT: >
|
|
209
|
+
PIP_INDEX_URL=https://pypi.org/simple
|
|
210
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
211
|
+
CIBW_ENVIRONMENT_LINUX: >
|
|
212
|
+
PIP_INDEX_URL=https://pypi.org/simple
|
|
213
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
214
|
+
PIP_CONSTRAINT=/project/ci/rdkit-constraints.txt
|
|
215
|
+
CIBW_BUILD_VERBOSITY: "1"
|
|
216
|
+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
|
|
217
|
+
sh -c 'libdir=$(python -c "import openbabel, os; print(os.path.join(os.path.dirname(openbabel.__file__), \"lib\"))");
|
|
218
|
+
case "{wheel}" in *cp38*|*cp39*) soname=libopenbabel.so.7 ;; *) soname=libopenbabel.so.8 ;; esac;
|
|
219
|
+
LD_LIBRARY_PATH="$libdir:${LD_LIBRARY_PATH:-}" auditwheel repair --exclude "$soname" -w {dest_dir} {wheel}'
|
|
220
|
+
CIBW_TEST_COMMAND: python -c "import molgr; import molgr._core; from molgr.interface import xyz_to_rdmol"
|
|
221
|
+
run: |
|
|
222
|
+
"$CIBUILDWHEEL" --platform linux
|
|
223
|
+
|
|
224
|
+
- name: Publish wheels to Gitea Registry
|
|
225
|
+
env:
|
|
226
|
+
UV_PUBLISH_USERNAME: ${{ secrets.OWNER }}
|
|
227
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.PASSWORD }}
|
|
228
|
+
run: |
|
|
229
|
+
if [ -z "${SERVER_URL}" ]; then
|
|
230
|
+
echo "SERVER_URL is empty. Set repository variable SERVER_URL, for example: https://gitea.example.com:13000."
|
|
231
|
+
exit 1
|
|
232
|
+
fi
|
|
233
|
+
PUBLISH_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi"
|
|
234
|
+
CHECK_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi/simple"
|
|
235
|
+
"$UV_BIN" publish --publish-url "$PUBLISH_URL" --check-url "$CHECK_URL" wheelhouse/*.whl
|
|
236
|
+
|
|
237
|
+
- name: Cleanup cibuildwheel environment
|
|
238
|
+
if: always()
|
|
239
|
+
run: sh scripts/ci_cleanup_cibuildwheel.sh
|
|
240
|
+
|
|
241
|
+
build-internal-release-linux-x86_64-manylinux-2-28-wheels:
|
|
242
|
+
name: Build internal Linux x86_64 manylinux_2_28 wheel (${{ matrix.python_abi }})
|
|
243
|
+
needs: [lint, build-test-linux-matrix]
|
|
244
|
+
runs-on: ubuntu-latest
|
|
245
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || (startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, 'rc') || contains(github.ref_name, '.dev'))))
|
|
246
|
+
strategy:
|
|
247
|
+
fail-fast: false
|
|
248
|
+
matrix:
|
|
249
|
+
python_abi: ["cp313", "cp314"]
|
|
250
|
+
|
|
251
|
+
steps:
|
|
252
|
+
- name: Checkout code
|
|
253
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
254
|
+
with:
|
|
255
|
+
fetch-depth: 0
|
|
256
|
+
|
|
257
|
+
- name: Disable proxy for package installs
|
|
258
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
259
|
+
|
|
260
|
+
- name: Validate prerelease tag is on main
|
|
261
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
262
|
+
run: |
|
|
263
|
+
git fetch origin main:refs/remotes/origin/main --prune
|
|
264
|
+
if ! git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
265
|
+
echo "Prerelease tags must point to a commit reachable from origin/main."
|
|
266
|
+
exit 1
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
- name: Install build tools
|
|
270
|
+
run: |
|
|
271
|
+
sh scripts/ci_install_uv.sh
|
|
272
|
+
sh scripts/ci_install_cibuildwheel.sh
|
|
273
|
+
|
|
274
|
+
- name: Build wheels via cibuildwheel
|
|
275
|
+
env:
|
|
276
|
+
CIBW_BUILD: ${{ matrix.python_abi }}-manylinux_*
|
|
277
|
+
CIBW_ARCHS_LINUX: x86_64
|
|
278
|
+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
|
279
|
+
CIBW_ENVIRONMENT: >
|
|
280
|
+
PIP_INDEX_URL=https://mirrors.zju.edu.cn/pypi/web/simple
|
|
281
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
282
|
+
CIBW_ENVIRONMENT_LINUX: >
|
|
283
|
+
PIP_INDEX_URL=https://mirrors.zju.edu.cn/pypi/web/simple
|
|
284
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
285
|
+
PIP_CONSTRAINT=/project/ci/rdkit-constraints.txt
|
|
286
|
+
CIBW_BUILD_VERBOSITY: "1"
|
|
287
|
+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
|
|
288
|
+
sh -c 'libdir=$(python -c "import openbabel, os; print(os.path.join(os.path.dirname(openbabel.__file__), \"lib\"))");
|
|
289
|
+
case "{wheel}" in *cp38*|*cp39*) soname=libopenbabel.so.7 ;; *) soname=libopenbabel.so.8 ;; esac;
|
|
290
|
+
LD_LIBRARY_PATH="$libdir:${LD_LIBRARY_PATH:-}" auditwheel repair --exclude "$soname" -w {dest_dir} {wheel}'
|
|
291
|
+
CIBW_TEST_COMMAND: python -c "import molgr; import molgr._core; from molgr.interface import xyz_to_rdmol"
|
|
292
|
+
run: |
|
|
293
|
+
"$CIBUILDWHEEL" --platform linux
|
|
294
|
+
|
|
295
|
+
- name: Publish wheels to Gitea Registry
|
|
296
|
+
env:
|
|
297
|
+
UV_PUBLISH_USERNAME: ${{ secrets.OWNER }}
|
|
298
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.PASSWORD }}
|
|
299
|
+
run: |
|
|
300
|
+
if [ -z "${SERVER_URL}" ]; then
|
|
301
|
+
echo "SERVER_URL is empty. Set repository variable SERVER_URL, for example: https://gitea.example.com:13000."
|
|
302
|
+
exit 1
|
|
303
|
+
fi
|
|
304
|
+
PUBLISH_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi"
|
|
305
|
+
CHECK_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi/simple"
|
|
306
|
+
"$UV_BIN" publish --publish-url "$PUBLISH_URL" --check-url "$CHECK_URL" wheelhouse/*.whl
|
|
307
|
+
|
|
308
|
+
- name: Cleanup cibuildwheel environment
|
|
309
|
+
if: always()
|
|
310
|
+
run: sh scripts/ci_cleanup_cibuildwheel.sh
|
|
311
|
+
|
|
312
|
+
build-internal-release-linux-aarch64-manylinux-2-28-wheels:
|
|
313
|
+
name: Build internal Linux aarch64 manylinux_2_28 wheel (${{ matrix.python_abi }})
|
|
314
|
+
needs: [lint, build-test-linux-matrix]
|
|
315
|
+
runs-on: ubuntu-24.04-arm64
|
|
316
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || (startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, 'rc') || contains(github.ref_name, '.dev'))))
|
|
317
|
+
strategy:
|
|
318
|
+
fail-fast: false
|
|
319
|
+
matrix:
|
|
320
|
+
python_abi: ["cp313", "cp314"]
|
|
321
|
+
|
|
322
|
+
steps:
|
|
323
|
+
- name: Checkout code
|
|
324
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
325
|
+
with:
|
|
326
|
+
fetch-depth: 0
|
|
327
|
+
|
|
328
|
+
- name: Disable proxy for package installs
|
|
329
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
330
|
+
|
|
331
|
+
- name: Validate prerelease tag is on main
|
|
332
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
333
|
+
run: |
|
|
334
|
+
git fetch origin main:refs/remotes/origin/main --prune
|
|
335
|
+
if ! git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
336
|
+
echo "Prerelease tags must point to a commit reachable from origin/main."
|
|
337
|
+
exit 1
|
|
338
|
+
fi
|
|
339
|
+
|
|
340
|
+
- name: Install build tools
|
|
341
|
+
run: |
|
|
342
|
+
sh scripts/ci_install_uv.sh
|
|
343
|
+
CIBUILDWHEEL_INDEX_URL=https://pypi.org/simple sh scripts/ci_install_cibuildwheel.sh
|
|
344
|
+
|
|
345
|
+
- name: Build wheels via cibuildwheel
|
|
346
|
+
env:
|
|
347
|
+
CIBW_BUILD: ${{ matrix.python_abi }}-manylinux_*
|
|
348
|
+
CIBW_ARCHS_LINUX: aarch64
|
|
349
|
+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
|
|
350
|
+
CIBW_ENVIRONMENT: >
|
|
351
|
+
PIP_INDEX_URL=https://pypi.org/simple
|
|
352
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
353
|
+
CIBW_ENVIRONMENT_LINUX: >
|
|
354
|
+
PIP_INDEX_URL=https://pypi.org/simple
|
|
355
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
356
|
+
PIP_CONSTRAINT=/project/ci/rdkit-constraints.txt
|
|
357
|
+
CIBW_BUILD_VERBOSITY: "1"
|
|
358
|
+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
|
|
359
|
+
sh -c 'libdir=$(python -c "import openbabel, os; print(os.path.join(os.path.dirname(openbabel.__file__), \"lib\"))");
|
|
360
|
+
case "{wheel}" in *cp38*|*cp39*) soname=libopenbabel.so.7 ;; *) soname=libopenbabel.so.8 ;; esac;
|
|
361
|
+
LD_LIBRARY_PATH="$libdir:${LD_LIBRARY_PATH:-}" auditwheel repair --exclude "$soname" -w {dest_dir} {wheel}'
|
|
362
|
+
CIBW_TEST_COMMAND: python -c "import molgr; import molgr._core; from molgr.interface import xyz_to_rdmol"
|
|
363
|
+
run: |
|
|
364
|
+
"$CIBUILDWHEEL" --platform linux
|
|
365
|
+
|
|
366
|
+
- name: Publish wheels to Gitea Registry
|
|
367
|
+
env:
|
|
368
|
+
UV_PUBLISH_USERNAME: ${{ secrets.OWNER }}
|
|
369
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.PASSWORD }}
|
|
370
|
+
run: |
|
|
371
|
+
if [ -z "${SERVER_URL}" ]; then
|
|
372
|
+
echo "SERVER_URL is empty. Set repository variable SERVER_URL, for example: https://gitea.example.com:13000."
|
|
373
|
+
exit 1
|
|
374
|
+
fi
|
|
375
|
+
PUBLISH_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi"
|
|
376
|
+
CHECK_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi/simple"
|
|
377
|
+
"$UV_BIN" publish --publish-url "$PUBLISH_URL" --check-url "$CHECK_URL" wheelhouse/*.whl
|
|
378
|
+
|
|
379
|
+
- name: Cleanup cibuildwheel environment
|
|
380
|
+
if: always()
|
|
381
|
+
run: sh scripts/ci_cleanup_cibuildwheel.sh
|
|
382
|
+
|
|
383
|
+
build-internal-release-macos-arm64-wheels:
|
|
384
|
+
name: Build internal macOS arm64 wheel (${{ matrix.python_abi }})
|
|
385
|
+
needs: [lint, build-test-linux-matrix]
|
|
386
|
+
runs-on: macos-arm64
|
|
387
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || (startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, 'rc') || contains(github.ref_name, '.dev'))))
|
|
388
|
+
strategy:
|
|
389
|
+
fail-fast: false
|
|
390
|
+
matrix:
|
|
391
|
+
python_abi: ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313", "cp314"]
|
|
392
|
+
|
|
393
|
+
steps:
|
|
394
|
+
- name: Checkout code
|
|
395
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
396
|
+
with:
|
|
397
|
+
fetch-depth: 0
|
|
398
|
+
|
|
399
|
+
- name: Disable proxy for package installs
|
|
400
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
401
|
+
|
|
402
|
+
- name: Validate prerelease tag is on main
|
|
403
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
404
|
+
run: |
|
|
405
|
+
git fetch origin main:refs/remotes/origin/main --prune
|
|
406
|
+
if ! git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
407
|
+
echo "Prerelease tags must point to a commit reachable from origin/main."
|
|
408
|
+
exit 1
|
|
409
|
+
fi
|
|
410
|
+
|
|
411
|
+
- name: Install build tools
|
|
412
|
+
run: |
|
|
413
|
+
sh scripts/ci_install_uv.sh
|
|
414
|
+
sh scripts/ci_install_cibuildwheel.sh
|
|
415
|
+
|
|
416
|
+
- name: Build wheels via cibuildwheel
|
|
417
|
+
env:
|
|
418
|
+
CIBW_BUILD: ${{ matrix.python_abi }}-macosx_arm64
|
|
419
|
+
CIBW_ARCHS_MACOS: arm64
|
|
420
|
+
CIBW_ENVIRONMENT: >
|
|
421
|
+
PIP_INDEX_URL=https://mirrors.zju.edu.cn/pypi/web/simple
|
|
422
|
+
PIP_DEFAULT_TIMEOUT=120
|
|
423
|
+
MACOSX_DEPLOYMENT_TARGET=14.0
|
|
424
|
+
CIBW_BUILD_VERBOSITY: "1"
|
|
425
|
+
CIBW_BEFORE_BUILD_MACOS: >
|
|
426
|
+
python -m pip install -i "$PIP_INDEX_URL"
|
|
427
|
+
"$(python -c 'import sys; print("openbabel-wheel>=3.1.1.22" if sys.version_info < (3, 10) else "openbabel>=3.2.0")')"
|
|
428
|
+
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
|
|
429
|
+
DYLD_LIBRARY_PATH="$(python -c "import openbabel, os; print(os.path.join(os.path.dirname(openbabel.__file__), 'lib'))")"
|
|
430
|
+
delocate-wheel
|
|
431
|
+
--exclude libopenbabel.
|
|
432
|
+
--require-archs {delocate_archs}
|
|
433
|
+
-w {dest_dir} -v {wheel}
|
|
434
|
+
CIBW_TEST_COMMAND: python -c "import molgr; import molgr._core; from molgr.interface import xyz_to_rdmol"
|
|
435
|
+
run: |
|
|
436
|
+
"$CIBUILDWHEEL" --platform macos
|
|
437
|
+
|
|
438
|
+
- name: Publish wheels to Gitea Registry
|
|
439
|
+
env:
|
|
440
|
+
UV_PUBLISH_USERNAME: ${{ secrets.OWNER }}
|
|
441
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.PASSWORD }}
|
|
442
|
+
run: |
|
|
443
|
+
if [ -z "${SERVER_URL}" ]; then
|
|
444
|
+
echo "SERVER_URL is empty. Set repository variable SERVER_URL, for example: https://gitea.example.com:13000."
|
|
445
|
+
exit 1
|
|
446
|
+
fi
|
|
447
|
+
PUBLISH_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi"
|
|
448
|
+
CHECK_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi/simple"
|
|
449
|
+
"$UV_BIN" publish --publish-url "$PUBLISH_URL" --check-url "$CHECK_URL" wheelhouse/*.whl
|
|
450
|
+
|
|
451
|
+
- name: Cleanup cibuildwheel environment
|
|
452
|
+
if: always()
|
|
453
|
+
run: sh scripts/ci_cleanup_cibuildwheel.sh
|
|
454
|
+
|
|
455
|
+
publish-internal-sdist:
|
|
456
|
+
name: Publish internal sdist
|
|
457
|
+
needs:
|
|
458
|
+
- build-internal-release-linux-x86_64-manylinux2014-wheels
|
|
459
|
+
- build-internal-release-linux-aarch64-manylinux2014-wheels
|
|
460
|
+
- build-internal-release-linux-x86_64-manylinux-2-28-wheels
|
|
461
|
+
- build-internal-release-linux-aarch64-manylinux-2-28-wheels
|
|
462
|
+
- build-internal-release-macos-arm64-wheels
|
|
463
|
+
runs-on: ubuntu-latest
|
|
464
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/develop' || (startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, 'rc') || contains(github.ref_name, '.dev'))))
|
|
465
|
+
|
|
466
|
+
steps:
|
|
467
|
+
- name: Checkout code
|
|
468
|
+
uses: http://nas.asymcatml.net:13000/actions/checkout@v6
|
|
469
|
+
with:
|
|
470
|
+
fetch-depth: 0
|
|
471
|
+
|
|
472
|
+
- name: Disable proxy for package installs
|
|
473
|
+
run: sh scripts/ci_disable_proxy.sh
|
|
474
|
+
|
|
475
|
+
- name: Validate prerelease tag is on main
|
|
476
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
477
|
+
run: |
|
|
478
|
+
git fetch origin main:refs/remotes/origin/main --prune
|
|
479
|
+
if ! git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main; then
|
|
480
|
+
echo "Prerelease tags must point to a commit reachable from origin/main."
|
|
481
|
+
exit 1
|
|
482
|
+
fi
|
|
483
|
+
|
|
484
|
+
- name: Install uv
|
|
485
|
+
run: sh scripts/ci_install_uv.sh
|
|
486
|
+
|
|
487
|
+
- name: Set up Python 3.11
|
|
488
|
+
run: |
|
|
489
|
+
"$UV_BIN" python install 3.11
|
|
490
|
+
|
|
491
|
+
- name: Build sdist
|
|
492
|
+
run: |
|
|
493
|
+
"$UV_BIN" build -p 3.11 --sdist --out-dir dist
|
|
494
|
+
|
|
495
|
+
- name: Publish sdist to Gitea Registry
|
|
496
|
+
env:
|
|
497
|
+
UV_PUBLISH_USERNAME: ${{ secrets.OWNER }}
|
|
498
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.PASSWORD }}
|
|
499
|
+
run: |
|
|
500
|
+
if [ -z "${SERVER_URL}" ]; then
|
|
501
|
+
echo "SERVER_URL is empty. Set repository variable SERVER_URL, for example: https://gitea.example.com:13000."
|
|
502
|
+
exit 1
|
|
503
|
+
fi
|
|
504
|
+
PUBLISH_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi"
|
|
505
|
+
CHECK_URL="${SERVER_URL%/}/api/packages/${{ github.repository_owner }}/pypi/simple"
|
|
506
|
+
"$UV_BIN" publish --publish-url "$PUBLISH_URL" --check-url "$CHECK_URL" dist/*.tar.gz
|