Skip to content

Commit 58afc45

Browse files
authored
chore: run prettier on everything (#868)
1 parent a18dfaa commit 58afc45

32 files changed

+4006
-4146
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: 2
22
updates:
3-
- package-ecosystem: pip
4-
directory: "/"
5-
schedule:
6-
interval: monthly
7-
time: "15:00"
8-
open-pull-requests-limit: 10
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
time: "15:00"
8+
open-pull-requests-limit: 10

.github/workflows/faucet_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ jobs:
4949

5050
- name: Run Faucet tests
5151
run: poetry run poe test_faucet
52-

.github/workflows/publish_to_pypi.yml

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,106 +2,106 @@ name: Publish xrpl-py 🐍 distribution 📦 to PyPI
22
on:
33
push:
44
tags:
5-
- '*'
5+
- "*"
66

77
jobs:
88
build:
99
name: Build distribution 📦
1010
runs-on: ubuntu-latest
1111
env:
12-
POETRY_VERSION: 2.1.1
12+
POETRY_VERSION: 2.1.1
1313

1414
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up Python
17-
uses: actions/setup-python@v5
18-
with:
19-
# Use the lowest supported version of Python for CI/CD
20-
python-version: "3.8"
21-
- name: Load cached .local
22-
id: cache-poetry
23-
uses: actions/cache@v3
24-
with:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
# Use the lowest supported version of Python for CI/CD
20+
python-version: "3.8"
21+
- name: Load cached .local
22+
id: cache-poetry
23+
uses: actions/cache@v3
24+
with:
2525
path: /home/runner/.local
2626
key: dotlocal-${{ env.POETRY_VERSION }}-${{ hashFiles('poetry.lock') }}
27-
- name: Install poetry
28-
if: steps.cache-poetry.outputs.cache-hit != 'true'
29-
run: |
30-
curl -sSL "https://install.python-poetry.org/" | python - --version "${{ env.POETRY_VERSION }}"
31-
echo "${HOME}/.local/bin" >> $GITHUB_PATH
32-
poetry --version || exit 1 # Verify installation
33-
- name: Build a binary wheel and a source tarball
34-
run: poetry build
35-
- name: Store the distribution packages
36-
uses: actions/upload-artifact@v4
37-
with:
38-
name: python-package-distributions
39-
path: dist/
27+
- name: Install poetry
28+
if: steps.cache-poetry.outputs.cache-hit != 'true'
29+
run: |
30+
curl -sSL "https://install.python-poetry.org/" | python - --version "${{ env.POETRY_VERSION }}"
31+
echo "${HOME}/.local/bin" >> $GITHUB_PATH
32+
poetry --version || exit 1 # Verify installation
33+
- name: Build a binary wheel and a source tarball
34+
run: poetry build
35+
- name: Store the distribution packages
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: python-package-distributions
39+
path: dist/
4040
publish-to-pypi:
4141
name: >-
42-
Publish Python 🐍 distribution 📦 to PyPI
43-
needs: build # Explicit dependency on build job
42+
Publish Python 🐍 distribution 📦 to PyPI
43+
needs: build # Explicit dependency on build job
4444
runs-on: ubuntu-latest
45-
timeout-minutes: 10 # Adjust based on typical publishing time
45+
timeout-minutes: 10 # Adjust based on typical publishing time
4646
permissions:
47-
# More information about Trusted Publishing and OpenID Connect: https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
48-
id-token: write # IMPORTANT: mandatory for trusted publishing
47+
# More information about Trusted Publishing and OpenID Connect: https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
48+
id-token: write # IMPORTANT: mandatory for trusted publishing
4949
steps:
50-
- name: Download all the dists
51-
uses: actions/download-artifact@v4
52-
with:
53-
name: python-package-distributions
54-
path: dist/
55-
- name: Verify downloaded artifacts
56-
run: |
57-
ls dist/*.whl dist/*.tar.gz || exit 1
58-
- name: Publish distribution 📦 to PyPI
59-
uses: pypa/gh-action-pypi-publish@release/v1
60-
with:
61-
verbose: true
62-
verify-metadata: true
50+
- name: Download all the dists
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: python-package-distributions
54+
path: dist/
55+
- name: Verify downloaded artifacts
56+
run: |
57+
ls dist/*.whl dist/*.tar.gz || exit 1
58+
- name: Publish distribution 📦 to PyPI
59+
uses: pypa/gh-action-pypi-publish@release/v1
60+
with:
61+
verbose: true
62+
verify-metadata: true
6363

6464
github-release:
6565
name: >-
66-
Sign the Python 🐍 distribution 📦 with Sigstore
67-
and upload them to GitHub Release
66+
Sign the Python 🐍 distribution 📦 with Sigstore
67+
and upload them to GitHub Release
6868
needs:
69-
- publish-to-pypi
69+
- publish-to-pypi
7070
runs-on: ubuntu-latest
71-
timeout-minutes: 15 # Adjust based on typical signing and release time
71+
timeout-minutes: 15 # Adjust based on typical signing and release time
7272

7373
permissions:
74-
contents: write # IMPORTANT: mandatory for making GitHub Releases
75-
id-token: write # IMPORTANT: mandatory for sigstore
74+
contents: write # IMPORTANT: mandatory for making GitHub Releases
75+
id-token: write # IMPORTANT: mandatory for sigstore
7676

7777
steps:
78-
- name: Download all the dists
79-
uses: actions/download-artifact@v4
80-
with:
81-
name: python-package-distributions
82-
path: dist/
83-
- name: Sign the dists with Sigstore
84-
uses: sigstore/gh-action-sigstore-python@v2.1.1
85-
with:
86-
inputs: >-
78+
- name: Download all the dists
79+
uses: actions/download-artifact@v4
80+
with:
81+
name: python-package-distributions
82+
path: dist/
83+
- name: Sign the dists with Sigstore
84+
uses: sigstore/gh-action-sigstore-python@v2.1.1
85+
with:
86+
inputs: >-
8787
./dist/*.tar.gz
8888
./dist/*.whl
89-
- name: Create GitHub Release
90-
env:
91-
GITHUB_TOKEN: ${{ github.token }}
92-
run: >-
93-
gh release create
94-
'${{ github.ref_name }}'
95-
--repo '${{ github.repository }}'
96-
--generate-notes ||
97-
(echo "::error::Failed to create release" && exit 1)
98-
- name: Upload artifact signatures to GitHub Release
99-
env:
100-
GITHUB_TOKEN: ${{ github.token }}
101-
# Upload to GitHub Release using the `gh` CLI.
102-
# `dist/` contains the built packages, and the
103-
# sigstore-produced signatures and certificates.
104-
run: >-
105-
gh release upload
106-
'${{ github.ref_name }}' dist/**
107-
--repo '${{ github.repository }}'
89+
- name: Create GitHub Release
90+
env:
91+
GITHUB_TOKEN: ${{ github.token }}
92+
run: >-
93+
gh release create
94+
'${{ github.ref_name }}'
95+
--repo '${{ github.repository }}'
96+
--generate-notes ||
97+
(echo "::error::Failed to create release" && exit 1)
98+
- name: Upload artifact signatures to GitHub Release
99+
env:
100+
GITHUB_TOKEN: ${{ github.token }}
101+
# Upload to GitHub Release using the `gh` CLI.
102+
# `dist/` contains the built packages, and the
103+
# sigstore-produced signatures and certificates.
104+
run: >-
105+
gh release upload
106+
'${{ github.ref_name }}' dist/**
107+
--repo '${{ github.repository }}'

.vscode/settings.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131
"source.organizeImports": "always"
3232
}
3333
},
34-
"isort.args": [
35-
"--profile",
36-
"black"
37-
],
34+
"isort.args": ["--profile", "black"],
3835
"python.testing.pytestEnabled": false,
3936
"python.testing.unittestEnabled": true
4037
}

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [[Unreleased]]
99

1010
### Fixed
11+
1112
- Removed snippets files from the xrpl-py code repository. Updated the README file to point to the correct location on XRPL.org.
1213

1314
## [[4.3.0]] - 2025-07-29
1415

1516
### Added
17+
1618
- Support for `Token Escrow` (XLS-85d)
1719
- Support for `NFTokenMintOffer` (XLS-52)
1820
- Support for `Permissioned DEX` (XLS-81)
1921
- Add warning messages to `MPTokenIssuanceCreate` and `VaultCreate` transaction as per [XLS-89d](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0089d-multi-purpose-token-metadata-schema).
2022

21-
2223
## [4.2.0] - 2025-6-09
2324

2425
### Added
26+
2527
- Improved validation for models to also check param types
2628
- Support for `Single Asset Vault` (XLS-65d)
2729
- Support for `Account Permission` and `Account Permission Delegation` (XLS-74d, XLS-75d)
2830
- Support for the `Batch` amendment (XLS-56d)
2931

3032
### Fixed
33+
3134
- Add `MPTCurrency` support in `Issue` (rippled internal type)
3235
- Fix the implementation error in get_latest_open_ledger_sequence method. The change uses the "current" ledger for extracting sequence number
3336
- Increase default maximum payload size for websocket client
@@ -45,11 +48,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4548
### Added
4649

4750
- Support for `Deep Freeze` (XLS-77d)
48-
- Support for `PermissionedDomains` (XLS-80)
51+
- Support for `PermissionedDomains` (XLS-80)
4952
- Support `AMMClawback` amendment (XLS-73d)
5053
- Support for the `simulate` RPC ([XLS-69](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0069d-simulate))
5154

5255
### Fixed
56+
5357
- `Sign`, `SignFor`, and `SignAndSubmit` methods now properly handle WebSocket clients
5458

5559
## [4.0.0] - 2024-12-23
@@ -96,7 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
96100
- Add `nfts_by_issuer` clio-only API definition
97101
- Included `ctid` field in the `tx` request.
98102
- `from_xrpl` method accepts input dictionary keys exclusively in the proper XRPL format.
99-
- Support for DynamicNFT amendment (XLS-46)
103+
- Support for DynamicNFT amendment (XLS-46)
100104

101105
### Fixed
102106

CONTRIBUTING.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@ docker run -dit -p 5005:5005 -p 6006:6006 --volume $PWD/.ci-config/:/etc/opt/rip
9494
```
9595

9696
Breaking down the command:
97-
* `docker run -p 5005:5005 -p 6006:6006` starts a Docker container with an open port for admin JsonRPC and WebSocket requests.
98-
* `-it` allows you to interact with the container.
99-
* `-d` runs the docker container in detached mode. The container will run in the background and developer gets back control of the terminal
100-
* `-t` starts a terminal in the container for you to send commands to.
101-
* `--volume $PWD/.ci-config:/etc/opt/ripple/` mounts the directories as indicated. It must be an absolute path, so we use `$PWD` instead of `./`. `rippled` software searches the location `/etc/opt/ripple/` (default behavior) for the config files. Hence there is no need to explicitly specify the config-file path.
102-
* `rippleci/rippled:develop` is an image that is regularly updated with the latest build of the `develop` branch of `rippled`.
103-
* `-a` starts `rippled` in standalone mode
97+
98+
- `docker run -p 5005:5005 -p 6006:6006` starts a Docker container with an open port for admin JsonRPC and WebSocket requests.
99+
- `-it` allows you to interact with the container.
100+
- `-d` runs the docker container in detached mode. The container will run in the background and developer gets back control of the terminal
101+
- `-t` starts a terminal in the container for you to send commands to.
102+
- `--volume $PWD/.ci-config:/etc/opt/ripple/` mounts the directories as indicated. It must be an absolute path, so we use `$PWD` instead of `./`. `rippled` software searches the location `/etc/opt/ripple/` (default behavior) for the config files. Hence there is no need to explicitly specify the config-file path.
103+
- `rippleci/rippled:develop` is an image that is regularly updated with the latest build of the `develop` branch of `rippled`.
104+
- `-a` starts `rippled` in standalone mode
104105

105106
Then to actually run the tests, run the command:
106107

@@ -166,6 +167,7 @@ open index.html
166167
You can view docs builds for xrpl-py versions on the ReadTheDocs website here: https://readthedocs.org/projects/xrpl-py/builds/
167168

168169
In order to test how a change in docs configuration looks like on ReadTheDocs before merging:
170+
169171
1. Publish a branch with your docs configuration changes
170172
2. Active and hide the branch by scrolling down on this page: https://readthedocs.org/projects/xrpl-py/versions/
171173
3. View the page / build results here: https://readthedocs.org/projects/xrpl-py/builds/
@@ -188,13 +190,15 @@ Examples can be found in subfolders of [tests/integrations](https://github.com/X
188190
## Updating `definitions.json` and models
189191

190192
To update just the `definitions.json` file:
193+
191194
```bash
192195
poetry run poe definitions https://github.com/XRPLF/rippled/tree/develop
193196
```
194197

195198
Any Github branch link or local path to rippled will work here.
196199

197200
To update the models as well:
201+
198202
```bash
199203
poetry run poe generate https://github.com/XRPLF/rippled/tree/develop
200204
```
@@ -213,18 +217,19 @@ Verify that the changes make sense by inspection before submitting, as there may
213217
- Merge your changes.
214218

215219
### Release
220+
216221
1. Please increment the version in `pyproject.toml` and update the `CHANGELOG.md` file appropriately. We follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
217222
2. Please select a commit that is suitable for release and create a tag. The following commands can be helpful:
218-
`git tag -s -a <tag-title> -m "Optional Message describing the tag"`
219-
`git tag` -- This command displays all the tags in the repository.
220-
`git push <remote_name, e.g. upstream> tag <tag_title>`
223+
`git tag -s -a <tag-title> -m "Optional Message describing the tag"`
224+
`git tag` -- This command displays all the tags in the repository.
225+
`git push <remote_name, e.g. upstream> tag <tag_title>`
221226
3. A [Github Workflow](.github/workflows/publish_to_pypi.yml) completes the rest of the Release steps (building the project, generating a .whl and tarball, publishing on the PyPI platform). The workflow uses OpenID Connect's temporary keys to obtain the necessary PyPI authorization.
222-
As a prerequisite, the PyPI `xrpl-py` project needs to authorize Github Actions as a "Trusted Publisher". This page contains helpful resources: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#configuring-trusted-publishing
227+
As a prerequisite, the PyPI `xrpl-py` project needs to authorize Github Actions as a "Trusted Publisher". This page contains helpful resources: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#configuring-trusted-publishing
223228
4. Send an email to [xrpl-announce](https://groups.google.com/g/xrpl-announce).
224229
5. Post an announcement in the [XRPL Discord #python channel](https://discord.com/channels/886050993802985492/886053080913821717) with a link to the changes and highlighting key changes.
225230

226-
227231
**Note: If maintainers prefer to manually release the xrpl-py software distribution, the below steps are relevant.**
232+
228233
1. Create a branch off main that properly increments the version in `pyproject.toml` and updates the `CHANGELOG` appropriately. We follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
229234
2. Merge this branch into `main`.
230235
3. Locally build and download the package.

0 commit comments

Comments
 (0)