diff --git a/.github/workflows/publish_main.yml b/.github/workflows/publish_main.yml index c81a5ef..ce5b549 100644 --- a/.github/workflows/publish_main.yml +++ b/.github/workflows/publish_main.yml @@ -5,24 +5,16 @@ on: - main jobs: - tag_and_publish: - name: Parse version + tag: + name: Tag + uses: AllenNeuralDynamics/.github/.github/workflows/release-tag.yml@main + secrets: + repo-token: ${{ secrets.GITHUB_TOKEN }} + publish: runs-on: ubuntu-latest - outputs: - pkg_version: ${{ steps.output_version.outputs.pkg_version }} + name: Publish package + needs: tag steps: - - uses: actions/checkout@v4 - - name: Get version from file - run: | - pkg_name=$(grep -P 'version = \{attr = .*\}' pyproject.toml | grep -oP '\w+.__version__') - init_file="./src/${pkg_name//.__version__}/__init__.py" - pkg_version=$(grep -Po '[0-9]+\.[0-9]+\.[0-9]+' "$init_file") - echo "tag=$pkg_version" >> "$GITHUB_ENV" - - name: Create git tag - run: | - git tag "v${{ env.tag }}" - - name: Push git tag - run: git push origin "v${{ env.tag }}" - name: Set up Python 3.10 uses: actions/setup-python@v5 with: diff --git a/docs/source/ExamplesDocDBRestApi.rst b/docs/source/ExamplesDocDBRestApi.rst index d2dad10..5f32c47 100644 --- a/docs/source/ExamplesDocDBRestApi.rst +++ b/docs/source/ExamplesDocDBRestApi.rst @@ -8,6 +8,20 @@ REST API using the provided Python client. Querying Metadata ~~~~~~~~~~~~~~~~~~~~~~ +.. note:: + + There are a several indexed fields in the DocDB metadata collection to support + efficient query execution by limiting the number of documents to be scanned. + Please use these fields in your filter queries whenever possible. + + Currently, the following fields are indexed in the v1 (``metadata_index/data_assets``) + collection: ``_id``, ``name``, ``location``, ``subject.subject_id``, + ``data_description.project_name``, and ``data_description.modality.abbreviation``. + + The same fields are indexed in the v2 (``metadata_index_v2/data_assets``) collection, + other than spelling for the modality field (``data_description.modalities.abbreviation``). + + Count Example 1: Get # of records with a certain subject_id ----------------------------------------------------------- diff --git a/src/aind_data_access_api/__init__.py b/src/aind_data_access_api/__init__.py index f3a785d..412d5f5 100644 --- a/src/aind_data_access_api/__init__.py +++ b/src/aind_data_access_api/__init__.py @@ -1,3 +1,3 @@ """Init package""" -__version__ = "1.9.0" +__version__ = "1.9.1"