Skip to content
Open

sync #14

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
9fd86df
add dependabot
jianlins Jun 27, 2023
e7475d4
fix path
jianlins Jun 27, 2023
ad115f7
Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows
dependabot[bot] Sep 3, 2024
ed35db2
Merge pull request #4 from medspacy/dependabot/github_actions/dot-git…
jianlins Oct 6, 2024
2487414
reconfigure requirements to support python 3.12
jianlins Oct 25, 2024
7587235
update dev_requirements.txt
jianlins Oct 25, 2024
40e80e8
add python3.12 for multiversion test
jianlins Oct 25, 2024
97ae45a
rename the job step to avoid confusion
jianlins Oct 25, 2024
8cfac59
reorder dev-requirements.txt
jianlins Oct 25, 2024
87fd313
avoid pip install ./ override dependencies
jianlins Oct 25, 2024
39973c9
simplify os matrix
jianlins Oct 25, 2024
edb5670
update pyproject.toml to fix the conditional dependencies
jianlins Oct 25, 2024
de98089
os latest doesn't support older python
jianlins Oct 25, 2024
13de9d0
relax setuptools version to support older version python
jianlins Oct 25, 2024
1a79a47
test
jianlins Oct 25, 2024
ad67ed3
remove --no-deps
jianlins Oct 25, 2024
4a9b358
use cibuildwheel instead
jianlins Oct 25, 2024
af11eac
test
jianlins Oct 25, 2024
19fd6ab
test
jianlins Oct 25, 2024
dd3d5ef
test
jianlins Oct 25, 2024
4d98f90
test
jianlins Oct 25, 2024
2932bea
test
jianlins Oct 25, 2024
f73ff2e
test
jianlins Oct 25, 2024
b94997f
test
jianlins Oct 25, 2024
8c506a3
test
jianlins Oct 25, 2024
5736e87
add os back
jianlins Oct 25, 2024
4fd846f
update actions versions
jianlins Oct 25, 2024
e8f765a
remove not supported macos versions
jianlins Oct 25, 2024
5d2d911
test
jianlins Oct 25, 2024
2f4611c
test
jianlins Oct 25, 2024
a870afe
add cp312
jianlins Oct 25, 2024
716f59d
test
jianlins Oct 25, 2024
01a245a
split the build for deprecated pythons
jianlins Oct 25, 2024
744ebf9
test
jianlins Oct 25, 2024
501f6f2
update pip install test
jianlins Oct 25, 2024
7e13350
test
jianlins Oct 25, 2024
ba590ef
test
jianlins Oct 25, 2024
9a72b36
test
jianlins Oct 25, 2024
2636c75
test
jianlins Oct 25, 2024
c9de973
test
jianlins Oct 25, 2024
b99f7db
test
jianlins Oct 25, 2024
1c45598
test
jianlins Oct 25, 2024
0b47325
add pytest
jianlins Oct 25, 2024
1bde093
test
jianlins Oct 25, 2024
30beacd
test
jianlins Oct 25, 2024
8385b98
test
jianlins Oct 26, 2024
8baa5c5
test
jianlins Oct 26, 2024
98bfe4f
test
jianlins Oct 26, 2024
80f9e3b
test
jianlins Oct 26, 2024
4bd6d25
tte
jianlins Oct 26, 2024
689f5a4
test
jianlins Oct 26, 2024
e9ab922
test
jianlins Oct 26, 2024
29d3fc1
test
jianlins Oct 27, 2024
8d97de7
test
jianlins Oct 27, 2024
e211b6c
test
jianlins Oct 27, 2024
aa05f45
test
jianlins Oct 27, 2024
de0e57c
test
jianlins Oct 27, 2024
246899c
test
jianlins Oct 27, 2024
d3d1d38
test
jianlins Oct 27, 2024
aa2838f
test
jianlins Oct 27, 2024
dd2ba5b
test
jianlins Oct 27, 2024
c0f673e
test
jianlins Oct 27, 2024
1d12c1f
test
jianlins Oct 27, 2024
dd0f56e
test
jianlins Oct 27, 2024
170f322
test
jianlins Oct 27, 2024
36224c1
test
jianlins Oct 27, 2024
59cedc7
test
jianlins Oct 27, 2024
4a699d6
test
jianlins Oct 27, 2024
5423498
test
jianlins Oct 27, 2024
365e2b9
test
jianlins Oct 27, 2024
7807da3
test
jianlins Oct 27, 2024
ba7d459
1.0.9
jianlins Oct 27, 2024
a6a2564
Refactor PyRuSHSentencizer to support gap merging and splitting; upda…
jianlins Aug 25, 2025
9cbfba7
Bump version to 1.0.10dev
jianlins Aug 25, 2025
ac95cb4
Update build matrix to use latest OS versions for wheel building
jianlins Aug 25, 2025
796596d
Update macOS build platforms in wheel builder configuration
jianlins Aug 25, 2025
5fdaaeb
Update macOS build platform to use 'macos-latest' for ARM64 architecture
jianlins Aug 25, 2025
49be067
Update macOS build platforms to use wildcard for version compatibility
jianlins Aug 25, 2025
da0d5fb
Update macOS build platforms to specify architecture for compatibility
jianlins Aug 25, 2025
ef9366f
Update pip installation command to include --break-system-packages op…
jianlins Aug 25, 2025
ba9d872
solve artificats name conflicts
jianlins Aug 25, 2025
63ec8c7
update cibuildwheel version
jianlins Aug 25, 2025
40cc01f
update license configuration
jianlins Aug 25, 2025
ec9edb4
update license configuration
jianlins Aug 25, 2025
08d9168
update license configure
jianlins Aug 25, 2025
2fbc277
Update setuptools before build
jianlins Aug 25, 2025
afd25cb
Improve artifact handling by moving wheel and source distribution fil…
jianlins Aug 25, 2025
5a8b596
Refactor license configuration and improve project metadata
jianlins Aug 26, 2025
ed16040
Update build workflow to use dev-requirements.txt and publish package…
jianlins Aug 26, 2025
746e8ec
skip musllinux
jianlins Aug 26, 2025
df7ee3e
Add permissions for id-token in upload_pypi job
jianlins Aug 26, 2025
2b9923c
Enable musllinux support in the build matrix
jianlins Aug 26, 2025
4a64ad4
Bump version to 1.0.10
jianlins Aug 26, 2025
88003b6
Remove license-files entry from pyproject.toml
jianlins Aug 26, 2025
f85500e
Update devcontainer setup and adjust Python versions in CI workflow
jianlins Aug 26, 2025
f6b0917
add max_sentence_length for cpredict_merge_gaps pytest passed
jianlins Aug 27, 2025
b141e04
Merge branch 'master' of https://github.com/medspacy/PyRuSH
jianlins Aug 27, 2025
5cc3f89
Add max_sentence_length parameter to cpredict_split_gaps and implemen…
jianlins Aug 28, 2025
538ca59
Add max_sentence_length parameter to PyRuSHSentencizer and update rel…
jianlins Aug 28, 2025
6136a6a
Remove obsolete StaticSentencizerFun binary files for Python 3.10 and…
jianlins Aug 28, 2025
86d2e96
Update .gitignore and enhance tests for cpredict_split_gaps functiona…
jianlins Aug 28, 2025
c63dfe5
Refactor PyRuSHSentencizer to remove unused import and update sentenc…
jianlins Aug 28, 2025
5827db5
Enhance PyRuSHSentencizer and tests: update merge_gaps documentation,…
jianlins Aug 29, 2025
75e3497
test_debug.py pass
jianlins Aug 30, 2025
dcb1ebf
Enhance gap handling and max_sentence_length logic in cpredict_merge_…
jianlins Aug 31, 2025
bc7ec94
all test passed
jianlins Sep 1, 2025
b605483
migrate to use loguru
jianlins Sep 1, 2025
a4e1f3f
Refactor logging in tests to use debug level for improved verbosity a…
jianlins Sep 1, 2025
81448b9
Add length verification for split sentences in gap handling tests
jianlins Sep 2, 2025
ccd23af
Bump version to 1.0.11
jianlins Sep 2, 2025
09b248e
Add loguru to requirements for enhanced logging capabilities
jianlins Sep 2, 2025
5712f7f
Add medspacy to development requirements
jianlins Sep 2, 2025
417264a
Refactor max_sentence_length handling in gap merging logic for improv…
jianlins Sep 2, 2025
b670a40
Update rules_path in medspacy configuration to use the correct directory
jianlins Sep 2, 2025
0009be1
Update rules_path in test_whitespace_edge_split to use dynamic path r…
jianlins Sep 2, 2025
5680f0a
Update README to include revision history for version 1.0.11 with imp…
jianlins Sep 2, 2025
634bb93
add additional test cases, revert rules
jianlins Sep 10, 2025
0c771c4
Update GitHub Actions workflow to use latest OS versions and remove o…
jianlins Sep 10, 2025
22241a2
Remove license_files entry from setup.cfg
jianlins Sep 10, 2025
1d59bbc
Update workflow to ensure setuptools is upgraded during dependency in…
jianlins Sep 10, 2025
a1b2a86
Bump version to 1.0.12dev0
jianlins Sep 10, 2025
83b807a
Update pip_install_unitest workflow to use dev-requirements.txt for d…
jianlins Sep 10, 2025
700310e
Refactor test rule path to simplify directory structure and improve r…
jianlins Sep 10, 2025
aa688c8
use test rule path
jianlins Sep 10, 2025
5cf4ba4
Bump version to 1.0.12dev1
jianlins Sep 10, 2025
b30cc9b
force reinstall
jianlins Sep 10, 2025
ac5818d
previous configuration results in numpy incapatable version issue. retry
jianlins Sep 10, 2025
816367e
Update version to 1.0.12
jianlins Sep 10, 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
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"image": "condaforge/miniforge3",
"postCreateCommand": "apt-get update && apt-get install -y build-essential && pip install -U -r dev-requirements.txt"
}
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
105 changes: 56 additions & 49 deletions .github/workflows/pip_install_unitest.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,67 @@
name: pip_install_unitest
on:
workflow_dispatch
workflow_dispatch:
inputs:
install_prerelease:
description: 'Check this to install the prerelease version of medspacy if available and the version is newer than formal release.'
type: boolean
required: false
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build_wheels:
name: Build wheel for ${{ matrix.python-version }}-${{ matrix.buildplat[1] }}
if: >-
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Build System'))
runs-on: ${{ matrix.buildplat[0] }}

