Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: Build package
run: |
python -m pip install twine build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: "3.12"
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v3
Expand All @@ -40,10 +40,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: |
Expand Down
23 changes: 14 additions & 9 deletions comment_spell_check/utils/bibtex_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ def add_bibtex(spell: spellchecker.SpellChecker, filename: str):

word_list = []

with open(filename, "rt", encoding="utf-8") as biblatex_file:
bib_database = bibtexparser.load(biblatex_file)

for k in bib_database.get_entry_dict().keys():
words = split_bibtex_name(k)
word_list.extend(words)

logger.info("Words: %s", word_list)
spell.word_frequency.load_words(word_list)
if hasattr(bibtexparser, "parse_file"):
bib_database = bibtexparser.parse_file(filename)
entry_keys = (entry.key for entry in bib_database.entries)
else:
with open(filename, "rt", encoding="utf-8") as biblatex_file:
bib_database = bibtexparser.load(biblatex_file)
entry_keys = bib_database.get_entry_dict()

for key in entry_keys:
words = split_bibtex_name(key)
word_list.extend(words)

logger.info("Words: %s", word_list)
spell.word_frequency.load_words(word_list)
41 changes: 7 additions & 34 deletions conda-env.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
@EXPLICIT
https://conda.anaconda.org/conda-forge/osx-64/ca-certificates-2019.9.11-hecc5488_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/jpeg-9b-he5867d9_2.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/libcxxabi-4.0.1-hcfea43d_1.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/xz-5.2.4-h1de35cc_4.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/zlib-1.2.11-h1de35cc_3.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/libcxx-4.0.1-hcfea43d_1.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/libpng-1.6.37-ha441bb4_0.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/openssl-1.1.1c-h01d97ff_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/tk-8.6.8-ha441bb4_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/zstd-1.3.7-h5bba6e5_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/libffi-3.2.1-h475c297_4.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/libtiff-4.0.10-hcb84e12_2.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-8.0.1-h770b8ee_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/ncurses-6.1-h0a44026_1.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/libedit-3.1.20181209-hb402a30_0.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/libgfortran-4.0.0-2.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/readline-7.0-h1de35cc_5.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.7-h4bb4525_1.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/sqlite-3.29.0-ha441bb4_0.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/libblas-3.8.0-12_openblas.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/python-3.7.4-h359304d_1.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/certifi-2019.9.11-py37_0.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.8.0-12_openblas.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.8.0-12_openblas.tar.bz2
https://conda.anaconda.org/simpleitk/label/dev/osx-64/simpleitk-1.2rc1-py37h0a44026_0.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/numpy-1.17.2-py37h6b0580a_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/setuptools-41.0.1-py37_0.tar.bz2
https://conda.anaconda.org/conda-forge/osx-64/itk-5.0.1-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/wheel-0.33.4-py37_0.tar.bz2
https://repo.anaconda.com/pkgs/main/osx-64/pip-19.2.2-py37_0.tar.bz2
# Create the environment with:
# conda create --name <env> --file <this file> --override-channels \
# --channel conda-forge --platform osx-64
# Then run this in the activated environment:
# python -m pip install itk SimpleITK
python=3.12
pip
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ authors = [
description = "A script to automatically spell checks comments of a codebase."
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.8"
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
Expand Down
Loading