From 5080f557bd1d88b0e0a073f035b197b1f68d927f Mon Sep 17 00:00:00 2001 From: Rob Blumberg Date: Fri, 27 Mar 2020 17:58:59 -0700 Subject: [PATCH] Initial commit --- .github/workflows/build.yml | 35 ++++++ .github/workflows/release.yml | 71 ++++++++++++ .gitignore | 139 +++++++++++++++++++++++ .readthedocs.yml | 7 ++ CONDUCT.md | 46 ++++++++ CONTRIBUTING.md | 123 ++++++++++++++++++++ CONTRIBUTORS.md | 10 ++ LICENSE | 22 ++++ README.md | 30 +++++ docs/Makefile | 20 ++++ docs/conf.py | 163 +++++++++++++++++++++++++++ docs/contributing.rst | 1 + docs/contributors.rst | 1 + docs/index.rst | 19 ++++ docs/installation.rst | 51 +++++++++ docs/make.bat | 36 ++++++ docs/readme.rst | 1 + docs/usage.rst | 7 ++ pyproject.toml | 15 +++ sbdataextraction/__init__.py | 1 + sbdataextraction/sbdataextraction.py | 0 tests/__init__.py | 0 tests/test_sbdataextraction.py | 1 + 23 files changed, 799 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore create mode 100644 .readthedocs.yml create mode 100644 CONDUCT.md create mode 100755 CONTRIBUTING.md create mode 100755 CONTRIBUTORS.md create mode 100755 LICENSE create mode 100644 README.md create mode 100755 docs/Makefile create mode 100755 docs/conf.py create mode 100755 docs/contributing.rst create mode 100755 docs/contributors.rst create mode 100755 docs/index.rst create mode 100755 docs/installation.rst create mode 100755 docs/make.bat create mode 100755 docs/readme.rst create mode 100755 docs/usage.rst create mode 100644 pyproject.toml create mode 100644 sbdataextraction/__init__.py create mode 100644 sbdataextraction/sbdataextraction.py create mode 100644 tests/__init__.py create mode 100644 tests/test_sbdataextraction.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6b76e33 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: build + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.7, 3.8] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install poetry + poetry install + - name: Check style + run: poetry run flake8 --exclude=docs* + - name: Test with pytest + run: | + poetry run pytest --cov=./ --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + yml: ./codecov.yml + fail_ci_if_error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2524f7a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,71 @@ +name: Release + +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install dependencies + run: | + pip install poetry + poetry install + - name: Check style + run: poetry run flake8 --exclude=docs* + - name: Test with pytest + run: | + poetry run pytest --cov=./ --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + yml: ./codecov.yml + fail_ci_if_error: true + - name: checkout + uses: actions/checkout@master + with: + ref: master + fetch-depth: '0' + - name: Bump package versions + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + poetry run semantic-release version + poetry version $(grep "version" */__init__.py | cut -d "'" -f 2 | cut -d '"' -f 2) + git commit -m "Bump versions" -a + - name: Push package version changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Get release tag version from package version + run: | + echo ::set-output name=release_tag::$(grep "version" */__init__.py | cut -d "'" -f 2 | cut -d '"' -f 2) + id: release + - name: Create Release with new version + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.release.outputs.release_tag }} + release_name: ${{ steps.release.outputs.release_tag }} + draft: false + prerelease: false + - name: Build package and publish to test PyPI + env: + TEST_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} + TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} + run: | + poetry config repositories.test-pypi https://test.pypi.org/legacy/ + poetry build + poetry publish -r test-pypi -u $TEST_PYPI_USERNAME -p $TEST_PYPI_PASSWORD diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c077573 --- /dev/null +++ b/.gitignore @@ -0,0 +1,139 @@ +# 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/ +pip-wheel-metadata/ +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/ + +# 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 +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.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/ +**__pycache__ + +# PyCharm +.idea/ + +# RStudio project files +**.Rproj.user/ +**.Rproj.user* +**.Rproj +**.Rhistory diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..d4d9dfb --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,7 @@ +build: + image: latest +python: + version: 3.7 + pip_install: true + extra_requirements: + - docs diff --git a/CONDUCT.md b/CONDUCT.md new file mode 100644 index 0000000..c7828a5 --- /dev/null +++ b/CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mes335@cornell.edu. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..398f46b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,123 @@ + +## Contributing + +Contributions are welcome, and they are greatly appreciated! Every little bit +helps, and credit will always be given. + +You can contribute in many ways: + +## Types of Contributions + + +### Report Bugs + +Report bugs at https://github.com/RobBlumberg/sbdataextraction/issues. + +If you are reporting a bug, please include: + +* Your operating system name and version. +* Any details about your local setup that might be helpful in troubleshooting. +* Detailed steps to reproduce the bug. + +### Fix Bugs + +Look through the GitHub issues for bugs. Anything tagged with "bug" and "help +wanted" is open to whoever wants to implement it. + +### Implement Features + +Look through the GitHub issues for features. Anything tagged with "enhancement" +and "help wanted" is open to whoever wants to implement it. + +### Write Documentation + +sbdataextraction could always use more documentation, whether as part of the +official sbdataextraction docs, in docstrings, or even on the web in blog posts, +articles, and such. + +### Submit Feedback + +The best way to send feedback is to file an issue at https://github.com/RobBlumberg/sbdataextraction/issues. + +If you are proposing a feature: + +* Explain in detail how it would work. +* Keep the scope as narrow as possible, to make it easier to implement. +* Remember that this is a volunteer-driven project, and that contributions + are welcome :) + +## Get Started! + +Ready to contribute? Here's how to set up `sbdataextraction` for local development. + +1. Fork the `sbdataextraction` repo on GitHub. + +2. Clone your fork locally: + + ``` + git clone git@github.com:your_name_here/sbdataextraction.git + ``` + +3. Install your local copy with Poetry, this is how you set up your fork for local development: + + ``` + cd sbdataextraction/ + poetry install + ``` + +4. Create a branch for local development: + + ``` + git checkout -b name-of-your-bugfix-or-feature + ``` + + Now you can make your changes locally. + +5. When you're done making changes, check that your changes pass the tests by running pytest + + ``` + poetry run pytest + ``` + +6. Commit your changes and push your branch to GitHub: + + ``` + git add . + git commit -m "Your detailed description of your changes." + git push origin name-of-your-bugfix-or-feature + ``` + +7. Submit a pull request through the GitHub website. + +## Pull Request Guidelines + +Before you submit a pull request, check that it meets these guidelines: + +1. The pull request should include tests. +2. If the pull request adds functionality, the docs should be updated. Put + your new functionality into a function with a docstring, and add the + feature to the list in README.md. +3. The pull request should work for Python 3.7 & 3.8. Check https://github.com/RobBlumberg/sbdataextraction/pulls and make sure that the tests pass for all supported Python versions. + +## Tips + +To run a subset of tests: + +``` +py.test tests.test_sbdataextraction +``` + +## Deploying + +A reminder for the maintainers on how to deploy: + +- Ensure the following secrets are recorded on GitHub: + - CODECOV_TOKEN + - PYPI_USERNAME + - PYPI_PASSWORD + + GitHub Actions should build and deploy to testPyPI when a pull request is merged into master. + +## Code of Conduct + +Please note that the sbdataextraction project is released with [this Contributor Code of Conduct](CONDUCT.md). By contributing to this project you agree to abide by its terms. diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100755 index 0000000..b0913fe --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,10 @@ +# Credits + + +## Development Lead + +* Rob Blumberg + +## Contributors + +None yet. Why not be the first? diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..18b73e8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2020, Rob Blumberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..30109f0 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +## sbdataextraction + +![](https://github.com/RobBlumberg/sbdataextraction/workflows/build/badge.svg) [![codecov](https://codecov.io/gh/RobBlumberg/sbdataextraction/branch/master/graph/badge.svg)](https://codecov.io/gh/RobBlumberg/sbdataextraction) ![Release](https://github.com/RobBlumberg/sbdataextraction/workflows/Release/badge.svg) + +[![Documentation Status](https://readthedocs.org/projects/sbdataextraction/badge/?version=latest)](https://sbdataextraction.readthedocs.io/en/latest/?badge=latest) + +Package to get statsbomb public data into python + +### Installation: + +``` +pip install -i https://test.pypi.org/simple/ sbdataextraction +``` + +### Features +- TODO + +### Dependencies + +- TODO + +### Usage + +- TODO + +### Documentation +The official documentation is hosted on Read the Docs: + +### Credits +This package was created with Cookiecutter and the UBC-MDS/cookiecutter-ubc-mds project template, modified from the [pyOpenSci/cookiecutter-pyopensci](https://github.com/pyOpenSci/cookiecutter-pyopensci) project template and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage). diff --git a/docs/Makefile b/docs/Makefile new file mode 100755 index 0000000..3d68031 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = python -msphinx +SPHINXPROJ = sbdataextraction +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100755 index 0000000..ed2db0a --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,163 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# sbdataextraction documentation build configuration file, created by +# sphinx-quickstart on Fri Jun 9 13:47:02 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another +# directory, add these directories to sys.path here. If the directory is +# relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('..')) + +import sbdataextraction + +# -- General configuration --------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# 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'] + +# Add any paths that contain templates here, relative to this directory. +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' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'sbdataextraction' +copyright = u"2020, Rob Blumberg" +author = u"Rob Blumberg" + +# The version info for the project you're documenting, acts as replacement +# for |version| and |release|, also used in various other places throughout +# the built documents. +# +# The short X.Y version. +version = sbdataextraction.__version__ +# The full version, including alpha/beta/rc tags. +release = sbdataextraction.__version__ + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +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'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +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 +# documentation. +# +# html_theme_options = {} + +# 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'] + + +# -- Options for HTMLHelp output --------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = 'sbdataextractiondoc' + + +# -- Options for LaTeX output ------------------------------------------ + +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', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'sbdataextraction.tex', + u'sbdataextraction Documentation', + u'Rob Blumberg', 'manual'), +] + + +# -- Options for manual page output ------------------------------------ + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'sbdataextraction', + u'sbdataextraction Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ---------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'sbdataextraction', + u'sbdataextraction Documentation', + author, + 'sbdataextraction', + 'One line description of project.', + 'Miscellaneous'), +] + +# Add napoleon to the extensions list +extensions = ['sphinx.ext.napoleon'] diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100755 index 0000000..e582053 --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1 @@ +.. include:: ../CONTRIBUTING.rst diff --git a/docs/contributors.rst b/docs/contributors.rst new file mode 100755 index 0000000..9020480 --- /dev/null +++ b/docs/contributors.rst @@ -0,0 +1 @@ +.. include:: ../CONTRIBUTORS.rst diff --git a/docs/index.rst b/docs/index.rst new file mode 100755 index 0000000..1a91ddd --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,19 @@ +Welcome to sbdataextraction's documentation! +====================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + readme + installation + usage + modules + contributing + contributors + +Indices and tables +================== +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100755 index 0000000..14925cb --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,51 @@ +.. highlight:: shell + +============ +Installation +============ + + +Stable release +-------------- + +To install sbdataextraction, run this command in your terminal: + +.. code-block:: console + + $ pip install -i https://test.pypi.org/simple/ sbdataextraction + +This is the preferred method to install sbdataextraction, as it will always install the most recent stable release. + +If you don't have `pip`_ installed, this `Python installation guide`_ can guide +you through the process. + +.. _pip: https://pip.pypa.io +.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/ + + +From sources +------------ + +The sources for sbdataextraction can be downloaded from the `Github repo`_. + +You can either clone the public repository: + +.. code-block:: console + + $ git clone git://github.com/RobBlumberg/sbdataextraction + +Or download the `tarball`_: + +.. code-block:: console + + $ curl -OL https://github.com/RobBlumberg/sbdataextraction/tarball/master + +Once you have a copy of the source, you can install it with: + +.. code-block:: console + + $ python setup.py install + + +.. _Github repo: https://github.com/RobBlumberg/sbdataextraction +.. _tarball: https://github.com/RobBlumberg/sbdataextraction/tarball/master diff --git a/docs/make.bat b/docs/make.bat new file mode 100755 index 0000000..12c8223 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=python -msphinx +) +set SOURCEDIR=. +set BUILDDIR=_build +set SPHINXPROJ=sbdataextraction + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The Sphinx module was not found. Make sure you have Sphinx installed, + echo.then set the SPHINXBUILD environment variable to point to the full + echo.path of the 'sphinx-build' executable. Alternatively you may add the + echo.Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/docs/readme.rst b/docs/readme.rst new file mode 100755 index 0000000..72a3355 --- /dev/null +++ b/docs/readme.rst @@ -0,0 +1 @@ +.. include:: ../README.rst diff --git a/docs/usage.rst b/docs/usage.rst new file mode 100755 index 0000000..e5f9f58 --- /dev/null +++ b/docs/usage.rst @@ -0,0 +1,7 @@ +===== +Usage +===== + +To use sbdataextraction in a project:: + + from sbdataextraction import sbdataextraction diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5bf732f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[tool.poetry] +name = "sbdataextraction" +version = "0.1.0" +description = "Package to get statsbomb public data into python" +authors = ["Rob Blumberg "] +license = "MIT" + +[tool.poetry.dependencies] +python = "^3.7" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" diff --git a/sbdataextraction/__init__.py b/sbdataextraction/__init__.py new file mode 100644 index 0000000..b794fd4 --- /dev/null +++ b/sbdataextraction/__init__.py @@ -0,0 +1 @@ +__version__ = '0.1.0' diff --git a/sbdataextraction/sbdataextraction.py b/sbdataextraction/sbdataextraction.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_sbdataextraction.py b/tests/test_sbdataextraction.py new file mode 100644 index 0000000..7f55751 --- /dev/null +++ b/tests/test_sbdataextraction.py @@ -0,0 +1 @@ +from sbdataextraction import sbdataextraction