Skip to content

Commit

Permalink
refactor: rename SEQREPO_DATA_PATH --> SEQREPO_ROOT_DIR (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma authored Apr 7, 2023
1 parent fdfd7cd commit bc0cf73
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ You will want to do the following:\
sudo mv /usr/local/share/seqrepo/2021-01-29._fkuefgd /usr/local/share/seqrepo/2021-01-29
```

Use the `SEQREPO_ROOT_DIR` environment variable to set the path of an already existing SeqRepo directory. The default is `/usr/local/share/seqrepo/latest`.

### Database Initialization

The Normalizer supports two data storage options:
Expand Down
2 changes: 2 additions & 0 deletions docs/source/full_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ You may need to manually finish moving sequence files (replace the `XXXXXX` char

sudo mv /usr/local/share/seqrepo/2021-01-29.XXXXXXX /usr/local/share/seqrepo/2021-01-29

Use the ``SEQREPO_ROOT_DIR`` environment variable to set the path of an already existing SeqRepo directory. The default is ``/usr/local/share/seqrepo/latest``.


Database setup
--------------
Expand Down
4 changes: 2 additions & 2 deletions gene/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
logging.getLogger("biocommons.seqrepo.fastadir.fastadir").setLevel(logging.INFO) # noqa: E501


SEQREPO_DATA_PATH = Path(
environ.get("SEQREPO_DATA_PATH", "/usr/local/share/seqrepo/latest")
SEQREPO_ROOT_DIR = Path(
environ.get("SEQREPO_ROOT_DIR", "/usr/local/share/seqrepo/latest")
)


Expand Down
4 changes: 2 additions & 2 deletions gene/etl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from abc import ABC, abstractmethod
from typing import Dict, Optional, List
from gene.database import AbstractDatabase
from gene import ITEM_TYPES, SEQREPO_DATA_PATH
from gene import ITEM_TYPES, SEQREPO_ROOT_DIR
from biocommons.seqrepo import SeqRepo
from pathlib import Path
from ftplib import FTP
Expand All @@ -23,7 +23,7 @@ class Base(ABC):
"""The ETL base class."""

def __init__(self, database: AbstractDatabase, host: str, data_dir: str,
src_data_dir: Path, seqrepo_dir: Path = SEQREPO_DATA_PATH,
src_data_dir: Path, seqrepo_dir: Path = SEQREPO_ROOT_DIR,
*args, **kwargs) -> None:
"""Instantiate Base class.
Expand Down

0 comments on commit bc0cf73

Please sign in to comment.