Do you need to find a computer with better memory.

return self.__get_result()

File "/usr/local/miniconda/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
210804-09:17:28,52 nipype.workflow ERROR:
Issue encountered while running fMRIPrep. Usually, this is a result of insufficent memory. Ensure Docker has sufficent resources available (https://docs.docker.com/docker-for-mac/#resources)
210804-09:17:28,109 nipype.workflow CRITICAL:
fMRIPrep failed: A child process terminated abruptly, the process pool is not usable anymore
Sentry is attempting to send 4 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
What version of fMRIPrep are you using?
20.2.1
What kind of installation are you using? Containers (Singularity, Docker), or "bare-metal"?
Docker
What is the exact command-line you used?
bash fmriprep.sh
Have you checked that your inputs are BIDS valid?
Yes
Are you reusing previously computed results (e.g., FreeSurfer, Anatomical derivatives, work directory of previous run)?
Nope
Summary
Subject ID: 01
Structural images: 1 T1-weighted
Functional series: 1
Task: SST (1 run)
Standard output spaces: MNI152NLin2009cAsym
Non-standard output spaces:
FreeSurfer reconstruction: Not run
Anatomical
Anatomical Conformation
Input T1w images: 1
Output orientation: RAS
Output dimensions: 160x240x256
Output voxel size: 1mm x 1mm x 1mm
Discarded images: 0
Functional
Reports for: task SST, run 1.
Estimated fieldmap and alignment to the corresponding EPI reference
The estimated fieldmap was aligned to the corresponding EPI reference with a rigid-registration process of the magintude part of the fieldmap, using antsRegistration. Overlaid on top of the co-registration results, the displacements along the phase-encoding direction are represented in arbitrary units. Please note that the color scale is centered around zero (i.e. full transparency), but the extremes might be different (i.e., the maximum of red colors could be orders of magnitude above or below the minimum of blue colors.)
Get figure file: sub-01/figures/sub-01_task-SST_run-1_desc-fieldmap_bold.svg
About
fMRIPrep version: 20.2.3
fMRIPrep command: /usr/local/miniconda/bin/fmriprep /data /out participant --participant-label 01 --skip-bids-validation --md-only-boilerplate --fs-no-reconall --nthreads 16 --stop-on-first-crash --mem_mb 59000 -w /scratch --output-spaces MNI152NLin2009cAsym:res-2
Date preprocessed: 2021-08-04 05:10:16 +0000
Methods
We kindly ask to report results preprocessed with this tool using the following boilerplate.
Markdown
Results included in this manuscript come from preprocessing
performed using fMRIPrep 20.2.3
(@fmriprep1; @fmriprep2; RRID:SCR_016216),
which is based on Nipype 1.6.1
(@nipype1; @nipype2; RRID:SCR_002502).
Anatomical data preprocessing
: A total of 1 T1-weighted (T1w) images were found within the input
BIDS dataset.The T1-weighted (T1w) image was corrected for intensity non-uniformity (INU)
with N4BiasFieldCorrection [@n4], distributed with ANTs 2.3.3 [@ants, RRID:SCR_004757], and used as T1w-reference throughout the workflow.
The T1w-reference was then skull-stripped with a Nipype implementation of
the antsBrainExtraction.sh workflow (from ANTs), using OASIS30ANTs
as target template.
Brain tissue segmentation of cerebrospinal fluid (CSF),
white-matter (WM) and gray-matter (GM) was performed on
the brain-extracted T1w using fast [FSL 5.0.9, RRID:SCR_002823,
@fsl_fast].
Volume-based spatial normalization to one standard space (MNI152NLin2009cAsym) was performed through
nonlinear registration with antsRegistration (ANTs 2.3.3),
using brain-extracted versions of both T1w reference and the T1w template.
The following template was selected for spatial normalization:
ICBM 152 Nonlinear Asymmetrical template version 2009c [@mni152nlin2009casym, RRID:SCR_008796; TemplateFlow ID: MNI152NLin2009cAsym],
Functional data preprocessing
: For each of the 1 BOLD runs found per subject (across all
tasks and sessions), the following preprocessing was performed.
First, a reference volume and its skull-stripped version were generated
using a custom
methodology of fMRIPrep.
A B0-nonuniformity map (or fieldmap) was estimated based on a phase-difference map
calculated with a dual-echo GRE (gradient-recall echo) sequence, processed with a
custom workflow of SDCFlows inspired by the
epidewarp.fsl script
and further improvements in HCP Pipelines [@hcppipelines].
The fieldmap was then co-registered to the target EPI (echo-planar imaging)
reference run and converted to a displacements field map (amenable to registration
tools such as ANTs) with FSL's fugue and other SDCflows tools.
Based on the estimated susceptibility distortion, a corrected
EPI (echo-planar imaging) reference was calculated for a more
accurate co-registration with the anatomical reference.
The BOLD reference was then co-registered to the T1w reference using
flirt [FSL 5.0.9, @flirt] with the boundary-based registration [@bbr]
cost-function.
Co-registration was configured with nine degrees of freedom to account
for distortions remaining in the BOLD reference.
Head-motion parameters with respect to the BOLD reference
(transformation matrices, and six corresponding rotation and translation
parameters) are estimated before any spatiotemporal filtering using
mcflirt [FSL 5.0.9, @mcflirt].
BOLD runs were slice-time corrected using 3dTshift from
AFNI 20160207 [@afni, RRID:SCR_005927].
The BOLD time-series (including slice-timing correction when applied)
were resampled onto their original, native space by applying
a single, composite transform to correct for head-motion and
susceptibility distortions.
These resampled BOLD time-series will be referred to as preprocessed
BOLD in original space, or just preprocessed BOLD.
The BOLD time-series were resampled into standard space,
generating a preprocessed BOLD run in MNI152NLin2009cAsym space.
First, a reference volume and its skull-stripped version were generated
using a custom
methodology of fMRIPrep.
Several confounding time-series were calculated based on the
preprocessed BOLD: framewise displacement (FD), DVARS and
three region-wise global signals.
FD was computed using two formulations following Power (absolute sum of
relative motions, @power_fd_dvars) and Jenkinson (relative root mean square
displacement between affines, @mcflirt).
FD and DVARS are calculated for each functional run, both using their
implementations in Nipype [following the definitions by @power_fd_dvars].
The three global signals are extracted within the CSF, the WM, and
the whole-brain masks.
Additionally, a set of physiological regressors were extracted to
allow for component-based noise correction [CompCor, @compcor].
Principal components are estimated after high-pass filtering the
preprocessed BOLD time-series (using a discrete cosine filter with
128s cut-off) for the two CompCor variants: temporal (tCompCor)
and anatomical (aCompCor).
tCompCor components are then calculated from the top 2% variable
voxels within the brain mask.
For aCompCor, three probabilistic masks (CSF, WM and combined CSF+WM)
are generated in anatomical space.
The implementation differs from that of Behzadi et al. in that instead
of eroding the masks by 2 pixels on BOLD space, the aCompCor masks are
subtracted a mask of pixels that likely contain a volume fraction of GM.
This mask is obtained by thresholding the corresponding partial volume map at 0.05, and it ensures components are not extracted
from voxels containing a minimal fraction of GM.
Finally, these masks are resampled into BOLD space and binarized by
thresholding at 0.99 (as in the original implementation).
Components are also calculated separately within the WM and CSF masks.
For each CompCor decomposition, the k components with the largest singular
values are retained, such that the retained components' time series are
sufficient to explain 50 percent of variance across the nuisance mask (CSF,
WM, combined, or temporal). The remaining components are dropped from
consideration.
The head-motion estimates calculated in the correction step were also
placed within the corresponding confounds file.
The confound time series derived from head motion estimates and global
signals were expanded with the inclusion of temporal derivatives and
quadratic terms for each [@confounds_satterthwaite_2013].
Frames that exceeded a threshold of 0.5 mm FD or
1.5 standardised DVARS were annotated as motion outliers.
All resamplings can be performed with a single interpolation
step by composing all the pertinent transformations (i.e. head-motion
transform matrices, susceptibility distortion correction when available,
and co-registrations to anatomical and output spaces).
Gridded (volumetric) resamplings were performed using antsApplyTransforms (ANTs),
configured with Lanczos interpolation to minimize the smoothing
effects of other kernels [@lanczos].
Non-gridded (surface) resamplings were performed using mri_vol2surf
(FreeSurfer).
Many internal operations of fMRIPrep use
Nilearn 0.6.2 [@nilearn, RRID:SCR_001362],
mostly within the functional processing workflow.
For more details of the pipeline, see the section corresponding
to workflows in fMRIPrep's documentation.
Copyright Waiver
The above boilerplate text was automatically generated by fMRIPrep
with the express intention that users should copy and paste this
text into their manuscripts unchanged.
It is released under the CC0 license.
References
Errors
No errors to report!

https://fmriprep.org/en/stable/faq.html#my-fmriprep-run-is-hanging

Please reopen if your question has not been addressed.
If you reopen, please make sure to add sufficient details to your question (execution log, crashfiles, etc.) so that we can understand the problem and point to a solution.

File "/usr/local/miniconda/lib/python3.7/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/usr/local/miniconda/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/usr/local/miniconda/lib/python3.7/concurrent/futures/_base.py", line 324, in _invoke_callbacks
callback(self)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 159, in _async_callback
result = args.result()
File "/usr/local/miniconda/lib/python3.7/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/usr/local/miniconda/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
CITATION.md

Please see the log file.

Hello,
I have attached the log file in the original thread.
Best wishes,
Weixi
On Fri, Aug 6, 2021 at 6:04 PM Oscar Esteban @.***>
wrote:

Please reopen if your question has not been addressed.
If you reopen, please make sure to add sufficient details to your question
(execution log, crashfiles, etc.) so that we can understand the problem and
point to a solution.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nipreps/fmriprep/issues/2491#issuecomment-894152661,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQGCTL34UHB44M2KCX2NLZ3T3OXSJANCNFSM5BQVQCNA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email
.


windows changed to rectangle

Microsoft PowerToys version
v0.57.0
Running as admin

[ ] Yes

Area(s) with issue?
FancyZones
Steps to reproduce
Just use this function.But in Windows 11.Some windows which was rounded rectangle like edge changed to rectangle because of this function.
✔ Expected Behavior
The function could just change the location and the size, but not the shape.
❌ Actual Behavior
Some windows which was rounded rectangle like edge changed to rectangle because of this function.
Other Software
No response

/dup https://github.com/microsoft/PowerToys/issues/17367, Fix are on the way. :D


Missing license

A LICENSE file is missing in this repository.
See also https://github.com/Strider-CD/strider/community

Needs to be moved top level https://github.com/Strider-CD/strider/blob/master/apps/strider/LICENSE.md


Feat/app in docker

Adds a Dockerfile and a service in docker-compose.yml for the app as well as a .env.docker for connecting to redis inside the container.

@wjohnsto I get an error that seems to be coming from Pandas but that we don't hit outside of docker, I remember when working with Kumar on the PS portal integration we pinned Pandas to 2.1.3 (but below it's trying 2.2.3 it seems):
docker compose up
[+] Building 18.3s (10/11)                                                                   docker:desktop-linux
 => [app internal] load build definition from Dockerfile                                                     0.0s
 => => transferring dockerfile: 522B                                                                         0.0s
 => [app internal] load metadata for docker.io/library/python:3.11-slim                                      0.8s
 => [app auth] library/python:pull token for registry-1.docker.io                                            0.0s
 => [app internal] load .dockerignore                                                                        0.0s
 => => transferring context: 186B                                                                            0.0s
 => [app 1/6] FROM docker.io/library/python:3.11-slim@sha256:154c8911c2c45b6b802a72c98388d9b13548548c5ec713  0.0s
 => [app internal] load build context                                                                        3.6s
 => => transferring context: 6.57MB                                                                          3.5s
 => CACHED [app 2/6] RUN pip install "poetry==1.8"                                                           0.0s
 => CACHED [app 3/6] WORKDIR /app                                                                            0.0s
 => CACHED [app 4/6] COPY poetry.lock pyproject.toml /app/                                                   0.0s
 => ERROR [app 5/6] RUN poetry install --no-interaction --no-ansi --no-root                                 13.9s
