Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCHEMATIC-192] V24.12.1 into Main #1562

Merged
merged 105 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
9286503
add new tests
andrewelamb Sep 10, 2024
3d6d3b3
handle merge conflict
andrewelamb Oct 1, 2024
f0368f9
add unit tests
andrewelamb Oct 3, 2024
89c1cf0
ran black
andrewelamb Oct 4, 2024
95d7686
Update schematic/models/validate_attribute.py
andrewelamb Oct 10, 2024
95a59c4
added tests
andrewelamb Oct 11, 2024
8e555f1
Merge branch 'develop' into FDS-2333-ValidateAttribute-unit-tests
andrewelamb Oct 17, 2024
d7731a4
Update README.md
jaymedina Oct 21, 2024
9a40ce8
Update README.md
jaymedina Oct 21, 2024
f5c6f8c
add unit tests
andrewelamb Oct 21, 2024
d0ae908
run black
andrewelamb Oct 21, 2024
4fe84c6
Update README.md
jaymedina Oct 22, 2024
46e6a03
temp commit
andrewelamb Oct 22, 2024
c987329
remove old tests
andrewelamb Oct 22, 2024
0bd946c
[FDS-2386] Synapse entity tracking and code concurrency updates (#1505)
BryanFauble Oct 24, 2024
4c47cb3
Merge branch 'develop' into FDS-2333-ValidateAttribute-unit-tests
andrewelamb Oct 24, 2024
ff7b7f7
Merge branch 'develop' into FDS-2347
andrewelamb Oct 24, 2024
40418d7
ran black
andrewelamb Oct 24, 2024
ed85e4b
Update CODEOWNERS
andrewelamb Oct 25, 2024
2063508
Merge pull request #1525 from Sage-Bionetworks/andrewelamb-patch-1
andrewelamb Oct 25, 2024
1fae4c5
Merge pull request #1517 from Sage-Bionetworks/FDS-2333-ValidateAttri…
andrewelamb Oct 25, 2024
1765552
updated data model type rules to include error param
andrewelamb Oct 25, 2024
beb8663
fix validate type attribute to use msg level param
andrewelamb Oct 25, 2024
23106a4
Merge branch 'develop' into FDS-2506-type-val
andrewelamb Oct 25, 2024
525e3da
added error handling
andrewelamb Oct 25, 2024
5fcaac3
run black
andrewelamb Oct 25, 2024
9b78dba
create Node class
andrewelamb Oct 25, 2024
083f7ec
sat up Node class so that nodes with no displayName fields cause an e…
andrewelamb Oct 25, 2024
0de69aa
ran black
andrewelamb Oct 25, 2024
f58ba9f
ran mypy
andrewelamb Oct 25, 2024
a87df1f
Merge pull request #1523 from Sage-Bionetworks/FDS-2347
andrewelamb Oct 26, 2024
c69ec88
Merge pull request #1522 from Sage-Bionetworks/develop-fds-2466-updat…
andrewelamb Oct 30, 2024
59889b6
Merge pull request #1526 from Sage-Bionetworks/FDS-2506-type-val
andrewelamb Oct 30, 2024
e8fb516
added new configs for CLI tests
andrewelamb Oct 30, 2024
2c2da77
added new manifests for testing CLI commands
andrewelamb Oct 30, 2024
d9a7bae
automate manual CLI tests
andrewelamb Oct 30, 2024
40837ab
ran black
andrewelamb Oct 30, 2024
5703b59
Update CODEOWNERS
thomasyu888 Nov 1, 2024
459a767
Update scan_repo.yml
thomasyu888 Nov 1, 2024
bbab0a5
Update .github/CODEOWNERS
thomasyu888 Nov 1, 2024
469da57
Update .github/workflows/scan_repo.yml
thomasyu888 Nov 1, 2024
d1ef225
Merge pull request #1531 from Sage-Bionetworks/thomasyu888-patch-1
thomasyu888 Nov 1, 2024
ad7c8f8
Attach additional telemetry data to OTEL traces (#1519)
BryanFauble Nov 1, 2024
1c2d7be
feat: added tracing for cross manifest validation and file name valid…
linglp Nov 1, 2024
d1cbc04
temp commit
andrewelamb Nov 4, 2024
d6e99f3
Merge branch 'develop' into FDS-2238-automate-cli-tests
andrewelamb Nov 4, 2024
c75c71c
Updating contribution doc to expect squash and merge (#1534)
BryanFauble Nov 5, 2024
4bbbb68
[FDS-2491] Integration tests for Schematic API Test plan (#1512)
BryanFauble Nov 5, 2024
39852a1
[FDS-2500] Add Integration Tests for: Manifest Validation (#1516)
jaymedina Nov 6, 2024
1cd5efa
[FDS-2449] Lock `sphinx` version and update `poetry.lock` (#1530)
jaymedina Nov 7, 2024
dd00932
Merge branch 'develop' into FDS-2238-automate-cli-tests
andrewelamb Nov 7, 2024
318171e
manual test files now being saved in manifests folder
andrewelamb Nov 7, 2024
4e1d5b1
manual test files now being saved in manifests folder
andrewelamb Nov 7, 2024
07e0c75
remove lines to delete json files that were under git control
andrewelamb Nov 7, 2024
de4ed61
ran black
andrewelamb Nov 7, 2024
5a19b12
add try finally blocks to remove created files
andrewelamb Nov 7, 2024
1cd1b5a
ran black
andrewelamb Nov 7, 2024
26e8a99
add lines to remove created json files
andrewelamb Nov 7, 2024
f57c718
Update file annotation store process to require filename be present i…
BryanFauble Nov 7, 2024
35d440b
add lines to remove created json files
andrewelamb Nov 7, 2024
e832d02
Revert "Update file annotation store process to require filename be p…
BryanFauble Nov 7, 2024
11be01a
Don't attempt to annotate the table
BryanFauble Nov 7, 2024
6c3d0ce
add code in finally blocks to reset config to default values, when te…
andrewelamb Nov 8, 2024
34bd8de
complete submit manifest command test
andrewelamb Nov 8, 2024
fbc1298
ran black
andrewelamb Nov 8, 2024
f3d878d
add test for bug case
GiaJordan Nov 11, 2024
7dcc88f
update test for table tidyness
GiaJordan Nov 11, 2024
6d0cdd0
remove unused import
GiaJordan Nov 11, 2024
37cd4cd
remove etag column if already present when building temp file view
GiaJordan Nov 11, 2024
68b0b24
catch all exceptions to switch to sequential mode
GiaJordan Nov 12, 2024
255e3c0
update test for updated data
GiaJordan Nov 12, 2024
6c122ee
Revert "update test for updated data"
GiaJordan Nov 12, 2024
ad71660
Revert "catch all exceptions to switch to sequential mode"
GiaJordan Nov 12, 2024
cc1fb27
catch ValueErrors as well
GiaJordan Nov 12, 2024
e30e32c
Updates for integration test failures (#1537)
BryanFauble Nov 12, 2024
3064d00
Merge branch 'develop' into schematic-126-file-annotation-storage-update
BryanFauble Nov 12, 2024
3099be3
Merge branch 'develop' into FDS-2238-automate-cli-tests
andrewelamb Nov 12, 2024
4f82822
Merge pull request #1535 from Sage-Bionetworks/schematic-126-file-ann…
thomasyu888 Nov 13, 2024
f6d015b
Merge pull request #1538 from Sage-Bionetworks/schematic-1-existing-eTag
thomasyu888 Nov 13, 2024
ec896e6
add todos for removing config resets
andrewelamb Nov 13, 2024
778bf54
[FDS-2525] Authenticated export of telemetry data (#1527)
BryanFauble Nov 13, 2024
8655b8d
temp reduce tests
andrewelamb Nov 13, 2024
4050e71
restore tests
andrewelamb Nov 13, 2024
a610955
uncomment tests
andrewelamb Nov 13, 2024
819aeb4
redid how files are deleted, manual tests values are set
andrewelamb Nov 13, 2024
b275c68
ran black
andrewelamb Nov 13, 2024
1e5da3c
Merge pull request #1528 from Sage-Bionetworks/FDS-2238-automate-cli-…
thomasyu888 Nov 14, 2024
39459e7
[SCHEMATIC-157] Make some dependencies required to avoid `schematic C…
thomasyu888 Nov 14, 2024
c7eace9
Merge branch 'main' into develop
thomasyu888 Nov 14, 2024
2ed7837
Include schematic_api for now (#1547)
thomasyu888 Nov 15, 2024
67a93be
update toml version to 24.11.1 (#1548)
andrewelamb Nov 15, 2024
1ef9818
Merge branch 'main' into develop
thomasyu888 Nov 19, 2024
14aa510
[SCHEMATIC-193] Support exporting telemetry data from GH integration …
BryanFauble Nov 19, 2024
998e295
[SCHEMATIC-30, SCHEMATIC-200] Add version to click cli / use pathlib.…
thomasyu888 Nov 23, 2024
c3e0732
[SCHEMATIC-212] Prevent traces from being combined (#1552)
BryanFauble Nov 25, 2024
c681346
[SCHEMATIC-163] Catch error when manifest is generated and existing o…
BWMac Dec 2, 2024
ef87c39
[SCHEMATIC-183] Use paths from file view for manifest generation (#1529)
GiaJordan Dec 10, 2024
70813f1
[SCHEMATIC-214] Wrap pandas functions to support not including `None`…
BryanFauble Dec 13, 2024
9ed3474
incremented packge version number
andrewelamb Dec 13, 2024
3d4b591
Update publish.yml
andrewelamb Dec 13, 2024
b35eef1
Update test.yml
andrewelamb Dec 13, 2024
1204e0a
Update api_test.yml
andrewelamb Dec 13, 2024
1161842
Update pdoc.yml
andrewelamb Dec 13, 2024
6c85b8e
Update version.py
andrewelamb Dec 13, 2024
c657388
updates publish.yml (#1558) (#1561)
andrewelamb Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/api_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
POETRY_VERSION: 1.3.0
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
POETRY_VERSION: 1.3.0
PYTHON_VERSION: "3.10"
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ on:

jobs:
pypi_release:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
POETRY_VERSION: 1.3.0
PYTHON_VERSION: "3.10"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
steps:
#----------------------------------------------
Expand All @@ -18,10 +19,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VERSION }}

#----------------------------------------------
# install & configure poetry
Expand All @@ -48,7 +49,7 @@ jobs:
- name: Get current pushed tag
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo ${{ env.RELEASE_VERSION }}
echo "$RELEASE_VERSION"

#----------------------------------------------
# override version tag
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scan_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
trivy:
name: Trivy
runs-on: ubuntu-latest
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
POETRY_VERSION: 1.3.0
strategy:
Expand Down Expand Up @@ -127,11 +127,31 @@ jobs:
#----------------------------------------------
# run integration test suite
#----------------------------------------------

- name: Retrieve telemetry access token from IDP
if: ${{ contains(fromJSON('["3.10"]'), matrix.python-version) }}
id: retrieve-telemetry-access-token
run: |
response=$(curl --request POST \
--url ${{ vars.TELEMETRY_AUTH_CLIENT_URL }} \
--header 'content-type: application/json' \
--data '{"client_id":"${{ vars.TELEMETRY_AUTH_CLIENT_ID }}","client_secret":"${{ secrets.TELEMETRY_AUTH_CLIENT_SECRET }}","audience":"${{ vars.TELEMETRY_AUTH_AUDIENCE }}","grant_type":"client_credentials"}')
access_token=$(echo $response | jq -r .access_token)
echo "::add-mask::$access_token"
echo "TELEMETRY_ACCESS_TOKEN=$access_token" >> "$GITHUB_OUTPUT"
- name: Run integration tests
if: ${{ contains(fromJSON('["3.10"]'), matrix.python-version) }}
env:
SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }}
SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }}
OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer ${{ steps.retrieve-telemetry-access-token.outputs.TELEMETRY_ACCESS_TOKEN }}"
DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }}
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }}
TRACING_EXPORT_FORMAT: ${{ vars.TRACING_EXPORT_FORMAT }}
LOGGING_EXPORT_FORMAT: ${{ vars.LOGGING_EXPORT_FORMAT }}
TRACING_SERVICE_NAME: ${{ vars.TRACING_SERVICE_NAME }}
LOGGING_SERVICE_NAME: ${{ vars.LOGGING_SERVICE_NAME }}
SERVICE_INSTANCE_ID: ${{ github.head_ref || github.ref_name }}
run: >
poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/
-m "not (rule_benchmark or single_process_execution)" --reruns 4 -n 8 --ignore=tests/unit
Expand All @@ -141,6 +161,13 @@ jobs:
env:
SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }}
SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }}
OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer ${{ steps.retrieve-telemetry-access-token.outputs.TELEMETRY_ACCESS_TOKEN }}"
DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }}
OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }}
TRACING_EXPORT_FORMAT: ${{ vars.TRACING_EXPORT_FORMAT }}
LOGGING_EXPORT_FORMAT: ${{ vars.LOGGING_EXPORT_FORMAT }}
TRACING_SERVICE_NAME: ${{ vars.TRACING_SERVICE_NAME }}
LOGGING_SERVICE_NAME: ${{ vars.LOGGING_SERVICE_NAME }}
run: >
poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/
-m "single_process_execution" --reruns 4 --ignore=tests/unit
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in

## How to report bugs or feature requests

You can **create bug and feature requests** through [Sage Bionetwork's FAIR Data service desk](https://sagebionetworks.jira.com/servicedesk/customer/portal/5/group/8). Providing enough details to the developers to verify and troubleshoot your issue is paramount:
You can **create bug and feature requests** through [Sage Bionetwork's DPE schematic support](https://sagebionetworks.jira.com/servicedesk/customer/portal/5/group/7/create/225). Providing enough details to the developers to verify and troubleshoot your issue is paramount:
- **Provide a clear and descriptive title as well as a concise summary** of the issue to identify the problem.
- **Describe the exact steps which reproduce the problem** in as many details as possible.
- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
Expand All @@ -25,7 +25,7 @@ For new features, bugs, enhancements:

#### 1. Branch Setup
* Pull the latest code from the develop branch in the upstream repository.
* Checkout a new branch formatted like so: `develop-<feature/fix-name>` from the develop branch
* Checkout a new branch formatted like so: `<JIRA-ID>-<feature/fix-name>` from the develop branch

#### 2. Development Workflow
* Develop on your new branch.
Expand All @@ -35,22 +35,22 @@ For new features, bugs, enhancements:
* You can choose to create a draft PR if you prefer to develop this way

#### 3. Branch Management
* Push code to `develop-<feature/fix-name>` in upstream repo:
* Push code to `<JIRA-ID>-<feature/fix-name>` in upstream repo:
```
git push <upstream> develop-<feature/fix-name>
git push <upstream> <JIRA-ID>-<feature/fix-name>
```
* Branch off `develop-<feature/fix-name>` if you need to work on multiple features associated with the same code base
* Branch off `<JIRA-ID>-<feature/fix-name>` if you need to work on multiple features associated with the same code base
* After feature work is complete and before creating a PR to the develop branch in upstream
a. ensure that code runs locally
b. test for logical correctness locally
c. run `pre-commit` to style code if the hook is not installed
c. wait for git workflow to complete (e.g. tests are run) on github

#### 4. Pull Request and Review
* Create a PR from `develop-<feature/fix-name>` into the develop branch of the upstream repo
* Create a PR from `<JIRA-ID>-<feature/fix-name>` into the develop branch of the upstream repo
* Request a code review on the PR
* Once code is approved merge in the develop branch. The **"Squash and merge"** strategy should be used for a cleaner commit history on the `develop` branch. The description of the squash commit should include enough information to understand the context of the changes that were made.
* Once the actions pass on the main branch, delete the `develop-<feature/fix-name>` branch
* Once the actions pass on the main branch, delete the `<JIRA-ID>-<feature/fix-name>` branch

### Updating readthedocs documentation
1. Navigate to the docs directory.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ RUN poetry install --no-interaction --no-ansi --no-root

COPY . ./

RUN poetry install --only-root
RUN poetry install --only-root
2 changes: 2 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ SERVICE_ACCOUNT_CREDS='Provide service account creds'
# LOGGING_EXPORT_FORMAT=otlp
# TRACING_SERVICE_NAME=schematic-api
# LOGGING_SERVICE_NAME=schematic-api
## Instance ID is used during integration tests export to identify the git branch
# SERVICE_INSTANCE_ID=schematic-1234
## Other examples: dev, staging, prod
# DEPLOYMENT_ENVIRONMENT=local
# OTEL_EXPORTER_OTLP_ENDPOINT=https://..../telemetry
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "schematicpy"
version = "24.11.2"
version = "24.12.1"
description = "Package for biomedical data model and metadata ingress management"
authors = [
"Milen Nikolov <[email protected]>",
Expand Down
20 changes: 14 additions & 6 deletions schematic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
from opentelemetry.instrumentation.flask import FlaskInstrumentor
from opentelemetry.sdk._logs import LoggerProvider, LoggingHandler
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
from opentelemetry.sdk.resources import DEPLOYMENT_ENVIRONMENT, SERVICE_NAME, Resource
from opentelemetry.sdk.resources import (
DEPLOYMENT_ENVIRONMENT,
SERVICE_INSTANCE_ID,
SERVICE_NAME,
SERVICE_VERSION,
Resource,
)
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor, Span
from opentelemetry.sdk.trace.sampling import ALWAYS_OFF
Expand All @@ -20,6 +26,7 @@

from schematic.configuration.configuration import CONFIG
from schematic.loader import LOADER
from schematic.version import __version__
from schematic_api.api.security_controller import info_from_bearer_auth

Synapse.allow_client_caching(False)
Expand Down Expand Up @@ -91,16 +98,14 @@ def set_up_tracing(session: requests.Session) -> None:
Synapse.enable_open_telemetry(True)
tracing_service_name = os.environ.get("TRACING_SERVICE_NAME", "schematic-api")
deployment_environment = os.environ.get("DEPLOYMENT_ENVIRONMENT", "")
service_instance_id = os.environ.get("SERVICE_INSTANCE_ID", "")
trace.set_tracer_provider(
TracerProvider(
resource=Resource(
attributes={
SERVICE_INSTANCE_ID: service_instance_id,
SERVICE_NAME: tracing_service_name,
# TODO: Revisit this portion later on. As of 11/12/2024 when
# deploying this to ECS or running within a docker container,
# the package version errors out with the following error:
# importlib.metadata.PackageNotFoundError: No package metadata was found for schematicpy
# SERVICE_VERSION: package_version,
SERVICE_VERSION: __version__,
DEPLOYMENT_ENVIRONMENT: deployment_environment,
}
)
Expand All @@ -122,11 +127,14 @@ def set_up_logging(session: requests.Session) -> None:
logging_export = os.environ.get("LOGGING_EXPORT_FORMAT", None)
logging_service_name = os.environ.get("LOGGING_SERVICE_NAME", "schematic-api")
deployment_environment = os.environ.get("DEPLOYMENT_ENVIRONMENT", "")
service_instance_id = os.environ.get("SERVICE_INSTANCE_ID", "")
if logging_export == "otlp":
resource = Resource.create(
{
SERVICE_INSTANCE_ID: service_instance_id,
SERVICE_NAME: logging_service_name,
DEPLOYMENT_ENVIRONMENT: deployment_environment,
SERVICE_VERSION: __version__,
}
)

Expand Down
2 changes: 2 additions & 0 deletions schematic/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from schematic.visualization.commands import (
viz as viz_cli,
) # viz generation commands
from schematic import __version__

logger = logging.getLogger()
click_log.basic_config(logger)
Expand All @@ -24,6 +25,7 @@
# invoke_without_command=True -> forces the application not to show aids before losing them with a --h
@click.group(context_settings=CONTEXT_SETTINGS, invoke_without_command=True)
@click_log.simple_verbosity_option(logger)
@click.version_option(version=__version__, prog_name="schematic")
def main():
"""
Command line interface to the `schematic` backend services.
Expand Down
2 changes: 2 additions & 0 deletions schematic/manifest/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,8 @@ def get_manifest(
# TODO: avoid explicitly exposing Synapse store functionality
# just instantiate a Store class and let it decide at runtime/config
# the store type
# TODO: determine which parts of fileview are necessary for `get` operations
# and pass query parameters at object instantiation to avoid having to re-query
if access_token:
# for getting an existing manifest on AWS
store = SynapseStorage(access_token=access_token)
Expand Down
7 changes: 5 additions & 2 deletions schematic/models/validate_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from schematic.schemas.data_model_graph import DataModelGraphExplorer
from schematic.store.synapse import SynapseStorage
from schematic.utils.df_utils import read_csv
from schematic.utils.validate_rules_utils import validation_rule_info
from schematic.utils.validate_utils import (
comma_separated_list_regex,
Expand Down Expand Up @@ -868,7 +869,7 @@ def _get_target_manifest_dataframes(
entity: File = self.synStore.getDatasetManifest(
datasetId=dataset_id, downloadFile=True
)
manifests.append(pd.read_csv(entity.path))
manifests.append(read_csv(entity.path))
return dict(zip(manifest_ids, manifests))

def get_target_manifests(
Expand Down Expand Up @@ -2119,7 +2120,9 @@ def filename_validation(

where_clauses = []

dataset_clause = f"parentId='{dataset_scope}'"
dataset_clause = SynapseStorage.build_clause_from_dataset_id(
dataset_id=dataset_scope
)
where_clauses.append(dataset_clause)

self._login(
Expand Down
3 changes: 2 additions & 1 deletion schematic/store/database/synapse_database_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from opentelemetry import trace

from schematic.store.synapse_tracker import SynapseEntityTracker
from schematic.utils.df_utils import read_csv


class SynapseTableNameError(Exception):
Expand Down Expand Up @@ -108,7 +109,7 @@ def execute_sql_query(
pandas.DataFrame: The queried table
"""
result = self.execute_sql_statement(query, include_row_data)
table = pandas.read_csv(result.filepath)
table = read_csv(result.filepath)
return table

def execute_sql_statement(
Expand Down
Loading
Loading