-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
172 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,47 @@ | ||
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
name: publish | ||
concurrency: publish | ||
|
||
on: push | ||
on: | ||
push: | ||
branches: | ||
- trunk | ||
tags: | ||
- "**" | ||
|
||
jobs: | ||
build-n-publish: | ||
runs-on: ubuntu-latest | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
# setuptools_scm needs the git history | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
pip install --user | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
python -m build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
- name: Publish distribution 📦 to Test PyPI | ||
# TODO(gwax): use setuptools_scm instead of only pushing tags to test pypi | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@v1.5.0 | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@v1.5.0 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
"""Establish mtg_ssm package.""" | ||
from mtg_ssm.version import __version__ | ||
|
||
try: | ||
from ._version import __version__ | ||
except ImportError: | ||
__version__ = "unknown" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
[build-system] | ||
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "mtg_ssm" | ||
description = "A tool to manage Magic: the Gathering collection spreadsheets" | ||
readme = "README.rst" | ||
authors = [ | ||
{name = "George Leslie-Waksman", email ="waksman@gmail.com"}, | ||
] | ||
requires-python = ">=3.8" | ||
keywords = [ | ||
"mtg", | ||
"magic", | ||
"collection", | ||
"tracking", | ||
"spreadsheet", | ||
] | ||
license = {text = "MIT"} | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: End Users/Desktop", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: OS Independent", | ||
"Operating System :: POSIX", | ||
"Operating System :: Unix", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Topic :: Games/Entertainment", | ||
] | ||
|
||
dependencies = [ | ||
"appdirs~=1.4", | ||
"openpyxl~=3.0", | ||
"pydantic~=1.9", | ||
"requests~=2.27", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/gwax/mtg_ssm" | ||
"Bug Tracker" = "https://github.com/gwax/mtg_ssm/issues" | ||
|
||
[project.scripts] | ||
mtg-ssm = "mtg_ssm.ssm:main" | ||
|
||
[project.optional-dependencies] | ||
lxml = [ | ||
"lxml>=3.7.2", | ||
] | ||
dev = [ | ||
"black", | ||
"coverage[toml]", | ||
"doc8", | ||
"flake8", | ||
"flake8-bugbear", | ||
"flake8-comprehensions", | ||
"flake8-mutable", | ||
"flake8-pyproject", | ||
"freezegun", | ||
"isort", | ||
"lxml", | ||
"mypy", | ||
"openpyxl-stubs", | ||
"pip", | ||
"pip-tools", | ||
"Pygments", | ||
"pylint", | ||
"pytest>=6.0", | ||
"pytest-cov", | ||
"pytest-snapshot", | ||
"responses", | ||
"setuptools>=45", | ||
"setuptools-scm[toml]>=6.2", | ||
"types-freezegun", | ||
"types-requests", | ||
"wheel", | ||
] | ||
|
||
[tool.setuptools] | ||
packages = ["mtg_ssm"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "mtg_ssm/_version.py" | ||
local_scheme = "no-local-version" | ||
|
||
[tool.mypy] | ||
python_version = "3.8" | ||
plugins = "pydantic.mypy" | ||
|
||
ignore_missing_imports = true | ||
follow_imports = "normal" | ||
disallow_untyped_defs = true | ||
allow_untyped_globals = false | ||
|
||
[tool.flake8] | ||
ignore = ["E203", "E501", "F401", "W503"] | ||
max_complexity = 10 | ||
exclude = [".git", "__pycache__", "build", "dist"] | ||
|
||
[tool.pytest.ini_options] | ||
xfail_strict = true | ||
addopts = "--cov mtg_ssm --cov-report term-missing" | ||
testpaths = ["tests"] | ||
|
||
[tool.coverage.run] | ||
omit = ["tests/**"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"def __repr__", | ||
"def __str__", | ||
"if __name__ = .__main__.:", | ||
] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
atomic = true | ||
line_length = 88 | ||
known_first_party = [ | ||
"mtg_ssm", | ||
"tests", | ||
] | ||
known_third_party = [ | ||
"freezegun", | ||
"openpyxl", | ||
"pytest", | ||
"requests", | ||
] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.