Commit e04181e
Add AlchemicalArchive extraction (#486)
* Add unimplemented functions for archive extraction
* Move archive construction to API layer
* Allow user to specify metadata
* Validate metadata types
* Extract PDR from bytes to function
* Update requests for archives
* Implement client-side AlchemicalNetwork archival extracts
Add AlchemiscaleClient.get_network_archive / get_network_archives, which
bundle an AlchemicalNetwork with all successful ProtocolDAGResults for its
Transformations into a gufe AlchemicalArchive, with optional user-supplied
metadata. Not-found networks yield None.
Implemented client-side atop the existing get_network and
get_transformation_results machinery, replacing the abandoned server-side
/bulk/networks/archive endpoint (which referenced undefined names and a
non-existent statestore method). Also fixes a missing `json` import in
client.py and restores pdr_from_bytes in utils.py (zstd import + decode
fallback).
Closes #246
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Join archive results via authoritative ScopedKeys; broaden tests
Rework AlchemiscaleClient._get_network_archive to pair each Transformation
with its results by fetching results in parallel via get_network_results and
then retrieving each Transformation by its authoritative (server-side)
ScopedKey. A Transformation deserialized now may not reproduce the GufeKey it
had at ingestion (gufe tokenization can change across versions), so a
reconstructed ScopedKey is not a reliable join and could silently drop
results; the server-side ScopedKey is stable.
Also broaden metadata-serialization validation to catch ValueError (e.g.
circular references), and extend tests to cover string ScopedKey input, the
compress=False path, and per-network metadata ordering in the bulk method.
Document the GufeKey-instability gotcha in CLAUDE.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Fix docs build for AlchemicalArchive
The docs build failed to import the package: client.py now imports
gufe.archival, absent from the docs env's pinned gufe=1.3.0. Bump it to
1.10.0 to match the runtime pin.
That bump surfaced a latent conf.py issue: gufe>=1.10.0 evaluates
`PositiveFloat | None` at class-definition time in its settings models, which
raises "unsupported operand type(s) for |" when pydantic is mocked via
autodoc_mock_imports. Drop pydantic from the mock list (it is a real,
installed gufe dependency); autodoc then imports gufe cleanly.
Finally, render AlchemicalArchive as an inline literal in getting_started.rst
rather than an intersphinx cross-reference: the gufe inventory is pinned to
v1.2.0, which predates gufe.archival, so the reference cannot resolve.
Verified: `sphinx -W` builds with zero warnings in both the docs.yml env and
the full runtime env.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Added more checks for metadata validation
---------
Co-authored-by: David L. Dotson <dotsdl@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com>1 parent 829532e commit e04181e
9 files changed
Lines changed: 398 additions & 16 deletions
File tree
- alchemiscale
- interface
- strategist
- tests/integration/interface/client
- devtools/conda-envs
- docs
- user_guide
- news
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
1536 | 1539 | | |
1537 | 1540 | | |
1538 | 1541 | | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
1544 | | - | |
| 1542 | + | |
1545 | 1543 | | |
1546 | 1544 | | |
1547 | 1545 | | |
| |||
1767 | 1765 | | |
1768 | 1766 | | |
1769 | 1767 | | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
1770 | 1947 | | |
1771 | 1948 | | |
1772 | 1949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 177 | + | |
182 | 178 | | |
183 | 179 | | |
184 | 180 | | |
| |||
0 commit comments