Skip to content

Commit

Permalink
Merge branch 'main' into kira/fix-deposition-links
Browse files Browse the repository at this point in the history
  • Loading branch information
kne42 authored Oct 1, 2024
2 parents 05f9a77 + ea1598d commit 82334bc
Show file tree
Hide file tree
Showing 192 changed files with 3,464 additions and 1,114 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/client-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
- main
paths:
- 'client/python/**'
- '.github/workflows/**'
- '.github/workflows/client-python.yml'
pull_request:
branches:
- '**'
paths:
- 'client/python/**'
- '.github/workflows/**'
- '.github/workflows/client-python.yml'

jobs:
test-client-python:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- 'client/**'
- 'frontend/**'
- 'backend/**'
- 'docs/_static/css/**'
- '.github/workflows/**' # Re-run if a workflow is modified - useful to test workflow changes in PRs
push:
branches:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/frontend-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,17 @@ jobs:
working-directory: frontend/packages/data-portal
env:
API_URL: ${{ vars.API_URL }}
API_URL_V2: ${{ vars.API_URL_V2 }}
ENV: ${{ inputs.environment }}

- name: Run E2E tests
run: pnpm e2e --shard ${{ matrix.shardCurrent }}/${{ matrix.shardTotal }}
run: |
sleep 15
pnpm e2e --shard ${{ matrix.shardCurrent }}/${{ matrix.shardTotal }}
working-directory: frontend/packages/data-portal
env:
API_URL: ${{ vars.API_URL }}
API_URL_V2: ${{ vars.API_URL_V2 }}
E2E_BROWSER: ${{ matrix.browser }}
E2E_CONFIG: ${{ secrets.E2E_CONFIG }}
CI: true
Expand Down
95 changes: 92 additions & 3 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ ul.md-nav__list > li.md-nav__item > a.md-nav__link > span.md-ellipsis {
/* Footer */

.md-footer {
background-color: #EFF2FC;
color: black;
background-color: #333333;
color: ffffff;
}

.md-footer-meta {
Expand All @@ -174,7 +174,7 @@ ul.md-nav__list > li.md-nav__item > a.md-nav__link > span.md-ellipsis {

html .md-footer-meta.md-typeset a {
color: var(--md-footer-fg-color--light);
text-decoration: underline;
text-decoration: none;
}

.md-footer-meta__inner {
Expand All @@ -189,6 +189,7 @@ html .md-footer-meta.md-typeset a {
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 0.4rem;
}

.czi-inner {
Expand Down Expand Up @@ -236,3 +237,91 @@ html .md-footer-meta.md-typeset a {
align-items: baseline;
}
}

/* Better display of attributes in class descriptions */
dl.py.attribute.objdesc {
display: grid;
grid-template-columns: 1fr 2.5fr;
}

dl.py.attribute.objdesc > dt.sig.sig-object.highlight.py {
grid-column-start: 1;
background-color: var(--md-default-bg-color);
align-content: baseline;
font-size: 1em;
}

dl.py.attribute.objdesc > dd {
grid-column-start: 2;
margin-top: 0;
margin-bottom: 0;
align-content: baseline;
}

dl.py.attribute.objdesc > dd > p {
margin-top: 0;
margin-bottom: 0;
}

.md-typeset blockquote, .md-typeset dl, .md-typeset figure, .md-typeset ol, .md-typeset pre, .md-typeset ul {
margin-top: 0;
margin-bottom: 0;
}

dl.py.attribute.objdesc > dd > dl.field-list.simple {
display: grid;
line-height: 1;
margin-top: 0;
margin-bottom: 0;
grid-template: "a b" auto / 1fr 10fr;
}

dl.py.attribute.objdesc > dd > dl.field-list.simple > dd.field-odd > p {
margin-top: 10px;
margin-bottom: 10px;
}

dl.py.attribute.objdesc > dd > dl.field-list.simple > dt.field-odd {
margin-bottom: 10px;
}


dl.py.attribute.objdesc > dd > dl.field-list.simple >dt {
grid-column-start: 1;
grid-row-start: auto;
align-content: end;
}

dl.py.attribute.objdesc > dd > dl.field-list.simple >dd {
grid-column-start: 2;
grid-row-start: auto;
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
}

dl.class > dd > dl:nth-child(27) {
margin-bottom: 20px;
}

/* FAQ Admonitions */
.czi-faq.admonition {
border: none;
margin-top: 0;
margin-bottom: 0;
}

.czi-faq.admonition > summary.admonition-title {
background-color: var(--md-default-bg-color);
padding-left: 14px;
}

.czi-faq.admonition > summary.admonition-title::before {
content: none;
}

.md-typeset .admonition, .md-typeset details {
border-radius: 0;
box-shadow: none;
border-bottom: 0.01px solid var(--md-default-fg-color--lightest);
}
18 changes: 18 additions & 0 deletions docs/_static/js/faq.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// cryoet_data_portal_docsite_faq.html?target=data-schema&status=open
document.addEventListener("DOMContentLoaded", function () {
const urlParams = new URLSearchParams(window.location.search);

// Get the value of the "open" or "closed" parameter
const status = urlParams.get("status");
const target = urlParams.get("target");

// Get the div element
const divElement = document.getElementById(target);

// Add the "open" attribute to the details class based
// on the value of the status parameter

if (status === "open") {
divElement.setAttribute('open', '');
}
});
20 changes: 14 additions & 6 deletions docs/_templates/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,21 @@
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="czi">
<div class="md-header__topic czi-footer">
<div class="md-ellipsis--cet">
CryoET Data Portal <img src="_static/img/beta.svg" alt="CryoET Data Portal">
<a
href="https://cryoetdataportal.czscience.com/"
title="CryoET Data Portal"
aria-label="CryoET Data Portal"
>
<div class="md-header__topic czi-footer">
<div class="md-ellipsis--cet">
CryoET Data Portal <img src="_static/img/beta.svg" alt="CryoET Data Portal">
</div>
<div class="hv"></div>
<div class="md-ellipsis--cet">
Documentation
</div>
</div>
<div class="hv"></div>
<div class="md-ellipsis--cet">Documentation</div>
</div>
</a>
<div class="czi-inner">
<div class="czi-logo">
<a href="https://chanzuckerberg.com/science/programs-resources/imaging/">
Expand Down
6 changes: 3 additions & 3 deletions docs/_templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<div class="md-header__title">
<div class="md-header__ellipsis">
<a
href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}"
title="{{ config.site_name | e }}"
aria-label="{{ config.site_name }}"
href="https://cryoetdataportal.czscience.com/"
title="CryoET Data Portal"
aria-label="CryoET Data Portal"
>
<div class="md-header__topic">
<div class="md-ellipsis--cet">
Expand Down
2 changes: 0 additions & 2 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ subtrees:
title: "FAQ"
- file: cryoet_data_portal_docsite_aws.md
- file: cryoet_data_portal_docsite_napari.md
- url: "https://cryoetdataportal.czscience.com/"
title: "CryoET Data Portal"
9 changes: 2 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
# Inject custom css files in `/_static/css/*`
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
html_js_files = ["js/faq.js"]

html_logo = ""
html_title = "CryoET Data Portal Documentation"
html_favicon = "_static/img/favicon-cryoet-data-portal.png"
Expand Down Expand Up @@ -117,13 +119,6 @@
("py:.*", dict(include_fields_in_toc=False)),
]

# html_js_files = [
# (
# "https://plausible.io/js/script.js",
# {"data-domain": "chanzuckerberg.github.io/cryoet-data-portal", "defer": "defer"},
# ),
# ]

# -- Options for myst -------------------------------------------------
myst_enable_extensions = ['colon_fence']
myst_heading_anchors = 4
Expand Down
Loading

0 comments on commit 82334bc

Please sign in to comment.