Skip to content

Commit

Permalink
Merge pull request #37 from chr0mag/python-updates
Browse files Browse the repository at this point in the history
Python updates
  • Loading branch information
chr0mag authored Nov 4, 2024
2 parents 3b3c917 + 4f1aaf5 commit 875a7cc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following minimal pre-commit-config.yaml is enough:
files: 'python/'
repos:
- repo: https://github.com/pycqa/flake8
rev: 3.9.1
rev: 7.1.1
hooks:
- id: flake8
args: ['--max-line-length', '120']
Expand Down
4 changes: 3 additions & 1 deletion bash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ geoipsets
└── nftset
├── ipv4
└── ipv6
```
```

Environment variables limiting which sets are generated are available. See https://github.com/chr0mag/geoipsets/blob/main/bash/bcs.conf .
9 changes: 5 additions & 4 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ Typically, you would want to select only one firewall type along with a short li
The utility will attempt to read the configuration file at */etc/geoipsets.conf* but the location can be overidden using the *--config PATH_TO_FILE* command line option.

```shell
usage: geoipsets [-h] [-v] [-p {dbip,maxmind} [{dbip,maxmind} ...]] [-f {iptables,nftables} [{iptables,nftables} ...]] [-a {ipv6,ipv4} [{ipv6,ipv4} ...]]
usage: geoipsets [-h] [-v] [-p {maxmind,dbip} [{maxmind,dbip} ...]] [-f {nftables,iptables} [{nftables,iptables} ...]] [-a {ipv4,ipv6} [{ipv4,ipv6} ...]]
[-l COUNTRIES] [-o OUTPUT_DIR] [-c CONFIG_FILE] [--checksum] [--no-checksum]

Utility to build country specific IP sets for ipset/iptables and nftables. Command line arguments take precedence over those in the configuration file.

options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-p {dbip,maxmind} [{dbip,maxmind} ...], --provider {dbip,maxmind} [{dbip,maxmind} ...]
-p {maxmind,dbip} [{maxmind,dbip} ...], --provider {maxmind,dbip} [{maxmind,dbip} ...]
dataset provider(s) (default: dbip)
-f {iptables,nftables} [{iptables,nftables} ...], --firewall {iptables,nftables} [{iptables,nftables} ...]
-f {nftables,iptables} [{nftables,iptables} ...], --firewall {nftables,iptables} [{nftables,iptables} ...]
firewall(s) to build sets for (default: nftables)
-a {ipv6,ipv4} [{ipv6,ipv4} ...], --address-family {ipv6,ipv4} [{ipv6,ipv4} ...]
-a {ipv4,ipv6} [{ipv4,ipv6} ...], --address-family {ipv4,ipv6} [{ipv4,ipv6} ...]
IP protocol(s) to build sets for (default: ipv4)
-l COUNTRIES, --countries COUNTRIES
Path to a file containing 2-character country codes, one per line, or a comma-separated list of country codes. Argument is treated
Expand All @@ -39,4 +39,5 @@ options:
path to configuration file (default: /etc/geoipsets.conf)
--checksum enable checksum validation of downloaded files (default)
--no-checksum disable checksum validation of downloaded files
```
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"Operating System :: POSIX :: Linux",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
packages=find_packages(exclude=("tests",)),
include_package_data=True,
Expand Down

0 comments on commit 875a7cc

Please sign in to comment.