Skip to content

Commit b481e9f

Browse files
authored
Merge pull request #72 from UBC-MDS/otter
Create release 2.0.0
2 parents b5031d2 + 4895f6e commit b481e9f

28 files changed

+617
-782
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and Test Package
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on push or pull request events but only for
6+
# the main branch and the otter (staging) branch
7+
push:
8+
branches: [ main, otter ]
9+
pull_request:
10+
branches: [ main, otter ]
11+
12+
# Allows to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
lint_check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Check-out repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.10"
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e .[lint]
31+
32+
- name: Run ruff formatter
33+
run: |
34+
ruff check .
35+
36+
build_and_test_package:
37+
runs-on: ${{ matrix.os }}
38+
strategy:
39+
matrix:
40+
os: [ubuntu-latest, macos-latest, windows-latest]
41+
python-version: ["3.10", "3.13"]
42+
43+
steps:
44+
- name: Check-out repository
45+
uses: actions/checkout@v2
46+
47+
- name: Set up Python ${{ matrix.python-version }}
48+
uses: actions/setup-python@v4
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
cache: 'pip'
52+
53+
- name: Install dependencies
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install -e .[tests]
57+
58+
- name: Run tests with coverage
59+
run: |
60+
pytest --cov --cov-report=term --cov-branch

.github/workflows/deploy.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Publish to TestPyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch: # Manual trigger
8+
9+
jobs:
10+
build-and-test:
11+
name: Build and Test Package
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
# Checks-out your repository so your job can access it
16+
- name: Check-out repository
17+
uses: actions/checkout@v2
18+
19+
# Set up Python
20+
- name: Set up Python 3.10
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.10"
24+
25+
# Install dependencies
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e .[dev,tests]
30+
31+
# Run pytest with coverage
32+
- name: Run tests with coverage
33+
run: |
34+
pytest --cov --cov-report=term --cov-branch
35+
36+
- name: Build package using Hatch
37+
run: |
38+
hatch build
39+
echo ""
40+
echo "Generated files:"
41+
ls -lh dist/
42+
43+
- name: Store the distribution packages
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: python-package-distributions
47+
path: dist/
48+
if-no-files-found: error
49+
50+
publish:
51+
name: Publish to TestPyPI
52+
needs: build-and-test
53+
runs-on: ubuntu-latest
54+
environment:
55+
name: testpypi
56+
url: https://test.pypi.org/project/wordguess/
57+
permissions:
58+
id-token: write # MANDATORY for trusted publishing
59+
60+
steps:
61+
- name: Download dists
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: python-package-distributions
65+
path: dist/
66+
67+
- name: Publish package to TestPyPI
68+
uses: pypa/gh-action-pypi-publish@release/v1
69+
with:
70+
repository-url: https://test.pypi.org/legacy/
71+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

.github/workflows/docs.yml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,43 @@
1-
name: Build Docs
1+
name: Render and Publish docs
22

33
on:
4-
pull_request:
54
push:
6-
branches:
5+
branches:
76
- main
7+
workflow_dispatch:
88

99
jobs:
10-
build-docs:
10+
render-docs:
1111
runs-on: ubuntu-latest
12-
12+
permissions:
13+
contents: write
1314
steps:
14-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.5.2
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5.1.0
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Quarto
19+
uses: quarto-dev/quarto-actions/setup@v2
20+
21+
# Set up Python
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
1724
with:
18-
python-version: ${{ matrix.python-version }}
25+
python-version: '3.10'
1926

20-
- name: Install hatch
27+
# Install dependencies
28+
- name: Install dependencies
2129
run: |
22-
python -m pip install --upgrade pip
23-
python -m pip install hatch
30+
python -m pip install --upgrade pip
31+
pip install -e .[docs]
2432
25-
- name: Build documentation using Hatch
33+
# manually call quartodoc build
34+
- name: quartodoc build
2635
run: |
27-
hatch run docs:build
36+
quartodoc build
37+
38+
- name: Render and Publish
39+
uses: quarto-dev/quarto-actions/publish@v2
40+
with:
41+
target: gh-pages
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,9 @@ cython_debug/
243243

244244
# Hatch-VCS
245245
_version.py
246+
247+
/.quarto/
248+
**/*.quarto_ipynb
249+
_site
250+
reference
251+
objects.json

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,29 @@ All notable changes to this project will be documented in this file.
3232
- Added tests for `get_score`
3333
- Added tests for `result_to_pattern`
3434
- Added package-level imports in `__init__.py`
35+
36+
## [2.0.0] - 2026-01-24
37+
38+
- Fixed typos and format issues
39+
- Fixed code linting errors
40+
- Updated `README.md` with installation and development guides
41+
- Updated `CONTRIBUTING.md` with code formatter and linter change
42+
- Updated `CONTRIBUTING.md` with hyperlinks
43+
- Updated `CODE_OF_CONDUCT.md` with enforcement guidelines and contact info
44+
- Added documentation site
45+
- Added Quarto configuration for documentation site
46+
- Added Quarto-related dependencies
47+
- Added `environment.yml` for development environment setup
48+
- Added `index.qmd` as documentation homepage
49+
- Added GitHub Actions workflow for package building and testing
50+
- Added GitHub Actions workflow for code quality checks
51+
- Added GitHub Actions workflow for publishing package to TestPyPI
52+
- Added GitHub Actions workflow for documentation rendering and publishing
53+
- Added one more test case in `tests/unit/test_result_to_pattern.py`
54+
- Added three test cases in `tests/unit/test_get_score.py`
55+
- Added one more test case in `tests/unit/test_get_result.py`
56+
- Added validation for penalty rate in `src/wordguess/get_score.py`
57+
- Added validation for empty result lists in `src/wordguess/get_score.py`
58+
- Removed unused `docs` directory and Sphinx configuration
59+
- Removed unused GitHub Actions workflows
60+
- Removed Sphinx-related dependencies from `pyproject.toml`

0 commit comments

Comments
 (0)