diff --git a/README.rst b/README.rst index aa8e7965..6d0b82fa 100644 --- a/README.rst +++ b/README.rst @@ -121,37 +121,22 @@ To ensure Meshroom uses your NVIDIA GPU: 5. Under **Select the preferred graphics processor for this program**, choose **High-performance NVIDIA processor**. 6. Click **Apply**. -Version control of database using DVC (Data Version Control) -------------------------------------------------------------- - -Data Version Control (DVC) is a data management tool that is meant to be run alongside Git. -In this project, DVC is used to link changes in the code to specific versions of a sample database containing example project files. -DVC can be used when this project is installed in Dev mode. You can read more about DVC and how to use it `here `_. -**Note:** Remote access to the sample database stored on google drive is currently restricted. Access requires a :code:`gdrive_client_secret` -for user access authentication to be shared by developers. - -DVC usage -~~~~~~~~~ - -To download the sample database: - -.. code:: sh - - git pull - dvc remote modify --local shared_gdrive gdrive_client_secret # Contact developers for grive_client_secret - dvc pull # Requires access to remote storage +Getting Sample Data +------------------- -This will download a directory 'db_dvc' in the repo directory that -contains the corresponding version of example database files. +A sample database for testing and examples is maintained in the +`openlifu-sample-database `_ +repository. Its files are tracked with Git LFS, so first `install Git LFS +`_. -To commit updates to the sample database: +Then check out the tagged version of the sample database that is compatible +with this version of ``openlifu``: -.. code:: sh +.. code:: bash - dvc add db_dvc - git commit -m "Describe updates to database" - git push - dvc push #Requires access to remote storage + git clone --depth 1 --branch openlifu-v0.20.0 https://github.com/OpenwaterHealth/openlifu-sample-database.git + cd openlifu-sample-database + git lfs pull Disclaimer ---------- diff --git a/examples/tools/standardize_database.py b/examples/tools/standardize_database.py index c5b2fc85..be8862ae 100644 --- a/examples/tools/standardize_database.py +++ b/examples/tools/standardize_database.py @@ -1,11 +1,11 @@ -"""This is a utility script for developers to read in and write back out the dvc database. -It is useful for standardizing the format of the example dvc data, and also for checking that the database +"""This is a utility script for developers to read in and write back out an openlifu database. +It is useful for standardizing the format of the example data, and also for checking that the database mostly still works. To use this script, install openlifu to a python environment and then run the script providing the database folder as an argument: ``` -python standardize_database.py db_dvc/ +python standardize_database.py /path/to/openlifu-sample-database ``` A couple of known issues to watch out for: @@ -15,7 +15,6 @@ """ from __future__ import annotations -import logging import pathlib import shutil import sys @@ -23,7 +22,6 @@ from openlifu.db import Database from openlifu.db.database import OnConflictOpts -from openlifu.xdc import Transducer if len(sys.argv) != 2: raise RuntimeError("Provide exactly one argument: the path to the database folder.") @@ -38,9 +36,6 @@ db.write_transducer_ids(db.get_transducer_ids()) for transducer_id in db.get_transducer_ids(): transducer = db.load_transducer(transducer_id, convert_array=False) - if not isinstance(transducer, Transducer): - logging.warning(f"Skipping {transducer_id} because TransducerArray writing is not supported.") - continue assert transducer_id == transducer.id db.write_transducer(transducer, on_conflict=OnConflictOpts.OVERWRITE)