Skip to content

Commit

Permalink
Change name of scraper class
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverkinch committed Mar 6, 2024
1 parent d41be79 commit 5f4ba0a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/doms_databasen/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _raw_data_exists(self, case_dir) -> bool:
If a case has been scraped successfully, then the case directory exists
and contains two files: the PDF document and the tabular data.
Same code as the method `_already_scraped` from class `DomsDatabasenScraper`
Same code as the method `_already_scraped` from class `Scraper`
(src/doms_databasen/scraper.py).
Args:
Expand Down
2 changes: 1 addition & 1 deletion src/doms_databasen/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
logger = logging.getLogger(__name__)


class DomsDatabasenScraper:
class Scraper:
"""Scraper for domsdatabasen.dk.
Args:
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import logging

import hydra
from doms_databasen.scraper import DomsDatabasenScraper
from doms_databasen.scraper import Scraper
from omegaconf import DictConfig

logger = logging.getLogger(__name__)
Expand All @@ -32,7 +32,7 @@ def main(config: DictConfig) -> None:
Hydra config object.
"""
scraper = DomsDatabasenScraper(config=config)
scraper = Scraper(config=config)
if config.scrape.all:
scraper.scrape_all()
elif config.scrape.case_id:
Expand Down
8 changes: 4 additions & 4 deletions tests/scraper/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import shutil

import pytest
from doms_databasen.scraper import DomsDatabasenScraper
from doms_databasen.scraper import Scraper
from hydra import compose, initialize

# Initialise Hydra
Expand All @@ -21,8 +21,8 @@ def config():

@pytest.fixture(scope="session")
def scraper(config):
"""Return a DomsDatabasenScraper instance."""
return DomsDatabasenScraper(config=config)
"""Return a Scraper instance."""
return Scraper(config=config)


def pytest_sessionstart(session):
Expand All @@ -31,7 +31,7 @@ def pytest_sessionstart(session):
config_name="config",
overrides=["testing=True"],
)
scraper = DomsDatabasenScraper(config=config)
scraper = Scraper(config=config)
case_id = str(config.scrape.test_case_id)
scraper.scrape(case_id=case_id)

Expand Down

0 comments on commit 5f4ba0a

Please sign in to comment.