Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,27 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m build
python -m twine upload dist/*
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: |
poetry install

- name: Build and publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry build
poetry publish
16 changes: 12 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-mock
pip install -e .
poetry install --with dev

- name: Run tests
run: |
pytest -p no:warnings
poetry run pytest -p no:warnings
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,25 @@ The `ReadConfig` class supports the following options:
config = ReadConfig(
# File size limit in bytes (default: 5MB)
max_file_size=5 * 1024 * 1024,

# Directories to exclude (extends default set)
exclude_dirs={'custom_exclude', 'temp'},

# Files to exclude (extends default set)
exclude_files={'.custom_exclude', '*.tmp'},

# File extensions to include (extends default set)
include_extensions={'.custom', '.special'},

# Target specific subdirectory
target_dir='docs',

# Enable MarkItDown integration
use_markitdown=True,

# Specify extensions for MarkItDown processing
markitdown_extensions={'.pdf', '.docx', '.xlsx'},

# Enable debug mode
debug=False
)
Expand Down Expand Up @@ -165,6 +165,8 @@ Readium generates three types of output:
2. Install development dependencies:
```bash
pip install -e ".[dev]"
# or
poetry install --with dev
```
3. Install pre-commit hooks:
```bash
Expand All @@ -181,4 +183,4 @@ This project is licensed under the MIT License - see the LICENSE file for detail

## 🙏 Acknowledgments

- Microsoft and MarkItDown for their powerful document conversion tool
- Microsoft and MarkItDown for their powerful document conversion tool
Loading
Loading