Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.0 #36

Merged
merged 96 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
2893c2c
file with just wordcounts
tallpauley Jun 2, 2021
ec42923
make "english" punctuation the default
tallpauley Jun 2, 2021
ffffe72
moving scripts outside of wordsiv
tallpauley Jun 4, 2021
7ca4ca4
bump version
tallpauley Jun 4, 2021
31c73b8
ran poetry update, removing mypy and other unused dev packages for now
tallpauley Feb 1, 2024
340b01f
for whatever reason, 'python -m pytest' works when just 'pytest' doesnt
tallpauley Feb 2, 2024
d73c361
performance optimizations to wordcount filtering
tallpauley Feb 3, 2024
9668a64
rid of unused have_glyphs func, replace has_glyphs calls in wc for pe…
tallpauley Feb 3, 2024
c051903
fix case previously handled by has_glyphs where available_glyphs_stri…
tallpauley Feb 6, 2024
0629581
Add arabic punctuation for sentences
jmsole Oct 7, 2023
bcf7c90
Add Farsi punctuation rules
jmsole Oct 7, 2023
c57dc9e
Fix error on punctuation file
jmsole Oct 7, 2023
3e6c242
Spanish punctuation
jmsole Dec 3, 2023
5633d57
Add encoding to open file
jmsole Oct 7, 2023
f9fa404
Use io library to open model source file
jmsole Oct 7, 2023
39a3fdb
fix "wordsiv package list" command
tallpauley Feb 6, 2024
13d1db7
remove Markov, font integration. improve performance
tallpauley Feb 10, 2024
8f263ec
fix issue #26, error output
tallpauley Feb 19, 2024
2e21151
startswith, endswith, better perf filtering
tallpauley Feb 19, 2024
1b79e9f
complete rewrite
tallpauley Jul 30, 2024
494bbe7
adding to test suite
tallpauley Aug 20, 2024
a1f0a20
Fix bugs, add seq words, simpler APIs, bump deps, fix poe test
tallpauley Aug 21, 2024
51850a4
simplifiying case and respect case to more explicit case options
tallpauley Aug 22, 2024
e6a685f
adding documentation for case parameter in sources.py
tallpauley Aug 22, 2024
d143aaa
rewriting documentation from scratch
tallpauley Aug 23, 2024
3568bd9
docs fixes
tallpauley Aug 23, 2024
a39b312
num_top becomes top_k, better regexp error message, hoefler proof
tallpauley Aug 23, 2024
dad121d
adding 'inner' parameter to wc filtering, fixing bugs
tallpauley Aug 26, 2024
6a8a56b
n to idx, handling idx when not enough words returned
tallpauley Aug 27, 2024
e3a0d82
basic arabic-farsi example from jmsole's script, updating hoefler to …
tallpauley Aug 27, 2024
7258077
adding punc boolean so we can turn off punctuation for sent, minor in…
tallpauley Aug 27, 2024
2745a2b
new startglyph and endglyph naming, as well as optimizations to filte…
tallpauley Aug 27, 2024
7edb5d9
adding galvanized jet style proof, and reintroducing startswith, ends…
tallpauley Aug 27, 2024
1dfbb89
use logging instead of stdout, improvements to gj proof
tallpauley Sep 5, 2024
4399e7a
remove startglyph, endglyph, use startswith, endswith with slice chec…
tallpauley Sep 5, 2024
1507323
bump deps and black format
tallpauley Sep 5, 2024
bee0178
complete rewrite
tallpauley Nov 4, 2024
8449c54
inital mkdocs documentation
tallpauley Dec 28, 2024
8deb03f
improve importing docs
tallpauley Dec 28, 2024
e5177be
updating license details for en_books
tallpauley Dec 28, 2024
0f17c2a
refactoring punctuation, vocab into modules
tallpauley Dec 28, 2024
662d475
test types, pre-commit, black -> ruff
tallpauley Dec 28, 2024
6b8e229
use annotations from __future__, better WordSiv class docs
tallpauley Dec 29, 2024
8701383
typing, docs, mkdocs progress
tallpauley Dec 29, 2024
37caaa6
adding mypy, mise, fixing types
tallpauley Jan 1, 2025
7a5fcc1
fix error in __all__ statement
tallpauley Jan 1, 2025
8355d59
adding list_vocabs()
tallpauley Jan 1, 2025
0b4bbea
fix bug, vocab arg dropped
tallpauley Jan 2, 2025
963884a
restructure docs, test docs snippets
tallpauley Jan 2, 2025
0b33874
better auto case transforms with "any"
tallpauley Jan 3, 2025
cd6d393
add quickstart guide (in progress), add minimum_results to top_words
tallpauley Jan 3, 2025
9e726ab
add test to verify new case='any' logic works, split other tests
tallpauley Jan 3, 2025
42ab370
vocab undefined test, better test names
tallpauley Jan 3, 2025
fa89570
remove mypy from pre-commit for now
tallpauley Jan 3, 2025
97e1536
poe tasks for coverage and docs
tallpauley Jan 3, 2025
2f6d7f1
docs: case intro, restructuring
tallpauley Jan 3, 2025
263b2eb
remove tuning word selection, moving to generating text guide, move t…
tallpauley Jan 4, 2025
ed5dee2
fix formatting of filter errors
tallpauley Jan 4, 2025
3a9f3a2
rm top_word, top_words docs from filtering-* doc, expand quick-refere…
tallpauley Jan 4, 2025
04c2cea
remove top_level functions to avoid issue w/ DrawBot module caching, …
tallpauley Jan 5, 2025
315ee0b
install pytest-cov
tallpauley Jan 6, 2025
18367ed
rm seed type annotation, amend inner, contains types
tallpauley Jan 6, 2025
1600eb8
fix bug where words() passed invalid vocab arg to number()
tallpauley Jan 6, 2025
64467a6
rm unused _scale_counts, fix error vocab arg dropped when calling word()
tallpauley Jan 6, 2025
ee9334d
fix bug: accidentally using default RNG instead of WordSiv one
tallpauley Jan 6, 2025
02682a1
add to quick-reference and tests
tallpauley Jan 6, 2025
09f675a
improve test_wordsiv.py, detect and fix bugs, rm unused lines
tallpauley Jan 7, 2025
5614e7d
improve quick-reference.py
tallpauley Jan 7, 2025
eef1a8e
fix bug in _filter.py where regex [] could be empty
tallpauley Jan 7, 2025
2825e2d
add test for inner arg
tallpauley Jan 7, 2025
b58ebad
remove unused line in gj-proof.py
tallpauley Jan 8, 2025
66d393e
simplify top_word api on gj-proof
tallpauley Jan 8, 2025
3721735
fix: do not cache Vocab.filter, we already cache _filter_wordcount
tallpauley Jan 8, 2025
405195f
pass wc_str and wc_tuple to _filter_wordcount so they are computed once
tallpauley Jan 8, 2025
d40e637
splitting out cached helper functions in _vocab.py so cache is not ti…
tallpauley Jan 8, 2025
b9e8ab8
rewrite filters in regex for speed
tallpauley Jan 8, 2025
14ae716
modify uc setting so no MixedCase, new uc_force option
tallpauley Jan 14, 2025
54046a1
improve case documentation
tallpauley Jan 14, 2025
6a1315f
default_glyphs to glyphs, default_vocab to vocab, make _vocab_data pr…
tallpauley Jan 14, 2025
8c08024
improve quick-reference.py, examples, add seed arg to WordSiv init
tallpauley Jan 14, 2025
9dce95e
flesh out filtering-words.md w/ snippets
tallpauley Jan 15, 2025
e19fcde
format quick-reference for better display on mkdocs
tallpauley Jan 15, 2025
9072f18
Watch examples/ for changes
tallpauley Jan 15, 2025
626bbe1
improve docstrings and docs
tallpauley Jan 16, 2025
63d578d
not include test_snippets.py in coverage
tallpauley Jan 18, 2025
dca45ee
retroactive pre-commit cleanup
tallpauley Jan 18, 2025
ae47dc6
add CI/CD for lint/test/docs
tallpauley Jan 18, 2025
14b3d46
improve docs, new README, better changelog
tallpauley Jan 19, 2025
84b6ff3
fill out generating-text.md and examples
tallpauley Jan 20, 2025
00ed015
README.md needs example inline, not include
tallpauley Jan 20, 2025
94a67a0
test to ensure filter arg propagation, edge case handling
tallpauley Jan 20, 2025
b44c932
logo, text gen docs, bump version in pyproject.toml
tallpauley Jan 20, 2025
34432e3
fix path to logo for README.md
tallpauley Jan 20, 2025
f68bfa6
attribution to @jmsole in release notes
tallpauley Jan 20, 2025
fe57cfa
bump deps
tallpauley Jan 20, 2025
2609443
wordsiv.com URLs for docs
tallpauley Jan 20, 2025
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
84 changes: 43 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CI