------
 > [app 5/6] RUN poetry install --no-interaction --no-ansi --no-root:
0.272 Creating virtualenv redis-rag-workbench-9TtSrW0h-py3.11 in /root/.cache/pypoetry/virtualenvs
0.443 Installing dependencies from lock file
0.633
0.633 Package operations: 133 installs, 0 updates, 0 removals
0.633
0.633   - Installing certifi (2024.8.30)
0.633   - Installing charset-normalizer (3.4.0)
0.634   - Installing h11 (0.14.0)
0.634   - Installing idna (3.10)
0.634   - Installing sniffio (1.3.1)
0.635   - Installing typing-extensions (4.12.2)
0.635   - Installing urllib3 (2.2.3)
0.962   - Installing annotated-types (0.7.0)
0.963   - Installing anyio (4.6.2.post1)
0.963   - Installing httpcore (1.0.6)
0.964   - Installing mdurl (0.1.2)
0.965   - Installing pydantic-core (2.23.4)
0.965   - Installing requests (2.32.3)
1.209   - Installing httpx (0.27.2)
1.210   - Installing jsonpointer (3.0.0)
1.210   - Installing markdown-it-py (3.0.0)
1.211   - Installing orjson (3.10.10)
1.212   - Installing pydantic (2.9.2)
1.213   - Installing pygments (2.18.0)
1.213   - Installing requests-toolbelt (1.0.0)
1.408   - Installing click (8.1.7)
1.408   - Installing filelock (3.16.1)
1.409   - Installing frozenlist (1.4.1)
1.409   - Installing fsspec (2024.10.0)
1.410   - Installing httptools (0.6.4)
1.410   - Installing jsonpatch (1.33)
1.411   - Installing langsmith (0.1.136)
1.412   - Installing multidict (6.1.0)
1.412   - Installing packaging (24.1)
1.413   - Installing propcache (0.2.0)
1.413   - Installing python-dotenv (1.0.1)
1.414   - Installing pyyaml (6.0.2)
1.415   - Installing rich (13.9.3)
1.415   - Installing shellingham (1.5.4)
1.416   - Installing tenacity (8.5.0)
1.416   - Installing tqdm (4.66.5)
1.535   - Installing uvloop (0.21.0)
1.544   - Installing watchfiles (0.24.0)
1.627   - Installing websockets (12.0)
1.858   - Installing aiohappyeyeballs (2.4.3)
1.858   - Installing aiosignal (1.3.1)
1.859   - Installing attrs (24.2.0)
1.859   - Installing dnspython (2.7.0)
1.860   - Installing greenlet (3.1.1)
1.861   - Installing huggingface-hub (0.26.1)
1.861   - Installing langchain-core (0.2.41)
1.862   - Installing markupsafe (2.1.5)
1.862   - Installing mpmath (1.3.0)
1.862   - Installing mypy-extensions (1.0.0)
1.863   - Installing numpy (1.26.4)
1.863   - Installing six (1.16.0)
1.864   - Installing typer (0.12.5)
1.864   - Installing uvicorn (0.30.6)
1.865   - Installing yarl (1.16.0)
2.617   - Installing aiohttp (3.10.10)
2.617   - Installing contourpy (1.3.0)
2.618   - Installing cycler (0.12.1)
2.618   - Installing dill (0.3.7)
2.619   - Installing distro (1.9.0)
2.619   - Installing email-validator (2.2.0)
2.620   - Installing fastapi-cli (0.0.5)
2.621   - Installing fonttools (4.54.1)
2.621   - Installing humanfriendly (10.0)
2.622   - Installing jinja2 (3.1.4)
2.622   - Installing jiter (0.6.1)
2.622   - Installing joblib (1.4.2)
2.623   - Installing kiwisolver (1.4.7)
2.623   - Installing langchain-text-splitters (0.2.4)
2.623   - Installing marshmallow (3.23.0)
2.624   - Installing networkx (3.4.2)
2.687   - Installing pillow (10.4.0)
2.692   - Installing pyparsing (3.2.0)
2.695   - Installing python-dateutil (2.9.0.post0)
2.741   - Installing python-multipart (0.0.12)
2.790   - Installing pytz (2024.2)
2.794   - Installing regex (2024.9.11)
2.838   - Installing safetensors (0.4.5)
2.852   - Installing scipy (1.14.1)
2.867   - Installing sqlalchemy (2.0.36)
2.896   - Installing starlette (0.37.2)
2.955   - Installing sympy (1.13.1)
2.991   - Installing threadpoolctl (3.5.0)
3.070   - Installing tokenizers (0.20.1)
3.152   - Installing typing-inspect (0.9.0)
3.173   - Installing tzdata (2024.2)
5.155   - Installing aiofiles (23.2.1)
5.156   - Installing coloredlogs (15.0.1)
5.156   - Installing dataclasses-json (0.6.7)
5.157   - Installing fastapi (0.111.1)
5.158   - Installing ffmpy (0.4.0)
5.158   - Installing gradio-client (1.3.0)
5.159   - Installing importlib-resources (6.4.5)
5.160   - Installing langchain (0.2.16)
5.160   - Installing matplotlib (3.9.2)
5.161   - Installing ml-dtypes (0.4.1)
5.161   - Installing multiprocess (0.70.15)
5.161   - Installing openai (1.52.1)
5.162   - Installing pandas (2.2.3)
5.162   - Installing pyarrow (17.0.0)
5.163   - Installing pydub (0.25.1)
5.163   - Installing redis (5.1.1)
5.242   - Installing ruff (0.7.0)
5.275   - Installing scikit-learn (1.5.2)
5.309   - Installing semantic-version (2.10.0)
5.313   - Installing tabulate (0.9.0)
5.322   - Installing tiktoken (0.7.0)
5.338   - Installing tomlkit (0.12.0)
5.366   - Installing torch (2.5.0)
5.369   - Installing transformers (4.45.2)
5.400   - Installing xxhash (3.5.0)
13.22
13.22   ChefBuildError
13.22
13.22   Backend subprocess exited when trying to invoke build_wheel
13.22
13.22   + meson setup /tmp/tmpmme2cwt1/pandas-2.2.3 /tmp/tmpmme2cwt1/pandas-2.2.3/.mesonpy-c4duo9ma/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=/tmp/tmpmme2cwt1/pandas-2.2.3/.mesonpy-c4duo9ma/build/meson-python-native-file.ini
13.22   The Meson build system
13.22   Version: 1.2.1
13.22   Source dir: /tmp/tmpmme2cwt1/pandas-2.2.3
13.22   Build dir: /tmp/tmpmme2cwt1/pandas-2.2.3/.mesonpy-c4duo9ma/build
13.22   Build type: native build
13.22   Project name: pandas
13.22   Project version: 2.2.3
13.22
13.22   ../../meson.build:2:0: ERROR: Unknown compiler(s): [['cc'], ['gcc'], ['clang'], ['nvc'], ['pgcc'], ['icc'], ['icx']]
13.22   The following exception(s) were encountered:
13.22   Running `cc --version` gave "[Errno 2] No such file or directory: 'cc'"
13.22   Running `gcc --version` gave "[Errno 2] No such file or directory: 'gcc'"
13.22   Running `clang --version` gave "[Errno 2] No such file or directory: 'clang'"
13.22   Running `nvc --version` gave "[Errno 2] No such file or directory: 'nvc'"
13.22   Running `pgcc --version` gave "[Errno 2] No such file or directory: 'pgcc'"
13.22   Running `icc --version` gave "[Errno 2] No such file or directory: 'icc'"
13.22   Running `icx --version` gave "[Errno 2] No such file or directory: 'icx'"
13.22
13.22   A full log can be found at /tmp/tmpmme2cwt1/pandas-2.2.3/.mesonpy-c4duo9ma/build/meson-logs/meson-log.txt
13.22
13.22
13.22   at /usr/local/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare
13.22       160│
13.22       161│                 error = ChefBuildError("\n\n".join(message_parts))
13.22       162│
13.22       163│             if error is not None:
13.22     → 164│                 raise error from None
13.22       165│
13.22       166│             return path
13.22       167│
13.22       168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
13.22
13.22 Note: This error originates from the build backend, and is likely not a problem with poetry but with pandas (2.2.3) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pandas (==2.2.3)"'.
13.22
13.22 Warning: The file chosen for install of langsmith 0.1.136 (langsmith-0.1.136-py3-none-any.whl) is yanked.
------
failed to solve: process "/bin/sh -c poetry install --no-interaction --no-ansi --no-root" did not complete successfully: exit code: 1


