import mdx from '@astrojs/mdx';
import { expect } from 'chai';
import { parseHTML } from 'linkedom';
import { loadFixture } from '../../../astro/test/test-utils.js';
import * as cheerio from 'cheerio';
describe('Head injection w/ MDX', () => {
let fixture;
before(async () => {
fixture = await loadFixture({
root: new URL('./fixtures/css-head-mdx/', import.meta.url),
integrations: [mdx()],
});
});
describe('build', () => {
before(async () => {
await fixture.build();
});
it('only injects contents into head', async () => {
const html = await fixture.readFile('/indexThree/index.html');
const { document } = parseHTML(html);
const links = document.querySelectorAll('head link[rel=stylesheet]');
expect(links).to.have.a.lengthOf(1);
const scripts = document.querySelectorAll('head script[type=module]');
expect(scripts).to.have.a.lengthOf(1);
});
it('injects into the head for content collections', async () => {
const html = await fixture.readFile('/posts/test/index.html');
const { document } = parseHTML(html);
const links = document.querySelectorAll('head link[rel=stylesheet]');
expect(links).to.have.a.lengthOf(1);
});
it('injects content from a component using Content#render()', async () => {
const html = await fixture.readFile('/DirectContentUsage/index.html');
const { document } = parseHTML(html);
const links = document.querySelectorAll('head link[rel=stylesheet]');
expect(links).to.have.a.lengthOf(1);
const scripts = document.querySelectorAll('head script[type=module]');
expect(scripts).to.have.a.lengthOf(2);
});
it('Using component using slots.render() API', async () => {
const html = await fixture.readFile('/remote/index.html');
const { document } = parseHTML(html);
const links = document.querySelectorAll('head link[rel=stylesheet]');
expect(links).to.have.a.lengthOf(1);
});
it('Using component but no layout', async () => {
const html = await fixture.readFile('/noLayoutWithComponent/index.html');
// Using cheerio here because linkedom doesn't support head tag injection
const $ = cheerio.load(html);
const headLinks = $('head link[rel=stylesheet]');
expect(headLinks).to.have.a.lengthOf(1);
const bodyLinks = $('body link[rel=stylesheet]');
expect(bodyLinks).to.have.a.lengthOf(0);
});
it('JSX component rendering Astro children within head buffering phase', async () => {
const html = await fixture.readFile('/posts/using-component/index.html');
// Using cheerio here because linkedom doesn't support head tag injection
const $ = cheerio.load(html);
const headLinks = $('head link[rel=stylesheet]');
expect(headLinks).to.have.a.lengthOf(1);
const bodyLinks = $('body link[rel=stylesheet]');
expect(bodyLinks).to.have.a.lengthOf(0);
});
it('Injection caused by delayed slots', async () => {
const html = await fixture.readFile('/componentwithtext/index.html');
// Using cheerio here because linkedom doesn't support head tag injection
const $ = cheerio.load(html);
const headLinks = $('head link[rel=stylesheet]');
expect(headLinks).to.have.a.lengthOf(1);
const bodyLinks = $('body link[rel=stylesheet]');
expect(bodyLinks).to.have.a.lengthOf(0);
});
});
});
lass='left'>Age
Commit message (Collapse) | Author | Files | Lines |
|
* Adding edge_lengths and face_areas to the Python interface
* Added wrappers for the two new arrays of data
* Adding a CI test
* Fixed test name
* Added customRunCmd
* Added mpi in test
|
|
* Added embedded_circle test
* Add embedded_circle test files
* Removed diag files
* removed PICMI input file
* Update to use default regression analysis
* Added line breaks for spacing
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* Added description
* Fixed benchmark file
* Added load balancing to test
* Commented out load_balancing portion of test.
This will be added back in once load balancing is fixed.
* Add load balancing to embedded_boundary test
* Updated checksum
* Added embedded_circle test
* Add embedded_circle test files
* removed PICMI input file
* Update to use default regression analysis
* Added load balancing to test
* Commented out load_balancing portion of test.
This will be added back in once load balancing is fixed.
* Add load balancing to embedded_boundary test
* added analysis.py file in order to relax tolerance on test
* Ensure that timers are used to update load balancing algorithm
* Updated test name retrieval
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Roelof <roelof.groenewald@modernelectron.com>
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
|
|
* AMReX: Weekly Update
* Reset: PEC_particle, RepellingParticles, subcyclingMR
New AMReX grid layout routines split grids until they truly reach
number of MPI ranks, if blocking factor allows. This changes some of
our particle orders slightly.
|
|
* Add anisotropic mesh refinement example
* Update benchmark
|
|
* Add high energy asymptotic fit for Proton Boron total cross section
* Write keV and MeV instead of kev and mev
* Add @return doxystrings
|
|
In main.cpp, the destructor of the profiler was called after
amrex::Finalize. This caused an error in SYCL due to a device
synchronization call in the dtor, because the SYCL queues in amrex had been
deleted. In this commit, we limit the scope of the profiler so that its
destructor is called before the queues are deleted. Note that it was never
an issue for CUDA/HIP, because the device synchronization calls in those
backends do not need any amrex objects.
|
|
* Add PML Support for multi-J Algorithm
* Add CI Test
|
|
* Using ng_FieldSolver ghost cells in the EB data
* Removed an unused variable
* Fixed makeEBFabFactory also in in WarpXRgrid.cpp
* Fixed end of line whitespace
* Undoing #2607
|
|
There are no breaking changes in Python 3.10 that affect us.
Giving the version compatibility of Python and it's ABI stability,
there is no need at the moment to provide an upper limit. Thus,
relaxed now in general.
|
|
|
|
* [Draft] ABLASTR Library
- CMake object library
- include FFTW wrappers to start with
* Add: MPIInitHelpers
* Enable ABLASTR-only builds
* Add alias WarpX::ablastr
* ABLASTR: openPMD forwarding
* make_third_party_includes_system: Avoid Collision
* WarpX: depend on `ablastr`
* Definitions: WarpX -> ablastr
* CMake: Reduce build objects for ABLASTR
Skip all object files that we do not use in builds.
* CMake: app/shared links all object targets
Our `PRIVATE` source/objects are not PUBLICly propagated themselves.
|
|
* use if constexpr to replace template specialization
* Rmove Interface Annotations
* Replace static_assert with amrex::Abort
* Add includes & authors
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
|
|
We default to ADIOS `.bp` if available. Thus, specify HDF5 assumption
|
|
Ignore:
```
/opt/intel/oneapi/compiler/latest/env/vars.sh: line 236: OCL_ICD_FILENAMES: unbound variable
```
|
|
|
|
|
|
|
|
Co-authored-by: Hannes T <s9105947@users.noreply.github.com>
|
|
With the C++17 switch, we required CMake 3.17+ since that one introduced the `cuda_std_17` target compile feature.
It turns out that one of the many CUDA improvements in CMake 3.18+ is also to fix that feature for good, so we bump our requirement in CMake. Since CMake is easy to install, it's easier to require a clean newer version than working around a broken old one.
Spotted first by Phil on AWS instances, thx!
|
|
* Docs: `python3 -m pip`
Use `python3 -m pip`:
- works independent of PATH
- always uses the right Python
- is the recommended way to use `pip`
* Dependencies: Python incl. venv
Backported from #2556.
Follow-up to #2653
|
|
Hard coded, undocumented convention: turns out this must be the name
of the test that we define in the ini file. Logical, isn't it. Not.
Follow-up to #2593
|
|
Mismatched checksum file due to crude hard-coding.
|
|
Forgotten in #2593
|
|
|
|
FREEEEDOM. venv power.
|
|
No reason to rebuild. Make will detect dependency when needed.
|
|
Might fix:
```
- installing setuptools_scm using the system package manager to ensure consistency
- migrating from the deprecated setup_requires mechanism to pep517/518
and using a pyproject.toml to declare build dependencies
which are reliably pre-installed before running the build tools
warnings.warn(
TEST FAILED: /home/vsts/.local/lib/python3.8/site-packages/ does NOT support .pth files
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/home/vsts/.local/lib/python3.8/site-packages/
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
```
|
|
Follow-up to 8f93e010ccf2bb2c5b1236330ebd27d104732890
|
|
* Docs: Fix missing Checksum Ref
* Checksum: LaserAcceleration_1d
* Checksum: Python_PlasmaAcceleration_1d
|
|
Consistent with all other calls to Python in tests.
|
|
Lol, that's not the default.
We previously had `script` where it was the default.
Introduced in #2615
|