Skip to content

Commit

Permalink
bump all product versions to 2 (#378)
Browse files Browse the repository at this point in the history
* bump all product versions to 2

* roleout IDB version 2.26.27

* fix test with new version number in mock object

* fix test

* fix for latest IDB as fallback
  • Loading branch information
nicHoch authored Dec 19, 2023
1 parent f808732 commit e539c8b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/idb_versioning.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
IDB Versioning
==============

After a new IDB Version has been released it should be added to stixcore. All available IDB versions to stixcore are managed in the file `stixcore\data\idb\idbVersionHistory.json`
After a new IDB Version has been released it should be added to stixcore. All available IDB versions to stixcore are managed in the file `stixcore/data/idb/idbVersionHistory.json`

Follow the instructions to publish a new IDB `2.26.36` version

Expand All @@ -23,10 +23,10 @@ Follow the instructions to publish a new IDB `2.26.36` version

.. code-block:: python
idbm = IDBManager()
idbm.compile_version("2.26.36")
from stixcore.idb.manager import IDBManager
IDBManager.instance.compile_version("2.26.36")
* zip the `stixcore/data/idb/v2.26.36` folder into `v2.26.36.zip`
* zip the `stixcore/data/idb/v2.26.36` folder into `v2.26.36.zip` >> `zip -r v2.26.37.zip v2.26.37`
* upload `v2.26.36.zip` to `https://pub099.cs.technik.fhnw.ch/data/idb/` (`/var/www/data/idb/v2.26.36.zip`)
* add a new entry to `stixcore/data/idb/idbVersionHistory.json`
* use https://pub023.cs.technik.fhnw.ch/request/time-conversion/scet2utc
Expand Down
22 changes: 21 additions & 1 deletion stixcore/data/idb/idbVersionHistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,34 @@
"validityPeriodUTC": [
[
"2021-12-09T16:01:12.414+00:00",
"2136-02-07T08:11:44.778+00:00"
"2024-02-15T00:00:00.000+00:00"
]
],
"validityPeriodOBT": [
{
"coarse": 692380776,
"fine": 0
},
{
"coarse": 761270182,
"fine": 0
}
]
},
{
"version": "2.26.37",
"aswVersion": 184,
"validityPeriodUTC": [
[
"2024-02-15T00:00:00.000+00:00",
"2136-02-07T08:11:44.778+00:00"
]
],
"validityPeriodOBT": [
{
"coarse": 761270182,
"fine": 0
},
{
"coarse": 4294967295,
"fine": 0
Expand Down
3 changes: 3 additions & 0 deletions stixcore/data/test/idb/v2.26.37/idb.sqlite
Git LFS file not shown
2 changes: 1 addition & 1 deletion stixcore/idb/tests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_find_version(idb_manager):

# fall back to the default
idb = idb_manager.get_idb(obt=SCETime(coarse=2 ** 31 - 1, fine=0))
assert idb.get_idb_version() == "2.26.36"
assert idb.get_idb_version() == "2.26.37"

assert idb_manager.find_version(obt=None) == "2.26.32"

Expand Down
6 changes: 3 additions & 3 deletions stixcore/processing/tests/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_publish_fits_to_esa_incomplete(product, out_dir):
product.date_end = end
product.split_to_files.return_value = [product]
product.get_energies = False
product.get_processing_version.return_value = 1
product.get_processing_version.return_value = 2

files.extend(processor.write_fits(product))

Expand Down Expand Up @@ -220,7 +220,7 @@ def test_fits_incomplete_switch_over(out_dir):
product.date_end = end
product.split_to_files.return_value = [product]
product.get_energies = False
product.get_processing_version.return_value = 1
product.get_processing_version.return_value = 2

files_first.extend(processor.write_fits(product))

Expand Down Expand Up @@ -340,7 +340,7 @@ def test_publish_fits_to_esa(product, out_dir):
product.date_beg = beg
product.date_end = end
product.split_to_files.return_value = [product]
product.get_processing_version.return_value = 1
product.get_processing_version.return_value = 2
product.get_energies = False

data = product.data[:] # make a clone
Expand Down
2 changes: 1 addition & 1 deletion stixcore/products/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class BaseProduct:
Base TMProduct that all other product inherit from contains the registry for the factory pattern
"""

PRODUCT_PROCESSING_VERSION = 1
PRODUCT_PROCESSING_VERSION = 2

_registry = {}

Expand Down

0 comments on commit e539c8b

Please sign in to comment.