Skip to content

Commit

Permalink
poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
giocaizzi committed Jun 16, 2024
1 parent 44232ec commit 9f696b4
Show file tree
Hide file tree
Showing 8 changed files with 1,841 additions and 79 deletions.
31 changes: 10 additions & 21 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[flake8]
# flake8 and black compatibility
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#minimal-configuration
max-line-length = 88
# E203, E701, - black compatibility
# RST201, RST203, RST301 - Google Python Style docstrings cause errors
extend-ignore = E203,E701,RST201,RST203,RST301,
# exclude directories
exclude =
tests,
.github,
Expand All @@ -7,24 +14,6 @@ exclude =
docsrc,
temp,
./build
require-plugins =
flake8-rst-docstrings
# flake8 and black compatibility
max-line-length = 88
# rst plugin
rst-roles =
class,
func,
ref,
obj,
rst-directives =
envvar,
exception,
rst-substitutions =
version,
# Google Python style is not RST until after processed by Napoleon
# See https://github.com/peterjc/flake8-rst-docstrings/issues/17
# E203: flake8 and black compatibility
# d107: missing docstring in init
extend-ignore =
RST307,RST201,RST203,RST301,E203
# plugins to use
require-plugin=
falke8-rst-docstrings
109 changes: 104 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
.vscode
temp

# -- Default github Python --
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
Expand All @@ -23,6 +30,12 @@ share/python-wheels/
*.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
Expand All @@ -41,12 +54,31 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
*.lcov

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

#dataframes
*.csv
# Scrapy stuff:
.scrapy

# Sphinx documentation
docsrc/build/
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints
Expand All @@ -55,6 +87,45 @@ docsrc/build/
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

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

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

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
Expand All @@ -64,5 +135,33 @@ ENV/
env.bak/
venv.bak/

# personal
temp
# 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/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
1,680 changes: 1,680 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[tool.poetry]
name = "pysurfline"
version = "0.2.1"
description = "python Surfline API"
authors = ["giocaizzi <giocaizzi@gmail.com>"]
license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.8.1"
matplotlib = [
{ version = "^3.8", python = "^3.9" },
{ version = "<3.8", python = "<3.9" },
]
pandas = [
{ version = "^2.1", python = "^3.9" },
{ version = "<2.1", python = "<3.9" },
]
requests = "^2.32.3"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.1"
pytest-cov = "^5.0.0"
flake8 = "^7.0.0"
flake8-rst-docstrings = "^0.3.0"
black = { extras = ["jupyter"], version = "^24.4.2" }
# Avoid PyPI/Poetry problem: https://github.com/python-poetry/poetry/issues/9293
docutils = "!=0.21.post1"

[tool.poetry.group.docs.dependencies]

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov --cov-report xml --cov-report html --cov-report lcov"

[tool.coverage.report]
include = ["pysurfline/*"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.urls]
Homepage = "https://github.com/giocaizzi/pysurfline"
Documentation = "https://giocaizzi.github.io/pysurfline/"
Repository = "https://github.com/giocaizzi/pysurfline"
Issues = "https://github.com/giocaizzi/pysurfline/issues"
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

2 changes: 0 additions & 2 deletions tests/requirements.txt

This file was deleted.

0 comments on commit 9f696b4

Please sign in to comment.