-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
3,057 additions
and
3,660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build and publish to PyPI | ||
uses: JRubics/[email protected] | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
- name: Build and Publish Package to PYPI | ||
run: | | ||
uv build | ||
uv publish --token ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
Developer workflows are run with [`just`](https://github.com/casey/just). You can use `just -l` to list commands, and view the `justfile` for the commands. | ||
|
||
We use `poetry` for packaging and developing. Add a depenency with `poetry add dep`, or `poetry add --group dev dep` for a dev dependency. | ||
We use `uv` for packaging and developing. Add a depenency with `uv add dep`, or `uv add --dev dep` for a dev dependency. | ||
|
||
We use `ruff` for formatting and imports, `mypy` for static typing, and `pytest` for testing. | ||
|
||
To run all tests and checks: `just verify`. To include e2e tests (for Nominal developers): `just verify-e2e`. | ||
|
||
As a rule, all tools should be configured via pyproject.toml, and should prefer configuration over parameters for project information. For example, `poetry run mypy` should work without having to run `poetry run mypy nominal`. | ||
As a rule, all tools should be configured via pyproject.toml, and should prefer configuration over parameters for project information. For example, `uv run mypy` should work without having to run `uv run mypy nominal`. | ||
|
||
Tests are written with `pytest`. By default, `pytest` runs all the tests in `tests/` except the end-to-end (e2e) tests in `tests/e2e`. To run e2e tests, `pytest` needs to be passed the e2e test directory with command-line arguments for connecting to the Nominal platform to test against. The e2e tests can be ran manually as: | ||
|
||
```sh | ||
poetry run pytest tests/e2e --auth-token AUTH_TOKEN [--base-url BASE_URL] | ||
uv run pytest tests/e2e --auth-token AUTH_TOKEN [--base-url BASE_URL] | ||
``` | ||
|
||
or simply with `just test-e2e <token>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.