Add Go 1.12 to the build

Adds Go 1.12 to Travis build and removes Go 1.10
Fixes a static check error from test due to DualStack field now being deprecated

Coverage remained the same at 92.492% when pulling 831c7966139734c38e17a56bcae8deaa2df2171a on wallyqs:travis-yml-updates into 157b49a9f5225ba2151ded84979e875b1fdd5b95 on nats-io:master.


How does mob-recon handle integrated plasmids?

Hi, I am trying to detect integrated plasmids in a single sequence (working with a test genome).  I get a single hit in the contigs_report.txt file, but the fields for "contig_match_start" and "contig_match_end" are empty. Is there a way to get the start/end coords from mob-suite?  The actual assemblies I will be working with will be more fragmented, but it would still be nice to have the coords...
Thanks in advance!

Hi,
MOB-recon treats integrated plasmids and free-living plasmids the same and is not explicitly determining the boundaries of the elements in the sequence.  In terms of providing MOB-suite a complete and closed chromosome with an integrated plasmid, it would just report the whole thing as a plasmid.  Since this is a very unlikely scenario with draft assemblies using illumina, the component contigs of the plasmid would be unlikely to resolve in a large contig with the chromosome. The contig_match_start and contig_match_end are only for the identification of repetitive sequences such as IS elements. If they are blank then that means that none were found. I will update the documentation to make this more clear.
Identifying the boundaries of a plasmid integrated into the chromosome is much trickier.  The contig report file does not report the best blast hits for a contig to a reference plasmid since this report would contain many which have no hit to the references because they are chromosome in origin.
What are you planning on doing with the integrated plasmid information? Are you just trying to identify its presence or are you delineate its boundaries more?  If you are just interested in the blast results you could use the --keep_tmp flag and then take the contig_blast_results.txt file and that will give you the unfiltered blast hits to the reference.

Hi @jrober84 , thanks for the info, that does clarify things.  Ideally, I would like to use the tool to extract integrated phage sequences from both draft and "complete" assemblies.  What are the column headers for the contig_blast_results.txt file? I'm not familiar with the legacy blast output, it looks different from the current blast -6 output format...

The fields for the output are: qseqid,sseqid,qlen,slen,qstart,qend,sstart,send,length,mismatch,pident,qcovhsp,qcovs,sstrand,evalue,bitscore.  Thanks for the feedback on that, I will work on updating the documentation for this. Do you have some accessions for plasmids inserted into the chromosome that you are interested in?

Thanks! The one I have been playing with is the chromosome for this E. coli -- the chromosome gets called as a plasmid, and I want to see which regions are being identified.

I have updated the documentation with the header information but integrated plasmid identification is a different problem which would need to be investigated separately for an implementation


Update bower Git endpoint

Once 0.5.0 has been released, I'll need to open an issue on bower/registry to request that they update the Git endpoint for this package.

I have opened bower/registry#261 to request the change to the Git endpoint in the bower registry.


Add bayonets

About the PR

make it to where you can attach knives to (certain) guns
examine text on fixable guns shows if there is a bayonet attached, examining unfixable ones shows nothing
can fix onto anything that is a rifle or smg
can fix combat knife, survival knife, and e-dagger
Why / Balance

Is cool.
Makes it easier to use melee with your gun since taking out a knife during close quarters combat is deceptively hard.
You cannot:

Fix anything that isn't a combat knife, survival knife, or epen.
Fix onto shotguns.
Fix onto grenade launchers.
Fix onto pistols.
Fix onto machine guns.

The swing time will always be the same (1 second).
Technical details

Allows wide swings on guns as long as the gun shoot with left click (see: crusher)
Adds the MeleeRequiresObjectInSlot component, which, when present, will only allow a melee weapon to be used if there is any item present in the slot specified.
Adds 2 variables to MeleeWeaponComponent, one for removing heavy attack capability and one for removing light attack capability.
The melee damage of the gun (the gun swings) when a bayonet is inserted is changed to the damage of the bayonet. This means admeme 9001 damage epen actually works as a bayonet
Adds the Bayonet tag, which allows a melee weapon to go into the bayonet slot in a gun.
Media

https://github.com/space-wizards/space-station-14/assets/45953835/4deb4516-fefc-4ad4-98a2-60bac472b2ed

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

:cl:

add: You can now attach combat knives, survival knives, and e-pens to the C-20r, Lecter, Drozd, AKMS, and WT550.

you forgot kitchen knives (they are technically knives)

we need bayonet for the spear.

we need bayonet for the spear.

isnt a spear WAY too big (except for like big big guns ig)

isnt a spear WAY too big (except for like big big guns ig)

i mean make knives attachable to the spears.
Why?  Why? Because it's fun.

oh

i mean make knives attachable to the spears.

human head spear bayonet :trollface:

so bayonets will fit on the C20R, WT550 and PKA but not the lecter or L6 SAW?

so bayonets will fit on the C20R, WT550 and PKA but not the lecter or L6 SAW?

I think Lecter would make some sense to have one, also can't forget the customary Mosin bayonet!

you forgot kitchen knives (they are technically knives)

they probably wouldn't have a bayonet lug, which allows them to be attached

use duct tape on kitchen knife to attack it to a gun, but it has a chance of falling off when used

will we be able to attach e-daggers?

how modular of a system is this? by that i mean how easy would it be to apply the same logic but with flashlights?

So... yeah. Is this a gun attachments system?

so bayonets will fit on the C20R, WT550 and PKA but not the lecter or L6 SAW?

lecter yes, l6 no

So... yeah. Is this a gun attachments system?

it's just ItemSlotsSystem

how modular of a system is this? by that i mean how easy would it be to apply the same logic but with flashlights?

maybe not as modular as i'd like it to be, but MeleeRequiresObjectInSlot is at least somewhat
depends on how easy it is to make lights come off of things with flashlights inside

To be honest I'm not a fan of the implementation here, its too hard coded and not modular in a way that would aid future additions of attachments

To be honest I'm not a fan of the implementation here, its too hard coded and not modular in a way that would aid future additions of attachments
Unfortunate to say we might need some kind of attachment system before this can be implemented ideally :o

guy who was working on attachment system stopped working on it

To be honest I'm not a fan of the implementation here, its too hard coded and not modular in a way that would aid future additions of attachments
Unfortunate to say we might need some kind of attachment system before this can be implemented ideally :o

guy who was working on attachment system stopped working on it

To my knowledge, and I know what flareguy said, nobody was ever actually working on an attachment system. There was only conversation around maybe working on it. Nothing was ever shown for that or further discussed. Regardless, it still holds that in my own opinion, implementing bayonets as standalone feels a bit jank conceptually. Of course, I am not a maintainer, so this is only my input.

i'm Done™, i just need to add media

maybe leave the atreides, M90GL and vector out of the change log because they are currently unobtainable

maybe leave the atreides, M90GL and vector out of the change log because they are currently unobtainable

yea

media added

not done

maybe guns can do a melee attack without bayonets, but have it do like 6 damage

now i am done

now i am done

I've gotten the chance to more deeply peer-review the changes. I am not a maintainer, but I wanted to share some feedback because I believe there are some elements of the implementation that may be problematic and need consideration:

The ItemSlotsSystem subscribes to an AttemptMeleeEvent. The problem is that this doesn't feel like the place for that, since its purpose is not related to the logic for item slots.
The SharedGunSystem checks for an item slot of a hardcoded name. This results in an unintuitive interface, because devs will need to know that the item slot requires a specific name if they want their bayonets to work.
Inserting a bayonet seems to copy the weapon's stats onto the gun's required MeleeWeaponComponent instead of making the knife itself usable from the gun. This is the biggest reason I believe in the necessity of a dedicated attachment system that would directly use any attached gear like flashlights or bayonets or under-barrel launches, instead of copying the functionality.

I've gotten the chance to more deeply peer-review the changes. I am not a maintainer, but I wanted to share some feedback because I believe there are some elements of the implementation that may be problematic and need consideration:

The ItemSlotsSystem subscribes to an AttemptMeleeEvent. The problem is that this doesn't feel like the place for that, since its purpose is not related to the logic for item slots.

not sure why that's there, will move

The SharedGunSystem checks for an item slot of a hardcoded name. This results in an unintuitive interface, because devs will need to know that the item slot requires a specific name if they want their bayonets to work.

that's a failsafe. don't know why i did that.

Inserting a bayonet seems to copy the weapon's stats onto the gun's required MeleeWeaponComponent instead of making the knife itself usable from the gun. This is the biggest reason I believe in the necessity of a dedicated attachment system that would directly use any attached gear like flashlights or bayonets or under-barrel launches, instead of copying the functionality.

the sprite that shows up when you swing the bayonet is that of the gun which is intended. making the gun swing instead of the bayonet is the most direct way to make this happen
the swing speed is always 1 attack per second, and i'd rather only modify the gun instead of the bayonet. it makes keeping track of what has happened easier, and means the bayonet doesn't need to be changed again when it's removed.
this pr is about bayonets. there are a lot of different things that have to be added in order for that to work, and if this was bundled into an all-in-one attachment system it would get really convoluted almost immediately. maybe attachments for flashlights, not for bayonets.

There is no visual information for what a target is being attacked by. If these guns are really going to have no bayonet sprites on them, that means the only source of visual telling would have to be the melee attack's sprite, and youve intended it to still be the gun.

the difference is that you can see they are attacking with a bayonet and you can see that immediately, which tells you they can still shoot you even if they screw up on stabbing you.
i TRIED to add a wide swing visual for the bayonets except it just didn't want to work.

This is more concerning than you might expect. If there exists a bayonet-attachable weapon that has a small wide-swing angle and an attack speed slower than 1 attack per second, then it becomes the case that attaching that weapon to a gun is the optimal way to wield it, because it will gain a larger wide-swing arc and faster attack speed since those are hardcoded.

the increased wide swing angle is a side effect of it being attached to a gun, but if it is a serious problem i can change it. i wasn't thinking about the attack speed, so i'll cap it at 1.

I am not unaware of what the PR is about, my point is that if it's just about bayonets, it's not being conscious of future content. A proper attachment system may be complex, but not convoluted. In all honestly, the implementation here is more fitting of the word convoluted. This PRs issues should not be hidden behind claims of scope.

alright. i won't draft this but i'll still try and make a functional and intuitive attachments system.

alright. i won't draft this but i'll still try and make a functional and intuitive attachments system.

Only if you want to. It's not on you to work on anything youre not enthusiastic about.  We're all volunteers and no one can make you take on a larger project, especially not me. I only warn of my own assessment and opinion. When the maintainers get around to reviewing this, listen to them over me.

alright. i won't draft this but i'll still try and make a functional and intuitive attachments system.

Only if you want to. It's not on you to work on anything youre not enthusiastic about. We're all volunteers and no one can make you take on a larger project, especially not me. I only warn of my own assessment and opinion. When the maintainers get around to reviewing this, listen to them over me.

i worked on it for like 5 seconds before realizing i was just making item slots but worse

no visuals?

no visuals?

i tried

no visuals?

he tried
womp womp 🎺

what even is this error

i love you notquitehadouken:fix_bayonet but my implementation is janky ahh and barely works

NOOO
https://github.com/space-wizards/space-station-14/assets/135462166/ebc30625-374a-4005-ade1-3e70cd25de75

I'd say this COULD be applied to the surplus rifle exclusively to make it be not such a shit option but... Ehhhh, I'm mostly looking at the sprite.

Tragedy

NOOO
sad-cry.mp4

i'm sorry jim

So have you given up or will you try again later?


Add percentage of billable hours entered in status view (staging changes + pushed changes screens)

When closing editing mode or after pushing hours, I want to have two percentage values such as:

85% of your hours are billable
15% of your hours aren't chargeable

Closing it for now as there seems to be limited interest in this feature.


subtraction error

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-intro-kotlin-practice-problems?authuser=1&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-1-pathway-1%3Fauthuser%3D1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-intro-kotlin-practice-problems#11
In which task and step of the codelab can this issue be found?
Message formatting
Describe the problem
I  came across an issue when you have this it would be more accurate to use the thirdNumber instead of the secondNumber as the parameter for calculating the difference
Steps to reproduce?

Go to...
Click on...
See error...

Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
before the fix looks this

after the fix should be like this

Hi @mkaomwakuni
Thank you for writing in with this concern.
The function is meant to be using the parameter names firstNumber and secondNumber in a general way.
It is not meant to represent the variables firstNumber and secondNumber declared in the code.
I do understand your point that these could be improved.
Hope you are enjoying the course!
Regards.


Add convenience registration methods, fix build scripts

This PR adds some new helper methods I've written to improve the general process of registering certain types of data fields:

registerCheckbox registers a toggleable boolean value, rendered as a checkbox in the editor.
registerEnum registers an enum that can be expressed as an integer. The signature calls for conformance to Nameable which would allow the names to show up correctly in the editor.
registerInt registers a range picker for an integer value.
registerFilePicker registers a file picker to pick from a series of files. For macOS 10.15, this accepts a string array of the file extensions. For macOS 11.0+, this accepts an array of uniform type idenfitiers (UTType). In turn, this also includes some UTType instance for various Godot-specific files such as tscn and tres.
registerTextField registers a text field with a string that can be manipulated.
registerTextView is similar to registerTextField, but supporting multiline strings.

For writing setter methods, one can call the ClassInfo.withCheckedProperty method to take care of typical work for ensuring values exist:
func setProperty(args: [Variant]) -> Variant? {
    withCheckedProperty(named: "magic", args: args) { argument in
        // Do something here...
    }
}

This PR also makes some minor tweaks to the build scripts to build the universal binaries only when run on Apple Silicon devices. Because GitHub Actions agents don't have Apple Silicon runners yet, building the framework fails.

@migueldeicaza I can imagine that these helper methods may help with writing the macros to auto-register these properties.

Thanks for this patch!
I am guessing that some of these methods are helpers that are invoked from the class initialization process?
My only reservation is that this might be duplicating functionality of a macro-based approach.   I have not finished watching the Macro videos, nor started experimenting, but it feels like we could achieve most of this with macros (I filed a few bugs with more detailed information of what I have in mind).
My big caveat with Macros right now is if I can fully automate the class generation

I am guessing that some of these methods are helpers that are invoked from the class initialization process?

Yes, these would be called in the class initialization process:
extension AnthroCharacterBody2D {
    static var initClass: Void = {
        let classInfo = ClassInfo<AnthroCharacterBody2D>(name: "AnthroCharacterBody2D")
        classInfo.registerEnum(named: "character",
                               for: Character.self,
                               prefix: "player",
                               getter: AnthroCharacterBody2D.getCharacter,
                               setter: AnthroCharacterBody2D.setCharacter)

        classInfo.addPropertyGroup(name: "Movement", prefix: "movement_")
        classInfo.registerInt(named: "acceleration",
                              range: 1 ... 1000,
                              stride: 5,
                              prefix: "movement",
                              getter: AnthroCharacterBody2D.getAcceleration,
                              setter: AnthroCharacterBody2D.setAcceleration)
        classInfo.registerInt(named: "speed",
                              range: 1 ... 1000,
                              prefix: "movement",
                              getter: AnthroCharacterBody2D.getSpeed,
                              setter: AnthroCharacterBody2D.setSpeed)
        classInfo.registerInt(named: "friction",
                              range: 1 ... 1000,
                              prefix: "movement",
                              getter: AnthroCharacterBody2D.getFriction,
                              setter: AnthroCharacterBody2D.setFriction)
    }()
}

Whether these can be used for macro expansion could depend on a few factors, and it may not be necessary for macros at all. However, I do think this would be a suitable solution for now since, to my knowledge, Swift 5.9 is still in a beta phase, along with everything else introduced in WWDC. Likewise, it might be a safe bet to keep this for older Swift versions, or if people prefer to do it manually.

I'll digest some more, they might be the building blocks the macros use, or as an option for manual configuration.

Here is a taste of the macro integration I am working on, currently this works by applying the "Godot" attribute to the class, and then any method with the @Export attribute are registered in this way.
What I think I need to do is make it so that the @Export attribute can take parameters for properties that define the sort of information that is passed to the registration, so that it is not hardcoded:
https://github.com/migueldeicaza/SwiftGodot/issues/86

Here is a taste of the macro integration I am working on, currently this works by applying the "Godot" attribute to the class, and then any method with the @export attribute are registered in this way.
What I think I need to do is make it so that the @export attribute can take parameters for properties that define the sort of information that is passed to the registration, so that it is not hardcoded:
#86

It does look like an interesting approach, though I wonder if it makes more sense to split the export up to different types to make it clearer as to what's happening:
class SomeNode: Node {
    @PickerNameProvider
    enum PlayerClass: Int {
        case barbarian
        case mage
        case wizard
    }
    @ExportedEnum public var playerClass: PlayerClass = .barbarian
}

Could end up producing something like:
static var classInfoRegisty: Void = {
    let classInfo = ClassInfo<SomeNode>(name: StringName("SomeNode"))
    classInfo.registerEnum(named: "playerClass",
                           for: PlayerClass.self,
                           getter: SomeNode._getPlayerClass,
                           setter: SomeNode._setPlayerClass)
}

func _getPlayerClass(args _: [Variant]) -> Variant? { Variant(playerClass.rawValue) }
func _setPlayerClass(args: [Variant]) -> Variant? {
    ClassInfo.withCheckedProperty(named: "playerClass", args: args) { arg in
        playerClass = PlayerClass(rawValue: Int(arg) ?? 0) ?? .barbarian
    }
}

My general feeling is to not declare too many macros for individual exports, but this might be an exception, because one bit I have struggled with is this: macros operate at the syntax-level, they do not really operate at the semantic level.
So when I am looking at this piece of code: public var playerClass: PlayerClass = .barbarian  there is no easy way of knowing that PlayerClass is an enumeration or what their values are: as far as SwiftSyntax is concerned this is a type identifier.   So the @ExportedEnum usage would be a good hint to drive the registration in a different way.
Another option is to add arguments to @Export, so we could do various things like:
@Export (hint: "Measured in meters", minValue: 0, maxValue: 10)
var distance: Float

So in this case, it could be:
@Export (useEnum: true)
var public var playerClass: PlayerClass = .barbarian

Btw, I suggest we move this discussion to discussions.

Btw, I suggest we move this discussion to discussions.

Sure, I've moved the disucssion to #94 .


Create ipc

Hi, i want add my school from ipc ( Polytechnic Institute of Coimbra) and my university's name is ESTGOH(escola superior de oliveira do hospital).

@mirandapt123 I am sorry, it is unclear from your request, what is your school email domain. I have to close the request without merging. Please ensure you are familiar with this repository rules located at the bottom of this page and submit a new request with correct information.
If you have troubles with submitting a request to add a file representing your school's email domain to the repository on GitHub, please let us know by email to<EMAIL_ADDRESS>and we will do it for you. Please specify your email domain in the email.
Thank you for the understanding!


Suggestion - Add option to auto minimise "Fifth City Stories" section

When changing settings to London, the Fifth Cities Stories box always expands.  Would it be possible to add a feature in the next version to prevent this (ie when changing settings to the Fifth City, the box does not automatically expand)?

Technically - yes.


cdburnerxp: fix download url & checkver

Closes #XXXX

Relates to #XXXX

[X] I have read the Contributing Guide.

/verify


Character count in addition to word and line counts

It would be great to be able to show the character count, not only words and lines. Character counts are helpful to meet a fields min or max character validation.

Hello @lasseeee , have you managed a custom implementation of this ?

Nope, I didn't look into it further. I settled with backend validation.

Hi @lasseeee and @HectorLS
I needed almost the same feature: char count and standard-pages approx count.
I included easymde in my VueJS application in a module so I implemented the function in that module.
There is a computed property which updates continuously the counters calling a method to do the count.
Probably is not the best way to approach at least computationally speaking but it should be an on-going calculation. Maybe it can be deactivated by some flag or related to a button.
I used some regex to exclude from calculation the characters used for formatting (e.g. bold should be only 4 digits: excluding the stars)
I'm going to post the function-related code I wrote, maybe it could help or be used in the core code of easymde if you like.
<template>

    <textarea
      class="vue-simplemde-textarea"
      :name="name"
      :value="value"
      @input="handleInput($event.target.value)"
    />

      **{{countChars}}**

</template>

Did anyone manage to integrate this directly into easy mardown editor?

Guys, I created a PR here:
https://github.com/Ionaru/easy-markdown-editor/pull/304


Sort SQL Function and Method References Alphabetically

Currently the sequence of SQL functions and methods is unsorted in the reference bodies.

Fixed by https://github.com/ArcadeData/arcadedb-docs/pull/151 .


Add OpenMetrics V2 service check to Vault

What does this PR do?
Add the Openmetrics V2 service check to the service_check.json
Motivation
This check now supports Openmetrics V2. QA for #11293
Additional Notes
https://dd.datad0g.com/check/summary?id=vault.openmetrics.health
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached

Great catch! Can you also add vault.prometheus.health?

Added, thanks! Quick question though, for the version, I traced it back to when we first supported prometheus for this check. Should that be "agent_version" or should it be 7.35.0?


This does not work for me

I am able to use Fixed AB#{ID} to link commits, but it does not change workflow state.
How can I get help with troubleshooting this?

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: c82842d8-dd84-249f-cce1-9e93ecf703bf
Version Independent ID: eaf9a299-4492-8e09-287a-f10b63d15e29
Content: Link GitHub commits, PRs, and issues to work items - Azure Boards
Content Source: docs/boards/github/link-to-from-github.md
Service: azure-devops-boards
GitHub Login: @chcomley
Microsoft Alias: chcomley

@eliseburriss -- Elise, thank you for your feedback.  Please consider these resources, and let me know if they help:

Azure DevOps Services
Azure DevOps on Stack Overflow


CPP: dbscheme annotations

I have a very old note that we really should be using keyset more in the CPP dbscheme, as it's use should lead to better optimization (see https://semmle.com/wiki/display/IN/Schemas and page 8 of https://docs.google.com/presentation/d/1NhfjCmFIXin2Wi6QsU2Lw1Kc1ppUxJiHMYNZ1Wnx-30/edit?pli=1#slide=id.g293b9765be_0_158).  Since performance is on our minds at the moment (though possibly not really until Q2) I thought it would be a good time to raise the topic.
I've annotated about 10% of the dbscheme here as conversation starter.  This is not remotely ready to merge because:

I haven't created the required upgrade script
I haven't tested for correctness (odasa checkDatabase...)
I haven't tested for performance gains (or losses)

Do these changes look correct?  Useful?  What are your thoughts?
@ian-semmle @nickrolfe

@geoffw0 Could you also add a revert of #861? Cc @felicity-semmle and @jf205.

Rebased onto latest master.  Added an upgrade script in https://git.semmle.com/Semmle/code/pull/30828.

Just did a bit of testing locally on a small Windows project.  I can confirm that @dave-bartolomeo 's changes to aggregate_field_init and aggregate_array_init both resolve issues, other than that the results of checkDatabase are identical on builds with and without the changes in this PR.
  These are not caused by this PR.  @ian-semmle do we have any automated checks for this stuff?  On what platforms?

Yes, qltest checks database consistency for all the testsuite databases on all platforms. We know that there are still problems in real-world databases; it just takes time to boil them down into a testcase and fix them.

OK, great (let me know if there's anything I can do to help with that).

I just built and checkDatabased 'cmake' (via MinGW), with and without these changes.  Some problems with aggregate_array_init are fixed.  Some [WARNING: INVALID_KEY] problems with valuebind, decltypes, enumconstants, globalvariables, membervariables, var_decls, fun_decls exist before and after, and there are some [VALUE_NOT_IN_TYPE] errors.  There are no new problems.
I've not seen any problems.  Are we waiting for anything?  Should I retarget this to rc/1.20?

I've just removed the annotation on externalData because it caused a test failure.


Update bower.json and package.json

Please update these files to lates version https://github.com/fians/Waves/releases/tag/0.6.2

Just bump the version along with new documentation page. :wink:


distributed_table materialization doesn't guranatee idempotency (in respect of table structure)

Describe the bug and step to reproduce:
In dbt, default behavior of table materialization is to drop and recreate the table. If I run the same dbt model twice, the second run will drop the table and recreate it.
Unfortunately, this is not the case for distributed_table materialization. Here is how I tested it:
1. Model sql file
{{
    config(
        materialized='distributed_table',
        order_by=['code'],
        sharding_key='cityHash64(code)',
        engine="ReplicatedReplacingMergeTree(created_at)",
        settings = { 'index_granularity': 8192},
    )
}}

-- just sample data
select
    CAST('A000070' AS String) as code,
    now() AS created_at

2. First dbt run
Even thougth the model query above is simple, there are many queries run in the background. I attached some impiortant steps happend in background:
.
.
.

-- local table
create table `dp_rankingdb_dbt_dev`.`jw_local` ON CLUSTER "dp" (
    code String, created_at DateTime
)
engine = ReplicatedReplacingMergeTree(created_at)
order by (code)
SETTINGS index_granularity=8192

-- distributed table
create or replace table `dp_rankingdb_dbt_dev`.`jw` ON CLUSTER "dp" as `dp_rankingdb_dbt_dev`.`jw_local`
ENGINE = Distributed('dp', 'dp_rankingdb_dbt_dev', 'jw_local', cityHash64(code))

-- insert data
insert into `dp_rankingdb_dbt_dev`.`jw`
("code", "created_at")
select
    CAST('A000070' AS String) as code,
    now() AS created_at

.
.
.

3. Result of the first run
Result of SHOW CREATE TABLE dp_rankingdb_dbt_dev.jw_local is what I expected and meant to be:
CREATE TABLE dp_rankingdb_dbt_dev.jw_local
(
    `code` String,
    `created_at` DateTime
)
ENGINE = ReplicatedReplacingMergeTree(
    '/clickhouse/tables/{shard}/dp_rankingdb_dbt_dev/jw_local',
    '{replica}', created_at
)
ORDER BY code
SETTINGS index_granularity = 8192

Of course, Result of SHOW CREATE TABLE dp_rankingdb_dbt_dev.jw is also what I expected as well.
4. Second dbt run
In this time, queries executed in background a little bit different:
.
.
.
create table `dp_rankingdb_dbt_dev`.`jw_local__dbt_backup` ON CLUSTER "dp" (
    code String, created_at DateTime
)
engine = ReplicatedReplacingMergeTree(created_at)
order by (code)
SETTINGS index_granularity=8192

SYSTEM SYNC REPLICA ON CLUSTER "dp" dp_rankingdb_dbt_dev.jw_local

EXCHANGE TABLES `dp_rankingdb_dbt_dev`.`jw_local__dbt_backup` AND `dp_rankingdb_dbt_dev`.`jw_local` ON CLUSTER "dp"

create or replace table `dp_rankingdb_dbt_dev`.`jw` ON CLUSTER "dp" as `dp_rankingdb_dbt_dev`.`jw_local`
ENGINE = Distributed('dp', 'dp_rankingdb_dbt_dev', 'jw_local', cityHash64(code))

insert into `dp_rankingdb_dbt_dev`.`jw`
    ("code", "created_at")
select
    CAST('A000070' AS String) as code,
    now() AS created_at

drop table if exists `dp_rankingdb_dbt_dev`.`jw_local__dbt_backup` ON CLUSTER "dp" SYNC
.
.
.

It run successfully but the result of SHOW CREATE TABLE dp_rankingdb_dbt_dev.jw_local is not what I expected:
CREATE TABLE dp_rankingdb_dbt_dev.jw_local
(
    `code` String,
    `created_at` DateTime
)
ENGINE = ReplicatedReplacingMergeTree(
    '/clickhouse/tables/{shard}/dp_rankingdb_dbt_dev/jw_local__dbt_backup',
    '{replica}',
    created_at
)
ORDER BY code
SETTINGS index_granularity = 8192

As you can see here, the path of the table is changed to dp_rankingdb_dbt_dev.jw_local__dbt_backup!!
And I found out that this happend because of the EXCHANGE TABLES ..  query above.
Note: If you manually run(not via dbt run) SHOW CREATE TABLE dp_rankingdb_dbt_dev.jw_local__dbt_backup before drop table if exists dp_rankingdb_dbt_dev.jw_local__dbt_backup ON CLUSTER "dp" SYNC,
you will see that the ReplicatedReplacingMergeTree path will be jw_local instead of jw_local__dbt_backup. They are literally the EXCHANGED!
You might ask, so what?
... this lead to a problem in the next run(3rd dbt run) because dbt run will invoke below query again in next run:

create table `dp_rankingdb_dbt_dev`.`jw_local__dbt_backup` ON CLUSTER "dp" (
    code String, created_at DateTime
)
engine = ReplicatedReplacingMergeTree(created_at)
order by (code)
SETTINGS index_granularity=8192

.
.
.

and it raised error:
08:05:06  Finished running 1 distributed_table model in 0 hours 0 minutes and 4.74 seconds (4.74s).
08:05:06
08:05:06  Completed with 1 error and 0 warnings:
08:05:06
08:05:06    Database Error in model jw (models\dp_rankingdb\jw.sql)
  HTTPDriver for http://analysis-clickhouse.live.abcd.bz:8123 returned response code 500)
   Code: 253. DB::Exception: There was an error on [dc1-pr-clickhouse03.abcd.bz:9000]: Code: 253. DB::Exception: Replica /clickhouse/tables/clickhouse02/dp_rankingdb_dbt_dev/jw_local__dbt_backup/replicas/clickhouse03 already exists. (REPLICA_ALREADY_EXISTS) (version <IP_ADDRESS> (official build)). (REPLICA_ALREADY_EXISTS) (version <IP_ADDRESS> (official build))

This happend because drop table if exists dp_rankingdb_dbt_dev.jw_local__dbt_backup ON CLUSTER "dp" SYNC delete jw_local instead of  jw_local__dbt_backup (because they are interchanged!) so path of jw_local__dbt_backupstill exists when dbt try to create dp_rankingdb_dbt_dev.jw_local__dbt_backup again...
I checked the codes in dbt/include/clickhouse/macros/materializations/distributed_table.sql and found out that this is somewhat related with backup table creation,
but I think this kind of behavior is not well aligned with the default behavior of materialization in dbt..
Configuration
Environment

dbt version: 1.7.17
dbt-clickhouse version: 1.7.7
clickhouse-driver version (if using native) 21.3+
clickhouse-connect version (if using http):
Python version: 3.9.17
Operating system: tested on windows, ubuntu both

ClickHouse server

ClickHouse Server version: <IP_ADDRESS>
ClickHouse Server non-default settings, if any:
CREATE TABLE statements for tables involved:
Sample data for these tables, use clickhouse-obfuscator if necessary

Have a similar issue, but using ReplicatedMergeTree instead of Distributed

Hi
Here is an answer
https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/replication

The path in ClickHouse Keeper cannot be changed

So, exchange/rename wont work twice in a row with the same name of second table
Should work well with explicit reference of uuid in model configuration:
engine="ReplacingMergeTree('/clickhouse/tables/{shard}/{database}/{table}/{uuid}', '{replica}')"

Hi
Here is an answer
https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/replication

The path in ClickHouse Keeper cannot be changed

So, exchange/rename wont work twice in a row with the same name of second table
Should work well with explicit reference of uuid in model configuration:
engine="ReplacingMergeTree('/clickhouse/tables/{shard}/{database}/{table}/{uuid}', '{replica}')"