Skip to content

Commit

Permalink
Merge branch 'master' into ci-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar authored Oct 23, 2024
2 parents f4f7909 + 21e4014 commit dc666f2
Show file tree
Hide file tree
Showing 11 changed files with 1,559 additions and 80 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
"ms-python.python",
"vscode-es6-string-html"
]
}
},
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,48 +36,3 @@ jobs:
pip install ruff
- name: ruff --> Check code formatting
run: ruff format --check .

# Use pipreqs to check for missing dependencies
pipreqs-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run pipreqs
run: |
pipreqs --savepath pipreqs.txt . 2>&1 | tee pipreqs_output.log
if grep -q 'WARNING: Package .* does not exist or network problems' pipreqs_output.log; then
missing_packages=$(grep 'WARNING: Package .* does not exist or network problems' pipreqs_output.log | sed -E 's/.*Package "(.*)" does not exist.*/\1/')
echo "ERROR: Add unresolved packages to requirements. Missing package(s): $missing_packages. Example: '<pkg> @ git+https://github.com/<author>/<repo>.git'"
exit 1
fi
- name: Compare requirements
run: |
# Extract and sort package names
awk -F'(=|==|>|>=|<|<=| @ )' '{gsub("-", "_", $1); print $1}' requirements.txt | tr '[:upper:]' '[:lower:]' | sort -u > requirements.compare
awk -F'(=|==|>|>=|<|<=| @ )' '{gsub("-", "_", $1); print $1}' pipreqs.txt | tr '[:upper:]' '[:lower:]' | sort -u > pipreqs.compare
# Compare package lists
missing_packages=$(comm -23 pipreqs.compare requirements.compare)
if [ -z "$missing_packages" ]; then
echo "All packages in pipreqs are listed in requirements"
exit 0
else
echo "Some packages in pipreqs are not listed in requirements"
echo ""
echo "=== Missing packages ==="
echo "$missing_packages"
exit 1
fi
18 changes: 11 additions & 7 deletions conda_requirements.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
channels:
- conda-forge
dependencies:
- python=3.12
- 'conda-forge::pango>=1.42.0'
- 'conda-forge::pandas>=1.3.2'
- conda-forge::psycopg2
- conda-forge::open-fonts
- conda-forge::xorg-libxrender
- conda-forge::xorg-libxext
- conda-forge::xorg-libxau
- pango>=1.42.0
- pandas>=1.3.2
- psycopg2
- open-fonts
- xorg-libxrender
- xorg-libxext
- xorg-libxau
- pip:
- '-r requirements.txt'
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ nose
numpy>=1.12.1
oauth2>=1.9.0.post1
openpyxl
pandas
psycopg2
pycryptodome>=3.6.1
pyparsing>=2.2.0
python-dateutil>=2.7.5
Expand Down
1 change: 0 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ipdb
pipreqs
ruff
selenium
14 changes: 11 additions & 3 deletions run_dir/design/element_flowcell.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
{% extends 'base.html' %}
{% block stuff %}
<div id="page_content">
<h1>Element BioSciences (AVITI) run <span id="page_title"></span></h1>
<div>Under construction. This page should contain information about a single element biosciences run.</div>
<div id="element_vue_app">
<v-element-flowcell ngi_run_id="{{ngi_run_id}}"/>
</div>
{% end %}

{% block js %}

<script src="/static/js/vue.v3.2.47.global.prod.js"></script>
<script src="/static/js/axios.v1.3.4.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="/static/js/element_flowcell.js?v={{ gs_globals['git_commit'] }}"></script>

{% end %}

24 changes: 12 additions & 12 deletions run_dir/design/element_flowcells.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ <h1>

<thead style="vertical-align: top">
<tr class="sticky darkth">
<th class="sort" data-sort="ngi_run_id">NGI Run ID</th>
<th class="sort" data-sort="start_date">Start date</th>
<th class="sort" data-sort="run_name">Run name</th>
<th class="sort" data-sort="run_type">Run type</th>
<th class="sort" data-sort="side">Side</th>
<th class="sort" data-sort="cycles">Cycles</th>
Expand All @@ -21,8 +21,8 @@ <h1>
</thead>
<tfoot>
<tr class="darkth">
<th class="sort searchable" data-sort="ngi_run_id">NGI Run ID</th>
<th class="sort searchable" data-sort="start_date">Start date</th>
<th class="sort searchable" data-sort="run_name">Run name</th>
<th class="sort searchable" data-sort="run_type">Run type</th>
<th class="sort searchable" data-sort="side">Side</th>
<th class="sort searchable" data-sort="cycles">Cycles</th>
Expand All @@ -35,9 +35,8 @@ <h1>
<tbody class="list">
{% for onefc in element_fcs %}
<tr>
<td class="start_date">{{ onefc.key[:10] }}</td>
<td class = run_name>
<a class="text-decoration-none" href="/flowcells_element/{{ onefc.id }}">{{ onefc.value['RunName'] }}</a>
<td class="ngi_run_id">
<a class="text-decoration-none" href="/flowcells_element/{{ onefc.key }}">{{ onefc.key }}</a>
{% if onefc.value.get('Outcome') == 'OutcomeCompleted' %}
<abbr title="Run completed"><span class="fa fa-check-circle"></span></abbr>
{% elif onefc.value.get('Outcome') == 'ongoing' %}
Expand All @@ -48,26 +47,27 @@ <h1>
<abbr title="Run failed"><span class="fa fa-file-dashed-line"></span></abbr>
{% end %}
</td>
<td class="start_date">{{ onefc.key[:8] }}</td>
<td class="run_type">
{{ onefc.value["RunType"] }}
{{ onefc.value.get("RunType") }}
</td>
<td class="side">
{{ onefc.value["Side"] }}
{{ onefc.value.get("Side") }}
</td>
<td class="cycles">
{{ onefc.value["Cycles"] }}
{{ onefc.value.get("Cycles") }}
</td>
<td class="throughput_selection">
{{ onefc.value["ThroughputSelection"] }}
{{ onefc.value.get("ThroughputSelection") }}
</td>
<td class="kit_configuration">
{{ onefc.value["KitConfiguration"] }}
{{ onefc.value.get("KitConfiguration") }}
</td>
<td class="chemistry_version">
{{ onefc.value["ChemistryVersion"] }}
{{ onefc.value.get("ChemistryVersion") }}
</td>
<td class="outcome text-center">
{{ onefc.value["Outcome"] }}
{{ onefc.value.get("Outcome") }}
</td>
</tr>
{% end %}
Expand Down
1 change: 0 additions & 1 deletion run_dir/design/pricing_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

{% block js %}

<!-- development version, includes helpful console warnings -->
<script src="/static/js/vue.v3.2.47.global.prod.js"></script>
<script src="/static/js/axios.v1.3.4.min.js"></script>
<script src="/static/js/dataTables-extensions-1.13.6.min.js"></script>
Expand Down
Loading

0 comments on commit dc666f2

Please sign in to comment.