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

DATAUP-682: Add import spec writers for xsv files #155

Merged
merged 5 commits into from
Jan 9, 2022
Merged

Conversation

MrCreosote
Copy link
Member

Will eventually be hooked up to a service endpoint to allow the narrative
to generate import templates on command

@briehl heads up if you're interested

Will eventually be hooked up to a service endpoint to allow the narrative
to generate import templates on command
Allows the app class to tell the difference between bad input and
unexpected failures (e.g. fail to open file, etc)
@sonarcloud
Copy link

sonarcloud bot commented Dec 26, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@MrCreosote MrCreosote changed the title Add import spec writers for xsv files DATAUP-682: Add import spec writers for xsv files Jan 9, 2022
Copy link
Collaborator

@bio-boris bio-boris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +164 to +165
+ f"{_COLUMN_STR} {cols}{_HEADER_SEP} {_VERSION_STR} {_VERSION}"])
pids = [i[0] for i in dt[_ORDER_AND_DISPLAY]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does pid stand for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameter id

_check_import_specification(types)


class ImportSpecWriteException(Exception):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably YAGNI, but we may want to consider creating an StagingServiceException(Exception) and then deriving new exceptions from StagingServiceException instead of Exception, to allow for catching Staging Service Exceptions and Exceptions

try:

except StagingServiceException

except Execption

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, made an issue. Next time I touch the code base I'll do it

test.env
run_tests_single.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I put it in the gitignore so it didn't get checked in accidentally. It's just a hack to run_tests.sh to allow running a single file of tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants