Skip to content

Python 3.11 refactor #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6cdd6b8
remove circleci
chingc Dec 23, 2022
834cb0f
add github actions
chingc Dec 23, 2022
93de6cf
remove cli interface
chingc Dec 23, 2022
d688dac
__init__.py
chingc Dec 23, 2022
fa89c97
refactored for clarity, simplicity, and python 3.11
chingc Dec 23, 2022
022a5ff
update year
chingc Dec 23, 2022
39305fd
simplify .gitignore
chingc Dec 23, 2022
a915905
update for python 3.11 and refactor
chingc Dec 23, 2022
9e72489
update poetry.lock
chingc Dec 23, 2022
b267049
clear file
chingc Dec 23, 2022
ca682bd
add black
chingc Dec 23, 2022
39f5988
update poetry.lock
chingc Dec 23, 2022
cdfa8af
linted
chingc Dec 23, 2022
faa8d03
make mypy happy
chingc Dec 23, 2022
f53298a
rename file
chingc Dec 23, 2022
ff02267
add pytest-subtests
chingc Dec 23, 2022
31b154f
update poetry.lock
chingc Dec 23, 2022
16b46f8
use length 64 for shake algos
chingc Dec 23, 2022
438f0c6
update tests
chingc Dec 23, 2022
4fb2b51
update pyproject.toml
chingc Dec 23, 2022
ee0639b
cancel in progress if pull request
chingc Dec 23, 2022
4f9cb7b
generate random file for compute
chingc Dec 24, 2022
dbeebef
option to also return results as a list
chingc Dec 24, 2022
f7db31e
test scanner
chingc Dec 24, 2022
e5c40cd
add changelog
chingc Dec 24, 2022
25ae1b9
fix type annotations
chingc Dec 26, 2022
3f2a90a
add NotAFileError
chingc Dec 26, 2022
7055c9f
make 'python -m hb' work
chingc Dec 26, 2022
1254562
add linting
chingc Dec 26, 2022
7786dc4
remove pylint
chingc Dec 27, 2022
0f03584
cleanup
chingc Dec 27, 2022
6bcf9b3
add bandit
chingc Dec 27, 2022
eefe372
additional linting
chingc Dec 27, 2022
2745d33
add flake8-pyproject and isort
chingc Dec 27, 2022
01ad312
move linter configs into pyproject.toml
chingc Dec 27, 2022
fd38c48
update lock
chingc Dec 28, 2022
19e8f5e
add property to return list of supported algos
chingc Dec 28, 2022
13ad795
update readme
chingc Dec 28, 2022
2b323e8
add scanning option
chingc Dec 28, 2022
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
127 changes: 0 additions & 127 deletions .circleci/config.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test

on:
pull_request:
push:
branches:
- main

concurrency:
group: test-${{ github.actor }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3

- run: pipx install poetry

- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"

- run: poetry install

- run: poetry run black .

- run: poetry run isort .

- run: poetry run flake8 .

- run: poetry run mypy .

- run: poetry run bandit --recursive hb

test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ["3.11"]

runs-on: ${{ matrix.os }}
timeout-minutes: 5

steps:
- uses: actions/checkout@v3

- run: pipx install poetry

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"

- run: poetry install

- run: poetry run pytest
111 changes: 3 additions & 108 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,108 +1,3 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
.static_storage/
.media/
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# vscode
.vscode
__pycache__
.mypy_cache
.pytest_cache
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# CHANGELOG

## v2.0.0b1 - TBD

- Breaking: Refactored for Python 3.11.
- Breaking: Refactored for clarity and simplicity.
- Breaking: Removed command line interface. Might return in the future.
- Misc: Moved to GitHub Actions from CircleCI.

## v1.4.2 - 2018.11.04

- Fixed: Colorized text didn't appear properly.
- Misc: Code cleanup.

## v1.4.1 - 2018.08.02

- Fixed: Progress meter also piped to file when redirecting output. [#3](https://github.com/chingc/Hash-Brown/issues/3)
- Fixed: Progress meter sometimes not cleared. [#4](https://github.com/chingc/Hash-Brown/issues/4)

## v1.4.0 - 2018.08.01

- New: Option to hide results that are OK during check mode.

## v1.3.0 - 2018.07.31

- New: Blast processing! (process files in parallel)

## v1.2.0 - 2018.07.30

- New: Option to show elapsed time to hash all files.
- Misc: Code cleanup.

## v1.1.1 - 2018.07.25

- Publish to PyPI!

## v1.1.0 - 2018.07.25

- Changed: Checksum methods are now properties.
- Misc: Code cleanup.

## v1.0.0 - 2018.07.16

- Breaking: Refactored for Python 3.7.
- Breaking: Simplified command line interface.
- Misc: Code cleanup.

## v0.4.0 - 2018.06.27

- Misc: Code cleanup.

## v0.3.2 - 2018.06.27

- Changed: Refactored for Python 3.2.

## v0.3.1 - 2018.06.27

- Changed: Progress meter display format.
- Misc: Documentation update.

## v0.3.0 - 2018.06.27

- Misc: Code cleanup.

## v0.2.0 - 2018.06.27

- New: Recursive path expansion for Windows.
- New: Mismatch counting.
- Misc: Code cleanup.

## v0.1.0 - 2018.06.27

- First release!
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Ching Chow
Copyright (c) 2023 Ching Chow

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading