forked from spacetelescope/jwql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into add-ML-wisp-finder
- Loading branch information
Showing
7 changed files
with
250 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#! /usr/bin/env python | ||
|
||
"""Tests for the ``archive_database_update`` module. | ||
Authors | ||
------- | ||
- Bryan Hilbert | ||
Use | ||
--- | ||
These tests can be run via the command line (omit the ``-s`` to | ||
suppress verbose output to stdout): | ||
:: | ||
pytest -s test_archive_database_update.py | ||
""" | ||
|
||
|
||
import pytest | ||
|
||
from jwql.website.apps.jwql import archive_database_update | ||
|
||
|
||
def test_filter_rootnames(): | ||
"""Test the filtering of source-based level 2 files | ||
""" | ||
files = ['jw06434-c1021_s000001510_nircam_f444w-grismr.fits', | ||
'jw01068004001_02102_00001_nrcb4_rate.fits', | ||
'jw06434-c1021_t000_nircam_clear-f090w_segm.fits', | ||
'jw06434-o001_t000_nircam_clear-f090w_segm.fits', | ||
'jw02183117001_03103_00001-seg001_nrca1_rate.fits'] | ||
|
||
filtered = archive_database_update.filter_rootnames(files) | ||
expected = ['jw01068004001_02102_00001_nrcb4_rate.fits', | ||
'jw02183117001_03103_00001-seg001_nrca1_rate.fits'] | ||
assert filtered == expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...ebsite/apps/jwql/migrations/0028_alter_filesystemcharacteristics_filter_pupil_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Generated by Django 5.1.4 on 2025-01-16 21:35 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('jwql', '0027_alter_fgsbadpixelstats_source_files_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='filesystemcharacteristics', | ||
name='filter_pupil', | ||
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(default='empty', help_text='filter and/or pupil name', max_length=7), blank=True, null=True, size=None), | ||
), | ||
migrations.AlterField( | ||
model_name='filesystemcharacteristics', | ||
name='instrument', | ||
field=models.CharField(), | ||
), | ||
migrations.AlterField( | ||
model_name='filesystemcharacteristics', | ||
name='obs_per_filter_pupil', | ||
field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), blank=True, null=True, size=None), | ||
), | ||
migrations.AlterField( | ||
model_name='filesysteminstrument', | ||
name='filetype', | ||
field=models.CharField(), | ||
), | ||
migrations.AlterField( | ||
model_name='filesysteminstrument', | ||
name='instrument', | ||
field=models.CharField(default='empty', help_text='JWST instrument name', max_length=7), | ||
), | ||
] |
Oops, something went wrong.