Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
concepts-processing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meldb
concepts-processing
Commits
4b1a2f55
Commit
4b1a2f55
authored
3 months ago
by
mjbonifa
Browse files
Options
Downloads
Plain Diff
Merge branch '4-write-git-ignore-for-phenotype-repos' into 'dev'
added gitignore to phen init. closes
#4
Closes
#4
See merge request meldb/concepts-processing!6
parents
9a7bda9d
60973bce
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
acmc/parse.py
+4
-3
4 additions, 3 deletions
acmc/parse.py
acmc/phen.py
+13
-7
13 additions, 7 deletions
acmc/phen.py
with
17 additions
and
10 deletions
acmc/parse.py
+
4
−
3
View file @
4b1a2f55
...
...
@@ -39,14 +39,15 @@ class Proto:
tuple
[
str
,
# The description, e.g., "Not Empty"
Callable
[
[
list
],
pd
.
Series
,
[
list
],
pd
.
Series
,
],
# The first lambda function: takes a list and returns a pd.Series of booleans
Callable
[
[
list
,
str
],
None
,
[
list
,
str
],
None
,
],
# The second lambda function: takes a list and a string, and returns nothing
]
]
def
__init__
(
self
,
name
,
trud_codes_path
=
None
):
if
trud_codes_path
is
not
None
:
...
...
This diff is collapsed.
Click to expand it.
acmc/phen.py
+
13
−
7
View file @
4b1a2f55
...
...
@@ -136,7 +136,6 @@ def init(phen_dir, remote_url):
repo
.
clone
(
git_url
,
phen_path
)
# open repo
repo
=
git
.
Repo
(
phen_path
)
# check if there are any commits (new repo has no commits)
if
(
len
(
repo
.
branches
)
==
0
or
repo
.
head
.
is_detached
...
...
@@ -202,16 +201,23 @@ def init(phen_dir, remote_url):
},
"
codes
"
:
[],
}
config_path
=
phen_path
/
CONFIG_FILE
with
open
(
config_path
,
"
w
"
,
encoding
=
"
utf-8
"
)
as
f
:
json
.
dump
(
config
,
f
,
indent
=
4
)
# TODO: add gitignore
# Ignore all SQLite database files
# *.db
# *.sqlite
# *.sqlite3
# add git ignore
ignore_content
=
"""
# Ignore SQLite database files
*.db
*.sqlite3
# Ignore SQLite journal and metadata files
*.db-journal
*.sqlite3-journal
"""
ignore_path
=
phen_path
/
"
.gitignore
"
with
open
(
ignore_path
,
"
w
"
)
as
file
:
file
.
write
(
ignore_content
)
# add to git repo and commit
for
d
in
DEFAULT_PHEN_DIR_LIST
:
...
...
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