Compare commits

..

No commits in common. "master" and "v1.0.0" have entirely different histories.

8 changed files with 737 additions and 1376 deletions

View File

@ -1,22 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: 💚 ci
include: "scope"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: ⬆️ dep-bump
include: "scope"

View File

@ -12,36 +12,34 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python_version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- uses: actions/cache@v2
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root
- name: Install poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: "2.1.2"
- name: Configure poetry
if: steps.cache.outputs.cache-hit != 'true'
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v4
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('poetry.lock') }}-venv
- name: Install build dependencies
run: sudo apt install -y libxml2-dev libxslt-dev
python -m pip install --upgrade pip
python -m pip install poetry
- name: Configure poetry
run: python -m poetry config virtualenvs.create false
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
run: python -m poetry install
- name: Lint with black
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run black --check --diff pandas_ods_reader/ tests/
black --check --diff pandas_ods_reader/ tests/
- name: Test with pytest
run: |
poetry run pytest tests/
python -m pytest tests/

3
.gitignore vendored
View File

@ -36,6 +36,3 @@ venv/
# pyenv
.python-version
# mise
mise.local.toml

View File

@ -37,11 +37,11 @@ def read_ods(
"""
path = file_or_path if isinstance(file_or_path, Path) else Path(file_or_path)
if not path.is_file():
raise FileNotFoundError(f"file {path} does not exist")
backend = EXT_MAP.get(path.suffix, ods)
raise FileNotFoundError(f"file {file_or_path} does not exist")
backend = EXT_MAP.get(Path(file_or_path).suffix, ods)
return algo.read_data(
backend,
path,
Path(file_or_path),
sheet,
headers=headers,
columns=columns or [],

View File

@ -64,7 +64,7 @@ def get_value(
text = cell.find(TABLE_CELL_TEXT_TAG, namespaces=cell.nsmap)
if text is None:
return None, 0
value: Union[str, float] = "".join(text.itertext())
value: Union[str, float] = text.text or ""
if parsed and is_float(cell):
value = float(value)
_n_repeated = cell.attrib.get(

2036
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "pandas-ods-reader"
version = "1.0.2"
version = "1.0.0"
description = "Read in .ods and .fods files and return a pandas.DataFrame."
authors = ["iuvbio <iuvbio@users.noreply.github.com>"]
license = "MIT"
@ -15,10 +15,10 @@ classifiers = [
]
[tool.poetry.dependencies]
python = ">=3.9,<4"
python = ">=3.9,<3.12"
ezodf = ">=0.3.2"
lxml = ">=4.9.2"
pandas = ">=2.2.3"
pandas = ">=1.5.2"
[tool.poetry.group.dev.dependencies]
black = ">=22.10.0"
@ -33,8 +33,8 @@ pre-commit = ">=3.7.1"
[tool.commitizen]
name = "cz_conventional_commits"
version = "1.0.0"
tag_format = "v$version"
version_provider = "poetry"
version_files = ["pyproject.toml:version"]
[build-system]