Skip to content

Commit

Permalink
Update dependencies and python version (#93)
Browse files Browse the repository at this point in the history
The purpose of this PR was to address issue #87. A user tried to use the
package and fell into some dependency issues which should be fixed by
making more dependencies required, and updating to python version 3.11.

I also updated the TWINE_USERNAME and TWINE_PASSWORD to use the new api
token format suggested by PyPi. username/password is no longer
supported.
  • Loading branch information
sentilesdal authored Jan 18, 2024
1 parent 729bc24 commit b5ff593
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TWINE_USERNAME=pypi_username
TWINE_PASSWORD=pypi_password
TWINE_USERNAME=__token__
TWINE_PASSWORD=YOUR_PYPI_API_TOKEN
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ jobs:
- name: set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: "pip"
token: ${{github.token}}

- name: upgrade pip
run: python -m pip install --upgrade pip

- name: install requirements
# include toml because a file in scripts/ needs it.
run: |
python -m pip install --upgrade .[all]
python -m pip install --upgrade .[test] && python -m pip install toml
- name: run black
run: python -m black --config pyproject.toml --check --diff .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: "pip"
token: ${{github.token}}

Expand All @@ -27,7 +27,7 @@ jobs:

- name: install requirements
run: |
python -m pip install --upgrade .[all]
python -m pip install --upgrade .[test]
- name: get all Python files
id: list_files
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: "pip"
token: ${{github.token}}

Expand All @@ -27,7 +27,7 @@ jobs:

- name: install requirements
run: |
python -m pip install --upgrade .[all]
python -m pip install --upgrade .[test]
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ For development install instructions, see toplevel [INSTALL.md](https://github.c

## Packages 📦

| Package Name | Version | Description |
| ------------ | ---------------------------------------------------------------------------------------- | ------------------------------------------------ |
| pypechain | [![](https://img.shields.io/pypi/v/pypechain.svg)](<(https://pypi.org/pypi/pypechain/)>) | Codegen python interfaces for web3.py contracts. |
| flit | [![](https://img.shields.io/pypi/v/flit.svg)](<(https://pypi.org/pypi/flit/)>) | A simple packaging tool for simple packages. |
| black | [![](https://img.shields.io/pypi/v/black.svg)](<(https://pypi.org/pypi/black/)>) | The uncompromising code formatter. |
| jinja2 | [![](https://img.shields.io/pypi/v/jinja2.svg)](<(https://pypi.org/pypi/jinja2/)>) | A very fast and expressive template engine. |
| web3 | [![](https://img.shields.io/pypi/v/web3.svg)](<(https://pypi.org/pypi/web3/)>) | web3.py |

| Package Name | Version | Description |
|--------------|---------|-------------|
| pypechain | [![](https://img.shields.io/pypi/v/pypechain.svg)]((https://pypi.org/pypi/pypechain/)) | Codegen python interfaces for web3.py contracts. |
| autoflake | [![](https://img.shields.io/pypi/v/autoflake.svg)]((https://pypi.org/pypi/autoflake/)) | Removes unused imports and unused variables |
| black | [![](https://img.shields.io/pypi/v/black.svg)]((https://pypi.org/pypi/black/)) | The uncompromising code formatter. |
| isort | [![](https://img.shields.io/pypi/v/isort.svg)]((https://pypi.org/pypi/isort/)) | A Python utility / library to sort Python imports. |
| jinja2 | [![](https://img.shields.io/pypi/v/jinja2.svg)]((https://pypi.org/pypi/jinja2/)) | A very fast and expressive template engine. |
| web3 | [![](https://img.shields.io/pypi/v/web3.svg)]((https://pypi.org/pypi/web3/)) | web3.py |
## Usage

Pypechain is primarily to be used via the CLI:
Expand Down
20 changes: 9 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]

name = "pypechain"
version = "0.0.21"
version = "0.0.23"
authors = [
{ name = "Matthew Brown", email = "[email protected]" },
{ name = "Dylan Paiton", email = "[email protected]" },
Expand All @@ -10,31 +10,29 @@ authors = [
]
description = "Codegen python interfaces for web3.py contracts."
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
dependencies = ["flit", "black", "jinja2", "web3"]
dependencies = ["autoflake", "black", "isort", "jinja2", "web3"]

[project.scripts]
pypechain = "pypechain.main:main"

[project.optional-dependencies]
# This flag installs all dependencies and should be ran when installing this package
all = ["pypechain[base,build,test]"]
base = ["black", "isort", "jinja2", "web3", "autoflake"]
build = ["build", "setuptools", "wheel", "twine", "toml"]
all = ["pypechain[test,build]"]
test = [
"pytest",
"pytest-snapshot",
"pyright",
"pylint",
"coverage",
"isort",
"factory-boy",
"pylint",
"pyright",
"pytest",
"pytest-snapshot",
]
build = ["build", "flit", "request", "setuptools", "toml", "twine", "wheel"]

[project.urls]
"Homepage" = "https://github.com/delvtech/pypechain"
Expand Down

0 comments on commit b5ff593

Please sign in to comment.