Skip to content

Commit

Permalink
feat: add setup changelog and version (#8)
Browse files Browse the repository at this point in the history
First release
  • Loading branch information
Wazzabeee authored Apr 20, 2024
1 parent 44e158d commit 434cbb2
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 9 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CI Pipeline

on: [push, pull_request]
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:

jobs:
test:
Expand Down Expand Up @@ -37,3 +43,22 @@ jobs:
pylint scripts/ --rcfile=setup.cfg --fail-under=9
mypy -p scripts --ignore-missing-imports --disallow-incomplete-defs
continue-on-error: true

release:
needs: [ test, good-practices ]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11.5'
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
twine upload dist/*
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ repos:
language: system
args: ['--rcfile=setup.cfg', '--fail-under=8']
types: [python]
exclude: '^setup\.py$'

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 0.0.1

authors: Wazzabeee

### Chore
- Add pre commit hooks
- Update requirements for security reasons

### Fixes
- Fix README example
- Fix saving path with slashes


15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ This project was made part of my internship at the "Human Computer Humans Intera
---

```
Usage: main.py input_directory [OPTIONS]
Perform a similarity analysis of all text files available in given input directory.
Developped by Clément Delteil -> (Github: wazzabeee)
Usage: python -m scripts.main.py input_directory [OPTIONS]
Performs a similarity analysis of all text files available in given input directory.
Developed by Clément Delteil -> (Github: Wazzabeee)
Options:
-block_size, -s Set minimum number of consecutive and similar words detected. (Default is 2)
Expand Down Expand Up @@ -65,12 +64,12 @@ To fix this you'll need to modify `class PDF(list):` in `C:/.../slate3k/classes.
- Please make sure that all text files are closed before running the program.
- In order to get the best results please provide text files of the same languages.
- Pdf files that are made from scanned images won't be processed correctly.
- If a specific file is not processed correctly feel free to [contact me](mailto:<[email protected]>) so that I can address the issue.
- If a specific file is not processed correctly feel free to [contact me](mailto:<[email protected]>) so that I can address the issue.

**TODO**
---
- Add tests
- Add CI
- Add more tests
- Add info in console for timing (tqdm)
- Docker Image
- Add CSS to HTML Template
- Add support for other folder structures
- Fix Slate3k by installing custom fork
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
Empty file added pyproject.toml
Empty file.
35 changes: 35 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from setuptools import setup, find_packages

with open("VERSION") as version_file:
version = version_file.read().strip()

setup(
name="plagiarism-checker",
version=version,
packages=find_packages(),
install_requires=[
"beautifulsoup4==4.10.0",
"nltk==3.6.6",
"odfpy==1.4.1",
"pdfplumber==0.5.28",
"slate3k==0.5.3",
"tabulate==0.8.9",
],
extras_require={
"lint": ["pylint==3.0.2", "mypy==1.7.1", "flake8==6.1.0", "black==24.3.0", "types-tabulate"],
"dev": ["pytest", "pre-commit"],
},
author="Clément Delteil",
author_email="[email protected]",
description="Make plagiarism detection easier. This package will find similar sentences between given files and "
"highlight them in a side by side comparison.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/Wazzabeee/plagiarism_checker",
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
],
python_requires=">=3.10",
)

0 comments on commit 434cbb2

Please sign in to comment.