Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
- name: Set up uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: 3.12
- name: Build Release
run: pdm build
run: uv build
env:
PDM_BUILD_SCM_VERSION: ${{ inputs.versionNumber }}
- name: Publish Release
run: pdm publish --no-build
run: uv publish
- name: Create GitHub Release
run: gh release create v${{inputs.versionNumber}} --latest --generate-notes dist/*
6 changes: 4 additions & 2 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Install dependencies
run: |
pdm install -dG test
uv sync --group test
- name: Run Testing
run: |
pdm run -v testing-slow
uv run -v pytest local/tests --runslow
22 changes: 11 additions & 11 deletions .github/workflows/test_lint_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,47 @@ jobs:

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
- name: Set up uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pdm install -dG :all
uv sync --group test
- name: Run Testing
run: |
pdm run -v testing
uv run -v pytest local/tests

lint:
name: Linting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
- name: Set up uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: 3.12
- name: Install dependencies
run: |
pdm install -dG :all --no-self
uv sync --group tox
- name: Run Linting
run: |
pdm run -v lint-full
uv run -v tox r -e check

scan:
name: Scanning
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
- name: Set up uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: 3.12
- name: Install dependencies
run: |
pdm install -dG :all --no-self
uv sync --all-groups --no-install-project
- name: Initialize Runtime Code Analysis
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ ipython_config.py
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version
.pdm.toml

# Environments
.env
Expand Down Expand Up @@ -126,5 +125,4 @@ dmypy.json
cython_debug/

.idea/
.pdm-python
/.github/local_runner/
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ don't already cover your question or contribution.

## Installation

We recommend using [`pdm`](https://pdm.fming.dev/latest/)
We recommend using [`uv`](https://docs.astral.sh/uv/)
to isolate dependencies for development and reuse existing workflows.
This guide assumes that you have already installed `pdm`.
This guide assumes that you have already installed `uv`.

Clone the repository (alternatively, if you plan on making a pull request and
are not in the cuid2.py organisation, use the [GitHub page](https://github.com/gordon-code/cuid2)
Expand All @@ -23,7 +23,7 @@ $ cd cuid2

Ensure that you have installed the package and development dependencies:
```bash
$ pdm install
$ uv sync
```

And finally create a separate branch to begin work
Expand All @@ -35,15 +35,16 @@ $ git checkout -b my-new-feature

We rely on a number of formatters, linters, and tests to ensure that
the codebase is consistent and free from regressions. Running with
`pdm run lint-fast` enables quick updates to files during development.
`uv run ruff check --fix src/ local/tests/ && uv run ruff format src/ local/tests/`
enables quick updates to files during development.

Prior to committing, we encourage running the following commands in
order for your pull request to be accepted:
```bash
$ pdm run tox
$ uv run tox p
```

The GitHub Action will _also_ run `pdm run testing-slow` to catch any
The GitHub Action will _also_ run `uv run pytest local/tests --runslow` to catch any
collision regressions. You may also run it locally. The test takes
approximately 40 minutes.

Expand Down
Loading
Loading