Compare commits
No commits in common. "master" and "v1.0.0" have entirely different histories.
|
|
@ -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"
|
|
||||||
|
|
@ -12,36 +12,34 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python_version }}
|
- name: Set up Python ${{ matrix.python_version }}
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python_version }}
|
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
|
- name: Install poetry
|
||||||
uses: abatilo/actions-poetry@v4
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
with:
|
|
||||||
poetry-version: "2.1.2"
|
|
||||||
- name: Configure poetry
|
|
||||||
run: |
|
run: |
|
||||||
poetry config virtualenvs.create true --local
|
python -m pip install --upgrade pip
|
||||||
poetry config virtualenvs.in-project true --local
|
python -m pip install poetry
|
||||||
- uses: actions/cache@v4
|
- name: Configure poetry
|
||||||
name: Define a cache for the virtual environment based on the dependencies lock file
|
run: python -m poetry config virtualenvs.create false
|
||||||
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
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: poetry install
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: python -m poetry install
|
||||||
- name: Lint with black
|
- name: Lint with black
|
||||||
run: |
|
run: |
|
||||||
# stop the build if there are Python syntax errors or undefined names
|
# 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
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
poetry run pytest tests/
|
python -m pytest tests/
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,3 @@ venv/
|
||||||
|
|
||||||
# pyenv
|
# pyenv
|
||||||
.python-version
|
.python-version
|
||||||
|
|
||||||
# mise
|
|
||||||
mise.local.toml
|
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,11 @@ def read_ods(
|
||||||
"""
|
"""
|
||||||
path = file_or_path if isinstance(file_or_path, Path) else Path(file_or_path)
|
path = file_or_path if isinstance(file_or_path, Path) else Path(file_or_path)
|
||||||
if not path.is_file():
|
if not path.is_file():
|
||||||
raise FileNotFoundError(f"file {path} does not exist")
|
raise FileNotFoundError(f"file {file_or_path} does not exist")
|
||||||
backend = EXT_MAP.get(path.suffix, ods)
|
backend = EXT_MAP.get(Path(file_or_path).suffix, ods)
|
||||||
return algo.read_data(
|
return algo.read_data(
|
||||||
backend,
|
backend,
|
||||||
path,
|
Path(file_or_path),
|
||||||
sheet,
|
sheet,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
columns=columns or [],
|
columns=columns or [],
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ def get_value(
|
||||||
text = cell.find(TABLE_CELL_TEXT_TAG, namespaces=cell.nsmap)
|
text = cell.find(TABLE_CELL_TEXT_TAG, namespaces=cell.nsmap)
|
||||||
if text is None:
|
if text is None:
|
||||||
return None, 0
|
return None, 0
|
||||||
value: Union[str, float] = "".join(text.itertext())
|
value: Union[str, float] = text.text or ""
|
||||||
if parsed and is_float(cell):
|
if parsed and is_float(cell):
|
||||||
value = float(value)
|
value = float(value)
|
||||||
_n_repeated = cell.attrib.get(
|
_n_repeated = cell.attrib.get(
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pandas-ods-reader"
|
name = "pandas-ods-reader"
|
||||||
version = "1.0.2"
|
version = "1.0.0"
|
||||||
description = "Read in .ods and .fods files and return a pandas.DataFrame."
|
description = "Read in .ods and .fods files and return a pandas.DataFrame."
|
||||||
authors = ["iuvbio <iuvbio@users.noreply.github.com>"]
|
authors = ["iuvbio <iuvbio@users.noreply.github.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
@ -15,10 +15,10 @@ classifiers = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = ">=3.9,<4"
|
python = ">=3.9,<3.12"
|
||||||
ezodf = ">=0.3.2"
|
ezodf = ">=0.3.2"
|
||||||
lxml = ">=4.9.2"
|
lxml = ">=4.9.2"
|
||||||
pandas = ">=2.2.3"
|
pandas = ">=1.5.2"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
black = ">=22.10.0"
|
black = ">=22.10.0"
|
||||||
|
|
@ -33,8 +33,8 @@ pre-commit = ">=3.7.1"
|
||||||
|
|
||||||
[tool.commitizen]
|
[tool.commitizen]
|
||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
|
version = "1.0.0"
|
||||||
tag_format = "v$version"
|
tag_format = "v$version"
|
||||||
version_provider = "poetry"
|
|
||||||
version_files = ["pyproject.toml:version"]
|
version_files = ["pyproject.toml:version"]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue