Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-advanced-user-tools
Commits
2423efd7
Verified
Commit
2423efd7
authored
1 year ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Making missing paths.
parent
c0b27ba5
No related branches found
No related tags found
2 merge requests
!100
WIP: Filling XLSX: Seems to be working.
,
!93
Filling XLSX: Everything except multiple choice.
Pipeline
#48275
passed
1 year ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caosadvancedtools/table_json_conversion/fill_xlsx.py
+4
-0
4 additions, 0 deletions
src/caosadvancedtools/table_json_conversion/fill_xlsx.py
src/caosadvancedtools/table_json_conversion/table_generator.py
+4
-0
4 additions, 0 deletions
...aosadvancedtools/table_json_conversion/table_generator.py
with
8 additions
and
0 deletions
src/caosadvancedtools/table_json_conversion/fill_xlsx.py
+
4
−
0
View file @
2423efd7
...
...
@@ -23,6 +23,7 @@
from
__future__
import
annotations
import
json
import
pathlib
from
collections
import
OrderedDict
from
types
import
SimpleNamespace
from
typing
import
Any
,
Dict
,
List
,
Optional
,
Union
,
TextIO
...
...
@@ -358,4 +359,7 @@ validation_schema: dict, optional
result_wb
=
load_workbook
(
template
)
template_filler
=
TemplateFiller
(
result_wb
)
template_filler
.
fill_data
(
data
=
data
)
parentpath
=
pathlib
.
Path
(
result
).
parent
parentpath
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
result_wb
.
save
(
result
)
This diff is collapsed.
Click to expand it.
src/caosadvancedtools/table_json_conversion/table_generator.py
+
4
−
0
View file @
2423efd7
...
...
@@ -23,6 +23,8 @@
"""
This module allows to generate template tables from JSON schemas.
"""
import
pathlib
import
re
from
abc
import
ABC
,
abstractmethod
from
enum
import
Enum
...
...
@@ -279,6 +281,8 @@ class XLSXTemplateGenerator(TableTemplateGenerator):
"""
sheets
=
self
.
_generate_sheets_from_schema
(
schema
,
foreign_keys
)
wb
=
self
.
_create_workbook_from_sheets_def
(
sheets
)
parentpath
=
pathlib
.
Path
(
filepath
).
parent
parentpath
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
wb
.
save
(
filepath
)
@staticmethod
...
...
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