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
24 changes: 0 additions & 24 deletions .flake8

This file was deleted.

26 changes: 5 additions & 21 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,17 @@ on:

jobs:
deploy:
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.x"]
poetry: ["2.2.1"]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry==${{ matrix.poetry }}

- name: Setup Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python }}
cache: "poetry"

- name: Install dependencies
run: |
poetry install
enable-cache: true

- name: Build and publish
run: |
poetry build -n
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
run: uv publish --token ${{ secrets.PYPI_TOKEN }}
21 changes: 8 additions & 13 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,33 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
python: ["3.9", "3.13"]
poetry: ["2.2.1"]
runs-on: ${{ matrix.os }}
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry==${{ matrix.poetry }}

- name: Setup Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: ${{ matrix.python }}
cache: "poetry"

- name: Install dependencies
run: |
poetry install
run: uv sync --group dev

- name: Lint with ruff
if: startsWith(matrix.os, 'ubuntu')
run: |
poetry run ruff check .
poetry run ruff format --check .
uv run ruff check .
uv run ruff format --check .

- name: Type checking with mypy
if: startsWith(matrix.os, 'ubuntu')
run: |
poetry run mypy censys
uv run mypy censys

- name: Test with pytest
run: |
poetry run pytest --cov --cov-fail-under=100
uv run pytest --cov --cov-fail-under=100
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ repos:
hooks:
- id: system
name: ruff
entry: poetry run ruff check . --fix
entry: uv run ruff check . --fix
pass_filenames: false
language: system
types: [python]
require_serial: true
- id: system
name: ruff-format
entry: poetry run ruff format .
entry: uv run ruff format .
pass_filenames: false
language: system
types: [python]
- id: system
name: pytest
entry: poetry run pytest --cov --cov-fail-under=100
entry: uv run pytest --cov --cov-fail-under=100
pass_filenames: false
language: system
types: [python]
- id: system
name: mypy
entry: poetry run mypy censys
entry: uv run mypy censys
pass_filenames: false
language: system
types: [python]
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ To upgraded using `pip`.
pip install --upgrade censys
```

Alternatively, you can install the library using `poetry`.
Alternatively, you can install the library using `uv`.

```sh
git clone https://github.com/censys/censys-python.git
cd censys-python/
poetry install
uv install
```

Optionally, you can enable tab completion for the CLI by adding this line to your `~/.bashrc`, `~/.zshrc`, or equivalent.
Expand Down Expand Up @@ -101,7 +101,7 @@ The examples located in the [`examples/`](examples/) directory are a great place
- [Changelog](https://github.com/censys/censys-python/releases)
- [Documentation](https://censys-python.rtfd.io)
- [Discussions](https://github.com/censys/censys-python/discussions)
- [Censys Homepage](https://censys.io/)
- [Censys Homepage](https://censys.com/)
- [Censys Search](https://search.censys.io/)

## Contributing
Expand All @@ -110,25 +110,25 @@ All contributions (no matter how small) are always welcome. See [Contributing to

## Development

This project uses [poetry](https://python-poetry.org/) for dependency management. Please ensure you have [installed the latest version](https://python-poetry.org/docs/#installation).
This project uses [uv](https://docs.astral.sh/uv/) for dependency management. Please ensure you have [installed the latest version](https://docs.astral.sh/uv/getting-started/installation/).

```sh
git clone git@github.com:censys/censys-python.git
cd censys-python/
poetry install
uv install
```

## Testing

```sh
# Run tests
poetry run pytest
uv run pytest
# With coverage report
poetry run pytest --cov-report html
uv run pytest --cov-report html
```

## License

This software is licensed under [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

- Copyright (C) 2024 Censys, Inc.
- Copyright (C) 2026 Censys, Inc.
2 changes: 1 addition & 1 deletion docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Install dependencies via ``pip``:
.. prompt:: bash $

cd censys-python/
poetry install
uv install

Run the test suite with ``pytest``. More information about testing is available at :ref:`testing:Testing`.
Loading
Loading