Skip to content

Commit

Permalink
Move to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwager committed Aug 28, 2024
1 parent f32f639 commit d589555
Show file tree
Hide file tree
Showing 10 changed files with 391 additions and 93 deletions.
2 changes: 0 additions & 2 deletions .coveragerc

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
- '3.9'
- '3.10'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Run CI
run: |
python -m pip install --requirement requirements.txt
python -m pip install --requirement requirements-dev.txt
python -m pip install --editable .
python -m flake8
python -m pytest --cov
poetry env use ${{ matrix.python-version }}
poetry install --with dev
poetry run flake8
poetry run pytest --cov
9 changes: 0 additions & 9 deletions .github/workflows/dlint.yml

This file was deleted.

14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Fierce

[![CI](https://github.com/mschwager/fierce/actions/workflows/ci.yml/badge.svg)](https://github.com/mschwager/fierce/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/mschwager/fierce/badge.svg?branch=master)](https://coveralls.io/github/mschwager/fierce?branch=master)
[![Dlint](https://github.com/mschwager/fierce/actions/workflows/dlint.yml/badge.svg)](https://github.com/mschwager/fierce/actions/workflows/dlint.yml)
[![Python Versions](https://img.shields.io/pypi/pyversions/fierce.svg)](https://img.shields.io/pypi/pyversions/fierce.svg)
[![PyPI Version](https://img.shields.io/pypi/v/fierce.svg)](https://img.shields.io/pypi/v/fierce.svg)

Expand Down Expand Up @@ -122,28 +120,26 @@ $ fierce --help

# Developing

First, install development packages:
First, install [`poetry`](https://python-poetry.org/docs/#installation) and development packages:

```
$ python -m pip install -r requirements.txt
$ python -m pip install -r requirements-dev.txt
$ python -m pip install -e .
$ poetry install --with dev
```

## Testing

```
$ pytest
$ poetry run pytest
```

## Linting

```
$ flake8
$ poetry run flake8
```

## Coverage

```
$ pytest --cov
$ poetry run pytest --cov
```
2 changes: 1 addition & 1 deletion fierce/fierce.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def fierce(**kwargs):
pprint.pprint({k: v.to_text(k) for k, v in zone.items()})
return

random_subdomain = str(random.randint(1e10, 1e11)) # noqa DUO102, non-cryptographic random use
random_subdomain = str(random.randint(1e10, 1e11))
random_domain = concatenate_subdomains(domain, [random_subdomain])
wildcard = query(resolver, random_domain, record_type='A', tcp=kwargs["tcp"])
wildcard_ips = set(rr.address for rr in wildcard.rrset) if wildcard else set()
Expand Down
332 changes: 332 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[tool.poetry]
name = "fierce"
version = "1.5.0"
description = "A DNS reconnaissance tool for locating non-contiguous IP space."
authors = []
license = "GPLv3"
readme = "README.md"
repository = "https://github.com/mschwager/fierce"
homepage = "https://github.com/mschwager/fierce"
packages = [{include = "fierce"}]
classifiers = [
'Environment :: Console',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Security',
]

[tool.poetry.dependencies]
python = "^3.8"
dnspython = "1.16.0"

[tool.poetry.group.dev.dependencies]
pytest = "6.2.5"
pytest-cov = "3.0.0"
flake8 = "3.7.7"
pyfakefs = "5.6.0"

[tool.poetry.group.dev]
optional = true

[tool.poetry.scripts]
fierce = "fierce.fierce:main"

[tool.coverage.run]
source = ["fierce"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
5 changes: 0 additions & 5 deletions requirements-dev.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

59 changes: 0 additions & 59 deletions setup.py

This file was deleted.

0 comments on commit d589555

Please sign in to comment.