-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from rwanyoike/prep-v0.7.0
feat: bump version 0.6.x -> 0.7.0
- Loading branch information
Showing
16 changed files
with
792 additions
and
1,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
[*.py] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout ${{ github.repository }} | ||
uses: actions/checkout@v4 | ||
- name: Install poetry using pipx | ||
run: | | ||
pipx install poetry==1.8.3 | ||
poetry config virtualenvs.in-project true | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run Ruff checks | ||
run: | | ||
poetry run ruff check --select I | ||
poetry run ruff format --check | ||
- name: Test with pytest | ||
run: poetry run pytest --cov=time2relax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
__pycache__/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
*.egg-info/ | ||
.ruff_cache/ | ||
.venv/ | ||
dist/ | ||
htmlcov/ | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
[tool.poetry] | ||
name = "time2relax" | ||
version = "0.6.0" | ||
version = "0.7.0" | ||
description = "A CouchDB driver for Python." | ||
license = "MIT" | ||
authors = ["Raymond Wanyoike <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
repository = "https://github.com/rwanyoike/time2relax" | ||
repository = "https://github.com/rwanyoike/time2relax-python-driver" | ||
documentation = "https://github.com/rwanyoike/time2relax-python-driver/tree/main/docs" | ||
packages = [{ include = "time2relax", from = "src" }] | ||
include = ["HISTORY.md"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.6" | ||
requests = "^2.22" | ||
python = "^3.8" | ||
requests = "^2.32.3" | ||
|
||
[tool.poetry.dev-dependencies] | ||
black = "^19.10b0" | ||
isort = "^4.3.21" | ||
prospector = "^1.2.0" | ||
pytest = "^5.3.4" | ||
pytest-cov = "^2.8.1" | ||
pytest-mock = "^1.11" | ||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^8.3.3" | ||
pytest-cov = "^5.0.0" | ||
pytest-mock = "^3.14.0" | ||
ruff = "^0.6.9" | ||
|
||
[build-system] | ||
requires = ["poetry>=0.12"] | ||
build-backend = "poetry.masonry.api" | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,20 @@ | |
|
||
|
||
def test_couchdb(): | ||
db = CouchDB('https://u:[email protected]/a/b/index.html?e=f', create_db=False) | ||
assert db.host == 'https://u:[email protected]' | ||
assert db.name == 'index.html' | ||
assert db.url == 'https://u:[email protected]/index.html' | ||
db = CouchDB("https://u:[email protected]/a/b/index.html?e=f", create_db=False) | ||
assert db.host == "https://u:[email protected]" | ||
assert db.name == "index.html" | ||
assert db.url == "https://u:[email protected]/index.html" | ||
assert db.create_db is False | ||
assert db.session.headers['Accept'] == 'application/json' | ||
assert db.session.headers["Accept"] == "application/json" | ||
|
||
# Test default create_db value and __repr__ | ||
db = CouchDB('http://couchdb:5984/foobar') | ||
db = CouchDB("http://couchdb:5984/foobar") | ||
assert db.create_db is True | ||
assert repr(db) == '<CouchDB [{}]>'.format(db.url) | ||
assert repr(db) == f"<CouchDB [{db.url}]>" | ||
|
||
|
||
def test_couchdb_raise_exception(): | ||
for url in ['', 'http://', 'http://user:pass']: | ||
for url in ["", "http://", "http://user:pass"]: | ||
with pytest.raises(RequestException): | ||
CouchDB(url) |
Oops, something went wrong.