diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2537f25..9b77ea7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -25,16 +25,16 @@ If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** -- OS: [e.g. iOS] -- Browser [e.g. chrome, safari] -- Version [e.g. 22] +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** -- Device: [e.g. iPhone6] -- OS: [e.g. iOS8.1] -- Browser [e.g. stock browser, safari] -- Version [e.g. 22] +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0b39afe..9c32ebf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,12 +2,12 @@ # pre-commit install repos: - - repo: https://github.com/psf/black - rev: 24.10.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.12.0 hooks: - id: black - repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 + rev: 1.20.0 hooks: - id: blacken-docs - repo: https://github.com/pre-commit/mirrors-prettier @@ -17,7 +17,7 @@ repos: files: \.(html|md|yml|yaml) args: [--prose-wrap=preserve] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.4 + rev: v0.14.10 hooks: - id: ruff args: diff --git a/twarc2sql/db_utils/db_access.py b/twarc2sql/db_utils/db_access.py index d583045..d3010ea 100644 --- a/twarc2sql/db_utils/db_access.py +++ b/twarc2sql/db_utils/db_access.py @@ -1,7 +1,7 @@ """ Module for accessing the database. -Module contains functions for creating and deleting databases & their +Module contains functions for creating and deleting databases & their tables as defined in models.py. """ diff --git a/twarc2sql/db_utils/models.py b/twarc2sql/db_utils/models.py index 67a5df7..920f77c 100644 --- a/twarc2sql/db_utils/models.py +++ b/twarc2sql/db_utils/models.py @@ -1,7 +1,7 @@ """ The SQLAlchemy models for creating the database tables. -The models are based on the Twitter API v2 Tweet object. -It is an opnionated normalization of the Tweet object +The models are based on the Twitter API v2 Tweet object. +It is an opnionated normalization of the Tweet object to make it easier to query the database. """ @@ -84,7 +84,7 @@ def clean_text(self): Remove newlines from the tweet text. """ if self.text: - self.text = self.text.replace("\x00", "\uFFFD") + self.text = self.text.replace("\x00", "\ufffd") class Author(Base): @@ -121,7 +121,7 @@ def clean_text(self): Remove newlines from the tweet text. """ if self.description: - self.description = self.description.replace("\x00", "\uFFFD") + self.description = self.description.replace("\x00", "\ufffd") class Retweet_Tweet_Mapping(Base): diff --git a/twarc2sql/db_utils/tests/conftest.py b/twarc2sql/db_utils/tests/conftest.py index f5a8295..efc1aa8 100644 --- a/twarc2sql/db_utils/tests/conftest.py +++ b/twarc2sql/db_utils/tests/conftest.py @@ -25,7 +25,7 @@ def config_file_path() -> str: @pytest.fixture(scope="module") def uri(config_file_path): """ - uri _summary_. + Uri _summary_. returns a URI """ @@ -43,7 +43,7 @@ def uri(config_file_path): @pytest.fixture(scope="module") def engine(config_file_path) -> sa.engine.base.Engine: """ - engine _summary_. + Engine _summary_. returns a sqlalchemy engine diff --git a/twarc2sql/db_utils/tests/test_db_access.py b/twarc2sql/db_utils/tests/test_db_access.py index 54cc2a9..8f8491a 100644 --- a/twarc2sql/db_utils/tests/test_db_access.py +++ b/twarc2sql/db_utils/tests/test_db_access.py @@ -1,7 +1,7 @@ """ Tests for the db_access module. -The tests are run using pytest. To run the tests, use the following command from the +The tests are run using pytest. To run the tests, use the following command from the root directory of the project: pytest twarc2sql/db_utils/tests/test_db_access.py diff --git a/twarc2sql/file_utils/file_to_object.py b/twarc2sql/file_utils/file_to_object.py index 12ed666..b4515ce 100644 --- a/twarc2sql/file_utils/file_to_object.py +++ b/twarc2sql/file_utils/file_to_object.py @@ -1,6 +1,6 @@ """file_to_object.py convert a file to objects to be processed. -This module contains functions to convert a file to objects to +This module contains functions to convert a file to objects to be processed for each endpoint. """