Skip to content

Commit

Permalink
README helper
Browse files Browse the repository at this point in the history
  • Loading branch information
erewok committed Aug 30, 2024
1 parent 1f99e21 commit 2e02f84
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ jobs:
- name: "Run install deps"
run: "just bootstrap"
- name: "Build and release"
run: |
poetry build
uv run python -m twine check dist/*
uv run python -m twine upload dist/*
run: "just release"
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is an **async fork** of the library [simple-salesforce](https://github.com/
This fork is available on PyPI and can be installed like this:

```sh
$ pip install "async-simple-salesforce==1.12.6a1"
$ pip install "async-simple-salesforce==1.12.6a2"

```

Expand Down Expand Up @@ -53,4 +53,25 @@ async def run_query(sf_client, opportunity_name: str):

You can typically call *any* method available on the synchronous `Salesforce` object as an async method with an `await` added.

See upstream docs continued [here](./README.rst).
See upstream docs continued [here](./README.rst).

## How to Contribute

This project uses `uv` to manage dependencies. In addition, a `justfile` has been provided to aid contributors. If you have `uv` and `just` in your environment, you can get started with `just bootstrap`. You can run the test suite with `just test` and code quality checks with `just test`. For more common recipes, run `just`:

```sh
❯ just
just --list
Available recipes:
bootstrap # Create a virtual environment and install dependencies
build *args # Build the project as a package
check # Run code quality checks
check-types # Run mypy checks
ci-test coverage_dir='./coverage' # Run all tests locally
format # Run the formatter (`ruff`)
lock # Update the lock file
release # Release this project to PyPI
sync *args # Make sure all dependencies are up to date in env
test *args # Run all tests locally

```
12 changes: 8 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,30 @@
_default:
just --list

# Install cargo plugins used by this project
# Create a virtual environment and install dependencies
bootstrap:
uv venv --python 3.12

# Build the project as a package (poetry build)
# Build the project as a package
build *args:
uv run python -m build {{args}}

# Update the lock file
lock:
uv lock

update *args:
# Make sure all dependencies are up to date in env
sync *args:
uv sync {{args}}

# Release this project to PyPI
release:
#!/bin/bash -eux
uv run python -m build
uv run python -m twine check dist/*
uv run python -m twine upload dist/*

# Run the formatter (`ruff`)
format:
uv run ruff format simple_salesforce tests

Expand All @@ -31,7 +35,7 @@ check:
#!/bin/bash -eux
uv run ruff check simple_salesforce tests

# Run code quality checks
# Run mypy checks
check-types:
#!/bin/bash -eux
uv run mypy simple_salesforce
Expand Down

0 comments on commit 2e02f84

Please sign in to comment.