test:
# TODO: Do we care if this only runs on allowed branches since we check push/pull_request above?
# if: github.ref == 'refs/heads/master' OR github.ref == 'refs/heads/develop'
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
# Github Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
- [ ubuntu-20.04, ubuntu-20.04 ]
- [ macos-10.15, macosx_10 ]
- [ macos-11, macosx_11 ]
- [ macos-12, macosx_12 ]
- [ windows-2019, windows-2019 ]
- [ windows-2022, windows-2022 ]
# spacy doesn't compile win32
# python: ["cp36"] # Note: Wheels not needed for PyPy
python-version: [ "3.6", "3.7", "3.8", "3.9","3.10.x","3.11.0-rc.2"] # Note: Wheels not needed for PyPy
# python-version: [ "3.7"]
timeout-minutes: 45
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, "3.10.x", "3.11.x","3.12"]
# revised from https://github.com/actions/cache/blob/main/examples.md#python---pip
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3
- name: set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cython
pip install PyRuSH==1.0.8 pytest

- name: nose tests
run: |
# ls /opt/hostedtoolcache/Python/3*/x64/lib/python*/site-packages/conf
python -c "import shutil;shutil.rmtree('PyRuSH')"
python -c "import shutil;shutil.rmtree('conf')"
ls
python --version
pytest
- uses: actions/checkout@v4
- name: Git clone repo and remove source code
run: |
pwd
ls