on:
push:
branches: [ main ]
branches: ["*"]
pull_request:
branches: [ main ]
branches: ["main"]
workflow_dispatch:

jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with ci

- name: Run pre-commit
run: poetry run pre-commit run --all-files

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install -v
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Static type checks with mypy
# run: |
# poetry run mypy wordsiv/
- name: Test with pytest outputting coverage
run: |
poetry run coverage run --source=. -m pytest --doctest-modules --ignore scripts
- name: Upload to coveralls
run: |
poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Show diff w/ black
run: |
poetry run black --diff wordsiv/
- name: Test out README.md examples
run: |
bash tests/run_byexample.sh
- name: Check out code
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with ci

- name: Run pytest
run: poetry run pytest

- name: Run coverage
run: poetry run pytest --cov-report term-missing --cov=wordsiv tests/ --ignore=tests/test_snippets.py
29 changes: 29 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: docs
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material mkdocstrings-python
- run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ prof/
.DS_Store
.venv*/
_build/
_static/
_static/
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"console": "integratedTerminal"
}
]
}
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
80
]
}
}
}
4 changes: 4 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
This repository is licensed under the MIT License (see below), EXCEPT for *.tsv
files in wordsiv/vocab_data. Each .tsv file is licensed by its corresponding
*_meta.json file. Example: the license for en_books.tsv is in en_books_meta.json

MIT License

Copyright (c) 2021 Christopher Pauley
Expand Down
Loading
Loading