Skip to content

Commit

Permalink
Move to Python 3.11 baseline; increase blocklist import verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
eloquence committed Aug 28, 2024
1 parent d36e257 commit de57b5a
Show file tree
Hide file tree
Showing 5 changed files with 521 additions and 408 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
run: curl -sSL https://install.python-poetry.org | python3 -
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.11'
cache: 'poetry'
- name: Install Python dependencies
run: poetry install --with=dev
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

If you want to run your own instance of `trackthenews`, you can download and install the package, and run its built-in configuration process. It can be installed with `pip`:

Python 3.9 is what we currently test against, though it may work with other versions.
Python 3.11 is what we currently test against, though it may work with other versions.


```bash
Expand Down Expand Up @@ -64,12 +64,14 @@ In some cases, you may wish to suppress articles from being posted, even though
- `check_article` takes an Article (and so has access to its `outlet`, `title`, and `url`) and should return `True` for any article that should be skipped in its entirety.
- `check_paragraph` takes an Article and an individual matching paragraph and should return `True` for any paragraph that should be skipped (if other paragraphs match, the article will still be posted, but without the skipped paragraphs).

You can import the `bs4` library in `blocklist.py` for advanced parsing.

## Development

### Quick Start

```bash
poetry env use 3.9 # Necessary if you have a different default python version
poetry env use 3.11 # Necessary if you have a different default python version
poetry install
poetry run trackthenews sample_project
# Follow the setup script instructions
Expand All @@ -83,8 +85,8 @@ poetry run trackthenews sample_project
To develop `trackthenews`, clone the repository and install the package using [poetry][] and run the CLI tool:

```bash
# Ensure you're using Python 3.9
poetry env use 3.9
# Ensure you're using Python 3.11
poetry env use 3.11
# This will create a virtual environment and install trackthenews and its dependencies
poetry install --with=dev
# This will run the setup script
Expand Down
Loading

0 comments on commit de57b5a

Please sign in to comment.