- name: Set up pip
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
'requirements/dev-requirements.txt'
- run: |
python --version
pip install --upgrade pip


- name: Install prereleased PyRuSH
if: ${{ github.event.inputs.install_prerelease == 'true' }}
run: |
# use this to avoid install prereleases of dependencies packages
pip install --pre PyRuSH
pip install -r dev-requirements.txt

- name: Install formal released medspacy
if: ${{ github.event.inputs.install_prerelease == 'false' }}
run: |
pip install -I PyRuSH


- name: tests
run: |
# ls /opt/hostedtoolcache/Python/3*/x64/lib/python*/site-packages/conf
pip install pytest
python -c "import shutil;shutil.rmtree('PyRuSH')"
# python -c "import shutil;shutil.rmtree('conf')"
ls
python --version
pytest



68 changes: 68 additions & 0 deletions .github/workflows/pip_old_install_unitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: pip_old_install_unitest
on:
workflow_dispatch:
inputs:
install_prerelease:
description: 'Check this to install the prerelease version of medspacy if available and the version is newer than formal release.'
type: boolean
required: false
default: false


jobs:

test:
# TODO: Do we care if this only runs on allowed branches since we check push/pull_request above?
# if: github.ref == 'refs/heads/master' OR github.ref == 'refs/heads/develop'
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-latest]
# python-version: [3.8]
python-version: [3.6,3.7]
# revised from https://github.com/actions/cache/blob/main/examples.md#python---pip
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Git clone repo and remove source code
run: |
pwd
ls

- name: Set up pip
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
'requirements/requirements.txt'
- run: |
python --version
pip install --upgrade pip


- name: Install prereleased PyRuSH
if: ${{ github.event.inputs.install_prerelease == 'true' }}
run: |
# use this to avoid install prereleases of dependencies packages
pip install -r requirements.txt
pip install --pre PyRuSH

- name: Install formal released medspacy
if: ${{ github.event.inputs.install_prerelease == 'false' }}
run: |
pip install PyRuSH


- name: tests
run: |
# ls /opt/hostedtoolcache/Python/3*/x64/lib/python*/site-packages/conf
pip install pytest
python -c "import shutil;shutil.rmtree('PyRuSH')"
python -c "import shutil;shutil.rmtree('conf')"
ls
python --version
pytest



24 changes: 12 additions & 12 deletions .github/workflows/run_pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,22 @@ jobs:
# Github Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
- [ ubuntu-20.04, ubuntu-20.04 ]
- [ macos-10.15, macosx_10 ]
- [ macos-11, macosx_11 ]
- [ macos-12, macosx_12 ]
- [ windows-2019, windows-2019 ]
- [ windows-2022, windows-2022 ]
- [ ubuntu-latest, ubuntu-latest ]
- [ macos-latest, macosx_latest ]
- [ windows-latest, windows-latest ]
# spacy doesn't compile win32
# python: ["cp36"] # Note: Wheels not needed for PyPy
python-version: [ "3.6", "3.7", "3.8", "3.9","3.10.x","3.11"] # Note: Wheels not needed for PyPy
python-version: [ "3.9","3.10.x","3.11.x", "3.12"] # Note: Wheels not needed for PyPy
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'dev-requirements.txt'

- name: Install dependencies
run: |
Expand All @@ -48,14 +47,15 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
pip install -U spacy==3.4.1
pip install -U setuptools

- name: pytests
run: |
python --version
python -c "import numpy;print(numpy.__version__)"
python setup.py build_ext --inplace
pip install ./
pytest tests




Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Wheel Builder
name: Build_Pub<3.9
on:
workflow_dispatch

Expand All @@ -18,29 +18,30 @@ jobs:
timeout-minutes: 50
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
fail-fast: true
matrix:
# Github Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
- [ubuntu-20.04, manylinux_x86_64]
- [ubuntu-20.04, musllinux_x86_64]
- [macos-10.15, macosx_*]
- [windows-2019, win_amd64]
- [macos-12, macosx_*]
- [windows-2022, win_amd64]
# - [windows-2019, win32]
# spacy doesn't compile win32
# python: ["cp37"] # Note: Wheels not needed for PyPy
python: ["cp36", "cp37", "cp38", "cp39", "cp310","cp311"] # Note: Wheels not needed for PyPy
# cp37 not working with manylinux_x86_64 somehow
python: ["cp36", "cp38"] # Note: Wheels not needed for PyPy
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.1
uses: pypa/cibuildwheel@v2.21.3
env:
# TODO: Build Cython with the compile-all flag?
# Unfortunately, there is no way to modify cibuildwheel's build command
Expand All @@ -50,59 +51,35 @@ jobs:
CIBW_BEFORE_BUILD: pip install -r requirements.txt
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_ENVIRONMENT: CFLAGS='-O3 -g0 -mtune=generic -pipe -fPIC' LDFLAGS='-fPIC'
CIBW_BEFORE_TEST: pip install pytest
CIBW_BEFORE_TEST: pip install -r dev-requirements.txt
CIBW_TEST_COMMAND: pytest {package}/tests

- name: check build
run: |
ls -l wheelhouse


- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
path: ./wheelhouse/*.whl



build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- name: Checkout quicksectx
uses: actions/checkout@v3
# Used to push the built wheels
- uses: actions/setup-python@v3
with:
# Build sdist on lowest supported Python
python-version: '3.6'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Build sdist
run: |
python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: sdist
path: ./dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
needs: [build_wheels]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install twine

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: dist

Expand Down
Loading