Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
toolbox
WindEnergyToolbox
Commits
10a23caf
Commit
10a23caf
authored
3 years ago
by
Rasmus Sode Lund
Committed by
Mads M. Pedersen
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added 2 dosctrings to HTC class
parent
2f6269ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!203
Added 2 dosctrings to HTC class
Pipeline
#30657
passed
3 years ago
Stage: test
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wetb/hawc2/htc_file.py
+18
-0
18 additions, 0 deletions
wetb/hawc2/htc_file.py
with
18 additions
and
0 deletions
wetb/hawc2/htc_file.py
+
18
−
0
View file @
10a23caf
...
...
@@ -194,6 +194,13 @@ class HTCFile(HTCContents, HTCDefaults, HTCExtensions):
return
""
.
join
(
self
.
initial_comments
+
[
c
.
__str__
(
1
)
for
c
in
self
]
+
[
"
exit;
"
])
def
save
(
self
,
filename
=
None
):
"""
Saves the htc object to an htc file.
Args:
filename (str, optional): Specifies the filename of the htc file to be saved.
If the value is none, the filename attribute of the object will be used as the filename.
Defaults to None.
"""
self
.
contents
# load if not loaded
if
filename
is
None
:
filename
=
self
.
filename
...
...
@@ -206,6 +213,17 @@ class HTCFile(HTCContents, HTCDefaults, HTCExtensions):
fid
.
write
(
str
(
self
))
def
set_name
(
self
,
name
,
subfolder
=
''
):
"""
Sets the base filename of the simulation files.
Args:
name (str): Specifies name of the log file, dat file (for animation), hdf5 file (for visualization) and htc file.
subfolder (str, optional): Specifies the name of a subfolder to place the files in.
If the value is an empty string, no subfolders will be created.
Defaults to
''
.
Returns:
None
"""
# if os.path.isabs(folder) is False and os.path.relpath(folder).startswith("htc" + os.path.sep):
self
.
contents
# load if not loaded
...
...
This diff is collapsed.
Click to expand it.
Kimberly Margaretha Maria van den Bogaard
@s203229
mentioned in issue
#113 (closed)
·
3 years ago
mentioned in issue
#113 (closed)
mentioned in issue #113
Toggle commit list
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