Skip to content

Commit

Permalink
fix: move abi to src dir vs root | patch bump
Browse files Browse the repository at this point in the history
  • Loading branch information
dtbuchholz committed Apr 4, 2024
1 parent fae4692 commit 947f365
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ poetry poe test
poetry poe coverage
# Or
poetry run pytest

# Build the package
poetry build
```

> Note: if you're using a Mac M1/M2 and the default poetry settings, you _might_ run into issues with respect to the Python virtual environment's cache directory defined in the global poetry configuration. Check the path by running `poetry config --list` and looking at the `cache-dir` value. If that's the case, running `poetry config cache-dir "$HOME/.local/share/virtualenvs"` should fix it (i.e., the previous value is `$HOME/Library/Caches/pypoetry`). Alternatively, setting the `virtualenvs.in-project` config to `true` will use a local `.venv` instead.
Expand All @@ -160,4 +163,4 @@ This package was created with Cookiecutter and the [sourcery.ai](https://github.

## License

MIT AND Apache-2.0, © 2021-2024 Textile Contributors
MIT AND Apache-2.0, © 2021-2024 Tableland Network Contributors
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
[tool.poetry]
name = "tableland"
version = "0.0.1-pre.0"
version = "0.0.2"
description = "A minimal Tableland Python SDK for creating, writing, and reading onchain tables"
authors = ["Dan Buchholz <[email protected]>"]
license = "MIT AND Apache-2.0"
readme = "README.md"
packages = [
{ include = "abi.json" },
{ include = "tableland" },
]

[tool.poetry.dependencies]
python = "^3.11"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tableland/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
self.w3 = Web3(Web3.HTTPProvider(provider_uri))
self.signer = Account.from_key(private_key)
# Set up Tableland registry contract and validator base URI
abi_file = Path(__file__).parent.parent / "abi.json"
abi_file = Path(__file__).parent / "abi.json"
abi = read_file_to_json(abi_file)
registry_addr = get_registry_address(self.w3.eth.chain_id)
self.registry = self.w3.eth.contract(
Expand Down

0 comments on commit 947f365

Please sign in to comment.