Skip to content
Snippets Groups Projects
Unverified Commit 5b5af56d authored by Marcin Wątroba's avatar Marcin Wątroba Committed by GitHub
Browse files

Merge pull request #4 from CLARIN-PL/feature/add_poetry

Feature/add poetry
parents 07c8a9cd fd7a21ea
Branches
No related tags found
No related merge requests found
Showing
with 1199 additions and 157 deletions
name: CI Main
on:
push:
branches:
- main
jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Run tests
run: poetry run poe test
lint:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Check
run: poetry run poe check
publish:
needs:
- tests
- lint
environment: Deployment
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Build and publish
run: |
poetry version "$(poetry version --short)-beta.${GITHUB_RUN_NUMBER}"
poetry build
poetry config repositories.theliverpypi https://nexus.theliver.pl/repository/pypi-registry/
poetry publish -r theliverpypi --username ${{ secrets.THELIVER_PYPI_USER }} --password ${{ secrets.THELIVER_PYPI_PASS }}
name: Python package
on:
pull_request:
branches: [ main, develop ]
name: CI
on: pull_request
jobs:
build:
runs-on: ubuntu-18.04
tests:
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9' ]
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Run tests
run: poetry run poe test
lint:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Check
run: poetry run poe check
publish:
needs:
- tests
- lint
environment: Test deployment
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Build and publish
run: |
ls -la
python -m pip install --upgrade pip
pip install tox
pip install --upgrade -r requirements.txt
pip install --upgrade -r requirements_dev.txt
- name: Run tox
run: tox -v
poetry version "$(poetry version --short)-alpha.${GITHUB_RUN_NUMBER}"
poetry build
poetry config repositories.theliverpypi https://nexus.theliver.pl/repository/pypi-registry/
poetry publish -r theliverpypi --username ${{ secrets.THELIVER_PYPI_USER }} --password ${{ secrets.THELIVER_PYPI_PASS }}
name: CI Main
on: release
jobs:
publish:
environment: Deployment
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Build and publish
run: |
poetry version "$(git describe --tags --abbrev=0)"
poetry build
poetry config repositories.theliverpypi https://nexus.theliver.pl/repository/pypi-registry/
poetry publish -r theliverpypi --username ${{ secrets.THELIVER_PYPI_USER }} --password ${{ secrets.THELIVER_PYPI_PASS }}
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="pytest" />
</component>
</module>
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="6">
<item index="0" class="java.lang.String" itemvalue="tensorflow-gpu" />
<item index="1" class="java.lang.String" itemvalue="tensorflow" />
<item index="2" class="java.lang.String" itemvalue="mysql-connector-python" />
<item index="3" class="java.lang.String" itemvalue="dateutil" />
<item index="4" class="java.lang.String" itemvalue="pytest" />
<item index="5" class="java.lang.String" itemvalue="celery" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="E402" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="dict.__getitem__" />
</list>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (asr-benchmarks)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/asr-benchmarks.iml" filepath="$PROJECT_DIR$/.idea/asr-benchmarks.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -19,7 +19,8 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath(".."))
import sziszapangma
......@@ -31,22 +32,22 @@ import sziszapangma
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"
# The master toctree document.
master_doc = 'index'
master_doc = "index"
# General information about the project.
project = 'sziszapangma'
project = "sziszapangma"
copyright = "2021, Piotr Szymański"
author = "Piotr Szymański"
......@@ -69,10 +70,10 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
......@@ -83,7 +84,7 @@ todo_include_todos = False
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"
# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
......@@ -94,13 +95,13 @@ html_theme = 'alabaster'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]
# -- Options for HTMLHelp output ---------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'sziszapangmadoc'
htmlhelp_basename = "sziszapangmadoc"
# -- Options for LaTeX output ------------------------------------------
......@@ -109,15 +110,12 @@ latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
......@@ -127,9 +125,7 @@ latex_elements = {
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [
(master_doc, 'sziszapangma.tex',
'sziszapangma Documentation',
'Piotr Szymański', 'manual'),
(master_doc, "sziszapangma.tex", "sziszapangma Documentation", "Piotr Szymański", "manual"),
]
......@@ -137,11 +133,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'sziszapangma',
'sziszapangma Documentation',
[author], 1)
]
man_pages = [(master_doc, "sziszapangma", "sziszapangma Documentation", [author], 1)]
# -- Options for Texinfo output ----------------------------------------
......@@ -150,13 +142,13 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'sziszapangma',
'sziszapangma Documentation',
(
master_doc,
"sziszapangma",
"sziszapangma Documentation",
author,
'sziszapangma',
'One line description of project.',
'Miscellaneous'),
"sziszapangma",
"One line description of project.",
"Miscellaneous",
),
]
mypy.ini 0 → 100644
[mypy-transformers.*]
ignore_missing_imports = True
[mypy-tensorflow.*]
ignore_missing_imports = True
[mypy-srsly.*]
ignore_missing_imports = True
[mypy-spacy.*]
ignore_missing_imports = True
implicit_reexport = True
[mypy-flair.*]
ignore_missing_imports = True
[mypy-sklearn.*]
ignore_missing_imports = True
[mypy-tqdm.*]
ignore_missing_imports = True
[mypy-torch.*]
ignore_missing_imports = True
[mypy-datasets.*]
ignore_missing_imports = True
[mypy-numpy.*]
ignore_missing_imports = True
[mypy-pandas.*]
ignore_missing_imports = True
[mypy-pymongo.*]
ignore_missing_imports = True
[mypy-fasttext.*]
ignore_missing_imports = True
[mypy-pytest.*]
ignore_missing_imports = True
This diff is collapsed.
[tool.poetry]
name = "asr-benchmarks"
version = "0.0.1"
description = "Library to benchmark ASR systems"
authors = [
"Piotr Szymański <niedakh@gmail.com>",
"Marcin Wątroba <markowanga@gmail.com>"
]
license = "MIT license"
packages = [
{ include = "sziszapangma" }
]
[tool.poetry.dependencies]
python = "^3.8"
numpy = "^1.20.1"
requests = "^2.25.1"
pandas = "^1.2.4"
fasttext = "^0.9.2"
pymongo = "^3.11.4"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
mypy = "^0.812"
black = "^20.8b1"
typing-extensions = "^3.7.4"
isort = { version = "^5.9.1", extras = ["pyproject"] }
pyflakes = "2.3.1"
poethepoet = "^0.10.0"
[tool.poe.tasks]
black = "black -v --check sziszapangma"
isort = "isort sziszapangma -c"
pyflakes = "pyflakes sziszapangma"
mypy = "mypy sziszapangma"
test = "pytest"
check = ["black", "isort", "mypy", "pyflakes"]
all = ["check", "test"]
[tool.poetry.extras]
developer = ["black", "mypy", "typing-extensions"]
[build-system]
requires = ["poetry>=1.1.5"]
build-backend = "poetry.masonry.api"
[mypy]
python_version = 3.8
[pytest]
testpaths = "tests"
[tool.black]
line-length = 100
[tool.isort]
line_length = 100
known_first_party = 'embeddings'
known_third_party = ["click", "pytest"]
profile = "black"
numpy>=1.20.1
requests>=2.25.1
pandas>=1.2.4
fasttext>=0.9.2
pymongo>=3.11.4
wheel==0.36.2
watchdog==2.1.3
flake8==3.9.2
tox==3.23.1
coverage==5.5
Sphinx==4.0.2
twine==3.4.1
pytest==6.2.4
pytest-runner==5.3.1
[bumpversion]
current_version = 0.1.0
commit = True
tag = True
[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:sziszapangma/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bdist_wheel]
universal = 1
[flake8]
exclude = docs
[aliases]
# Define setup.py command aliases here
test = pytest
;[tool:pytest]
;collect_ignore = ['setup.py']
#!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
with open("requirements.txt", "r") as fh:
requirements = fh.readlines()
with open("requirements_dev.txt", "r") as fh:
requirements_dev = fh.readlines() + requirements
setup_requirements = ['pytest-runner', ]
test_requirements = ['pytest>=3', ]
setup(
author="Piotr Szymański",
author_email='niedakh@gmail.com',
python_requires='>=3.5',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
description="A n",
entry_points={
'console_scripts': [
'sziszapangma=sziszapangma.cli:main',
],
},
install_requires=requirements,
license="MIT license",
long_description=readme + '\n\n' + history,
include_package_data=True,
keywords='sziszapangma',
name='sziszapangma',
packages=find_packages(include=['sziszapangma', 'sziszapangma.*']),
setup_requires=requirements_dev,
test_suite='tests',
tests_require=requirements_dev,
url='https://github.com/niedakh/sziszapangma',
version='0.1.0',
zip_safe=False,
)
"""Top-level package for sziszapangma."""
__author__ = """Piotr Szymański"""
__email__ = 'niedakh@gmail.com'
__version__ = '0.1.0'
__email__ = "niedakh@gmail.com"
__version__ = "0.1.0"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment