Skip to content

Instantly share code, notes, and snippets.

@mvdbeek
mvdbeek / delete_histories_without_user_and_history_items.sql
Created March 13, 2024 11:50
delete first 100 user and history-item-less histories
BEGIN;
-- Clean up pgcleanup table
DELETE FROM cleanup_event_history_association WHERE cleanup_event_history_association.history_id IN (SELECT id FROM history WHERE history.user_id is null AND history.hid_counter = 1 ORDER BY history.update_time LIMIT 100);
-- Clean up audit table
DELETE FROM history_audit WHERE history_audit.history_id IN (select id from history where history.user_id is null and history.hid_counter = 1 ORDER BY history.update_time LIMIT 100);
-- Cleanup galaxy_session_to_history
DELETE FROM galaxy_session_to_history WHERE galaxy_session_to_history.session_id IN (SELECT galaxy_session.id FROM galaxy_session WHERE galaxy_session.current_history_id IN (SELECT history.id FROM history WHERE history.user_id is null AND history.hid_counter = 1 ORDER BY history.update_time LIMIT 100));
-- Clean up galaxy_session
DELETE FROM galaxy_session WHERE galaxy_session.current_history_id IN (select id from history where history.user_id is null AND history.hid_counter = 1 ORDER BY history.update_time LIMIT 10
This file has been truncated, but you can view the full file.
Hmm, those tests are passing, but if you look at the logs it appears that some functionality is actually broken ?
```
================================================================ test session starts =================================================================
platform darwin -- Python 3.11.7, pytest-7.4.4, pluggy-1.4.0 -- /Users/mvandenb/src/galaxy/.venv/bin/python3.11
cachedir: .pytest_cache
metadata: {'Python': '3.11.7', 'Platform': 'macOS-14.1.1-arm64-arm-64bit', 'Packages': {'pytest': '7.4.4', 'pluggy': '1.4.0'}, 'Plugins': {'cwltest': '2.4.20240129145612', 'asyncio': '0.23.5', 'postgresql': '5.1.0', 'instafail': '0.5.0', 'shard': '0.1.2', 'html': '4.1.1', 'json-report': '1.5.0', 'pytest_httpserver': '1.0.9', 'metadata': '3.1.1', 'cov': '4.1.0', 'playwright': '0.4.4', 'mock': '3.12.0', 'base-url': '2.1.0', 'anyio': '4.2.0', 'celery': '0.0.0'}, 'Base URL': ''}
rootdir: /Users/mvandenb/src/galaxy
configfile: pytest.ini
plugins: cwltest-2.4.20240129145612, asyncio-0.23.5, postgresql-5.1.0, instafai
@mvdbeek
mvdbeek / gist:91a9ab31b19652dc1f54075d3b185d21
Created February 16, 2024 16:17
rucio wheel with space
❯ python setup.py bdist_wheel
requirement found install_requires requests<=2.31.0,>=2.25.1
requirement found install_requires urllib3~=1.26.18
requirement found install_requires dogpile.cache~=1.2.2
requirement found install_requires tabulate~=0.9.0
requirement found install_requires jsonschema~=4.20.0
requirement found install_requires paramiko~=3.4.0
requirement found kerberos kerberos~=1.3.1
requirement found kerberos pykerberos~=1.2.4
requirement found kerberos requests-kerberos>=0.14.0
@mvdbeek
mvdbeek / invalid_markdown.txt
Created December 5, 2023 11:47
invalid markdown
# VGP Kmer profiling and mitogenome report
Time workflow was run:
```galaxy
invocation_time()
```
## GenomeScope results
@mvdbeek
mvdbeek / test_file_schema.json
Last active December 4, 2023 11:52
test_file_schema.json
{
"$defs": {
"AssertAttributeIs": {
"additionalProperties": false,
"properties": {
"path": {
"description": "Path to check for. Valid paths are the simplified subsets of XPath implemented by lxml.etree; https://lxml.de/xpathxslt.html for more information.",
"title": "Path",
"type": "string"
},
@mvdbeek
mvdbeek / select_from_ucsc.xml
Created November 28, 2023 10:16
select from ucsc
<tool id="select_from_ucsc" name="select_from_ucsc" version="0.1.0" profile="23.1">
<command><![CDATA[
echo '$url_param_value_postprocessed' > '$param_value_postprocessed'
]]></command>
<inputs>
<param name="url_param_value_postprocessed" type="select" multiple="true">
<options from_url="https://api.genome.ucsc.edu/list/ucscGenomes">
<postprocess_expression type="ecma5.1"><![CDATA[
$( Object.entries(inputs.ucscGenomes).map(([key, item]) => [`${item.description} (${item.organism})`, key]) )
]]></postprocess_expression>
@mvdbeek
mvdbeek / invocation_with_expression_evaluation_failed.md
Last active October 27, 2023 16:02
invocation_with_expression_evaluation_failed.md

Test Results (powered by Planemo)

Test Summary

@mvdbeek
mvdbeek / cgroups.txt
Created September 19, 2023 09:15
Problematic cgroup file
/slurm/uid_527616/job_25273497/step_batch:
memory.use_hierarchy: 1
memory.kmem.tcp.usage_in_bytes: 0
memory.soft_limit_in_bytes: 128849018880
memory.move_charge_at_immigrate: 0
memory.memsw.failcnt: 0
memory.kmem.tcp.max_usage_in_bytes: 0
memory.max_usage_in_bytes: 144314368
memory.oom_control: oom_kill_disable 0
under_oom 0
@mvdbeek
mvdbeek / what I think you want to send to us ?
Created September 14, 2023 10:17
ipython session parsing QS
In [2]: import urllib
In [3]: urllib.parse.parse_qs('tool_id=ucsc_table_direct1&URL=http%3A%2F%2Fgenome.ucsc.edu%2Fcgi-bin%2FhgTables&hguid=1587314780_KBXslDDpain7o5EBARpPf
...: 3nJ1NbE&db=hg38&org=Human&hgta_table=knownGene&hgta_track=knownGene&hgta_regionType=range&hgta_outputType=bed&position=chr2%3A25%2C160%2C915-2
...: 5%2C168%2C903&hgsid=1708063580_QD5ONXCqxp8H5TlaKJtczZ2cy5pQ&boolshad.hgta_printCustomTrackHeaders=0&hgta_ctName=tb_knownGene&hgta_ctDesc=table
...: +browser+query+on+knownGene&hgta_ctVis=pack&hgta_ctUrl=&fbQual=whole&fbUpBases=200&fbExonBases=0&fbIntronBases=0&fbDownBases=200&hgta_doGetBed
...: =get+BED&hgta_doGalaxyQuery=Send+query+to+Galaxy')
Out[3]:
{'tool_id': ['ucsc_table_direct1'],
'URL': ['http://genome.ucsc.edu/cgi-bin/hgTables'],
Convert characters1
Cut1
Paste1
__EXTRACT_DATASET__
__SORTLIST__
addValue
cat1
export_remote
param_value_from_file
sort1