diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..11595fd --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,37 @@ +# This workflow will install Python dependencies, run tests, and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install --upgrade pip + pip install wheel + pip install setuptools + pip install twine + pip install pytest==8.2.2 + pip install pytest-runner==6.0.1 + - name: Test with pytest + run: | + pytest diff --git a/.gitignore b/.gitignore index 1e94382..9938ac3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,9 @@ venv dist build *.egg-info -.eggs \ No newline at end of file +.eggs +*.csv +*.pickle +tmp +*.json +*.pyc \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d9a653e --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +.PHONY: init +# init development +init: + python3 -m venv venv + +.PHONY: deps +# deps development +deps: + pip install --upgrade pip + pip install wheel + pip install setuptools + pip install twine + pip install pytest==8.2.2 + pip install pytest-runner==6.0.1 + +# show help +help: + @echo '' + @echo 'Usage:' + @echo ' make [target]' + @echo '' + @echo 'Targets:' + @awk '/^[a-zA-Z\-0-9]+:/ { \ + helpMessage = match(lastLine, /^# (.*)/); \ + if (helpMessage) { \ + helpCommand = substr($$1, 0, index($$1, ":")-1); \ + helpMessage = substr(lastLine, RSTART + 2, RLENGTH); \ + printf "\033[36m%-22s\033[0m %s\n", helpCommand,helpMessage; \ + } \ + } \ + { lastLine = $$0 }' $(MAKEFILE_LIST) + +.DEFAULT_GOAL := help \ No newline at end of file diff --git a/README.ar.md b/README.ar.md index a67415e..26d25fe 100644 --- a/README.ar.md +++ b/README.ar.md @@ -1,6 +1,6 @@