Skip to content

Commit

Permalink
Bump version to 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sysid committed Sep 9, 2024
1 parent 899222a commit a1d9bdb
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 51 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.1.1
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "vimania_uri_rs"
version = "1.1.0"
version = "1.1.1"
description = "Add your description here"
authors = [
{ name = "sysid", email = "[email protected]" }
Expand All @@ -10,7 +10,6 @@ requires-python = ">= 3.8"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
]
Expand All @@ -25,7 +24,7 @@ build-backend = "maturin"
[tool.uv]
managed = true
dev-dependencies = [
"maturin-import-hook>=1.1.0",
"maturin-import-hook>=1.1.1",
"pip>=24.2",
"pytest>=8.3.2",
"pytest-mock>=3.14.0",
Expand All @@ -41,7 +40,7 @@ allow-direct-references = true
packages = ["py"]

[tool.bumpversion]
current_version = "1.1.0"
current_version = "1.1.1"
commit = true
tag = false
message = "Bump version to {new_version}"
Expand Down
5 changes: 2 additions & 3 deletions tests/run_manual_test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env bash
# Use this to have clean environment for building vader tests
# Usage:
# run_manual.sh todo.md -> :VimaniaHandleTodos
#

cp -v data/vader.db.source data/vader.db

if [ -z "$1" ]; then
echo "-E- no testfiles given."
echo "runall: $0 '*'"
Expand All @@ -16,7 +15,6 @@ filetype off
set rtp+=~/.vim/plugged/vader.vim
set rtp+=~/.vim/plugged/vim-misc
set rtp+=~/.vim/plugged/scriptease
set rtp+=~/.vim/plugged/vim-textobj-user
set rtp+=~/dev/vim/tw-vim
set rtp+=~/dev/vim/vimania-uri-rs
filetype plugin indent on
Expand All @@ -26,6 +24,7 @@ syntax enable
let g:vimania_uri_twbm_integration=1
" URI extensions
let g:vimania_uri_extensions=['.md', '.txt', '.py']
let g:vimania_uri_twbm_integration=1
let g:twvim_debug = 1
let g:os = 'Darwin'
Expand Down
45 changes: 14 additions & 31 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,21 @@
set +ex
#vim '+Vader!*' && echo Success || echo Failure' && echo Success || echo Failure

source ~/dev/binx/profile/sane_fn.sh

prep-db() {
echo "-M- Creating vader DB: $(pwd)"
twpushd "$PROJ_DIR/pythonx/vimania_uri_/db"
[[ -f todos.db ]] && rm -v todos.db
alembic upgrade head
readlink -f todos.db
cp -v todos.db "$PROJ_DIR/tests/data/vader.db"
twpopd
_RESET="\e[0m"
_RED="\e[91m"
_GREEN="\e[92m"
_YELLOW="\e[93m"
_CYAN="\e[96m"

Red () {
printf "${_RED}%s${_RESET}\n" "$@"
}

prep-twbm() {
echo "-M- Looking for test google entry in twbm to delete if necessary."
id=$(TWBM_DB_URL=sqlite://///Users/Q187392/vimwiki/buku/bm.db twbm search -t vimania --np '"www.google.com"')
if [ ! -z "$id" ]; then
Cyan "-M- Deleting test google entry in twbm"
TWBM_DB_URL=sqlite://///Users/Q187392/vimwiki/buku/bm.db twbm delete "$id"
else
Green "-M- google test entry not found. All good."
fi
Green () {
printf "${_GREEN}%s${_RESET}\n" "$@"
}
Cyan () {
printf "${_CYAN}%s${_RESET}\n" "$@"
}

#cp -v data/todos.db.empty data/vader.db

if [ -z "$1" ]; then
echo "-E- no testfiles given."
Expand All @@ -36,9 +27,6 @@ fi
################################################################################
# main
################################################################################
#prep-db # no DB required
#prep-twbm

vim -Nu <(cat << EOF
filetype off
set rtp+=~/.vim/plugged/vader.vim
Expand All @@ -53,17 +41,12 @@ syntax enable
let g:vimania_uri_twbm_integration=1
" URI extensions
let g:vimania_uri_extensions=['.md', '.txt', '.py']
let g:vimania_uri_twbm_integration=1
let g:twvim_debug = 1
let g:os = 'Darwin'
if g:twvim_debug | echom "-D- Debugging is activated." | endif
" required by tw-vim
let g:twvim_config = {
\ 'diary_path': '/Users/Q187392/vimwiki/diary',
\ }
" to avoid prompting
set shortmess+=at
"set cmdheight=200
Expand Down
8 changes: 8 additions & 0 deletions tests/test_example.vader
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ Execute (delete bufer):
Execute (set filetype):
setf python
AssertEqual 'python', &filetype

Execute (confirm):
let choice = confirm("Do you want to continue?", "&Yes\n&No", 1)
AssertEqual choice, 1

Execute (input):
let choice = input("Do you want to continue? (y/n): ")
AssertEqual choice, "y"
27 changes: 15 additions & 12 deletions tests/test_vimania_uri.vader
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,21 @@ Then ():
Assert len(getqflist()) >= 1

# GOTCHA: yes prompt not working
#Given markdown (should delete non existing entry in twbm):
# wiht a [url](http://www.vimania.tw) some more text
#Do (delete line):
# ddy\<Enter>
#Then ():
# Log printf("Current Line: %s", getline('.'))
# Assert 1 == line('$')
# Assert "" == getline('.')
# Messages
# Cfilter filter deleted twbm: 0
# Log printf("Len of quickfix list: %s", len(getqflist()))
# Assert len(getqflist()) == 1
Given markdown ():
Execute (delete URL, answer with 'y'):
VimaniaDeleteTwbm("wiht a [url](http://www.vimania.tw) some more text")
Then ():
# echom "Test message to ensure capture"
Messages
" Retrieve the content of the quickfix list
let qflist = getqflist()
" Convert the quickfix list to a string
let qflog = join(map(qflist, 'v:val.text'), "\n")
" Log the quickfix list content
Log qflog
Cfilter deleted twbm: 0
Log printf("Len of quickfix list: %s", len(getqflist()))
Assert len(getqflist()) == 1

Given markdown (with TOC anchors):
[Scond Heading](#second-heading)
Expand Down

0 comments on commit a1d9bdb

Please sign in to comment.