Skip to content

Commit

Permalink
Add poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
daxartio committed Jul 16, 2020
1 parent e4859e5 commit 9d8cfb2
Show file tree
Hide file tree
Showing 11 changed files with 1,760 additions and 42 deletions.
159 changes: 142 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,143 @@
.idea/
.vscode/
# Byte-compiled / optimized / DLL files
__pycache__/
build
Output
venv
dist
log/

data/*
/languages/**/*.mo
/*.exe
*.bat
*.cmd
*.pyc
SportOrg.spec

resource.syso
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# 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/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

.idea
.vscode

data
16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
language: python

cache: pip

python:
- "3.7"
# command to install dependencies
- "3.8"

install:
- pip install -r requirements.txt
- pip install pytest
# command to run tests
- pip install poetry codecov
- poetry install

script:
- pytest --verbosity=2 --showlocals --strict --log-level=DEBUG
- python setup.py build
- python setup_.py build

branches:
only:
- develop
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

SportOrg Copyright (C) 2018 SportOrg team
SportOrg Copyright (C) 2020 SportOrg team
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
BIN ?= .venv/bin/

CODE = sportrog
ALL_CODE = sportrog tests

.PHONY: run
run:
$(BIN)python SportOrg.pyw

.PHONY: venv
venv:
python -m venv .venv
$(BIN)pip install poetry
$(BIN)poetry install

.PHONY: update
update:
$(BIN)poetry update

.PHONY: test
test:
$(BIN)pytest --verbosity=2 --showlocals --strict --log-level=DEBUG $(args)

.PHONY: lint
lint:
$(BIN)flake8 --jobs 4 --statistics --show-source $(ALL_CODE)
$(BIN)pylint --jobs 1 --rcfile=setup.cfg $(CODE)
$(BIN)black --skip-string-normalization --line-length=88 --check $(ALL_CODE)
$(BIN)pytest --dead-fixtures --dup-fixtures
$(BIN)mypy $(ALL_CODE)
$(BIN)mkdocs build -s

.PHONY: format
format:
$(BIN)autoflake --recursive --in-place --remove-all-unused-imports $(ALL_CODE)
$(BIN)isort --apply --recursive $(ALL_CODE)
$(BIN)black --skip-string-normalization --line-length=88 $(ALL_CODE)
$(BIN)unify --in-place --recursive $(ALL_CODE)
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# SportOrg

```commandline
pip install -r requirements.txt
pip install poetry
poetry install
```

Run
Expand All @@ -27,4 +28,4 @@ python SportOrg.pyw

### cx_Freeze

`python setup.py build`
`python setup_.py build`
Loading

0 comments on commit 9d8cfb2

Please sign in to comment.