Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Wellbore Domain Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
Domain Data Management Services
Wellbore
Wellbore Domain Services
Commits
b8e0c80e
Commit
b8e0c80e
authored
3 years ago
by
Luc Yriarte
Browse files
Options
Downloads
Patches
Plain Diff
Remove csv serialization support
parent
8bed4588
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!323
Remove csv support from bulk APIs
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/bulk_persistence/dataframe_serializer.py
+0
-6
0 additions, 6 deletions
app/bulk_persistence/dataframe_serializer.py
app/bulk_persistence/mime_types.py
+0
-2
0 additions, 2 deletions
app/bulk_persistence/mime_types.py
app/routers/bulk/utils.py
+0
-4
0 additions, 4 deletions
app/routers/bulk/utils.py
with
0 additions
and
12 deletions
app/bulk_persistence/dataframe_serializer.py
+
0
−
6
View file @
b8e0c80e
...
...
@@ -152,12 +152,6 @@ class DataframeSerializerAsync:
func
=
partial
(
DataframeSerializerSync
.
to_json
,
df
,
orient
,
*
args
,
**
kwargs
)
return
await
asyncio
.
get_event_loop
().
run_in_executor
(
self
.
executor
,
func
)
@with_trace
(
"
CSV bulk serialization
"
)
async
def
to_csv
(
self
,
df
:
pd
.
DataFrame
,
*
args
,
**
kwargs
)
->
Optional
[
str
]:
df
=
df
.
fillna
(
"
NaN
"
)
func
=
partial
(
df
.
to_csv
,
*
args
,
**
kwargs
)
return
await
asyncio
.
get_event_loop
().
run_in_executor
(
self
.
executor
,
func
)
@with_trace
(
"
Parquet bulk deserialization
"
)
async
def
read_parquet
(
self
,
data
)
->
pd
.
DataFrame
:
return
await
asyncio
.
get_event_loop
().
run_in_executor
(
...
...
This diff is collapsed.
Click to expand it.
app/bulk_persistence/mime_types.py
+
0
−
2
View file @
b8e0c80e
...
...
@@ -57,8 +57,6 @@ class MimeTypes:
JSON
=
MimeType
(
type
=
"
application/json
"
,
extension
=
"
.json
"
)
CSV
=
MimeType
(
type
=
"
text/csv
"
,
extension
=
"
.csv
"
)
MSGPACK
=
MimeType
(
type
=
"
application/x-msgpack
"
,
extension
=
"
.msgpack
"
,
...
...
This diff is collapsed.
Click to expand it.
app/routers/bulk/utils.py
+
0
−
4
View file @
b8e0c80e
...
...
@@ -248,10 +248,6 @@ class DataFrameRender:
content
=
await
DataframeSerializerAsync
().
to_json
(
pdf
,
index
=
True
,
date_format
=
'
iso
'
,
orient
=
orient
.
value
)
return
Response
(
content
,
media_type
=
MimeTypes
.
JSON
.
type
)
if
MimeTypes
.
CSV
.
type
in
accept
:
content
=
await
DataframeSerializerAsync
().
to_csv
(
pdf
)
return
Response
(
content
,
media_type
=
MimeTypes
.
CSV
.
type
)
content
=
await
DataframeSerializerAsync
().
to_parquet
(
pdf
)
return
Response
(
content
,
media_type
=
MimeTypes
.
PARQUET
.
type
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment