-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from freezingsaddles/obscurerichard/use-pyproj…
…ect-toml Make this project use pyproject.toml and Setuptools to handle dependencies instead of setup.py
- Loading branch information
Showing
15 changed files
with
152 additions
and
111 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,3 @@ eggs/ | |
*.egg-info/ | ||
*.egg | ||
*.cfg | ||
|
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,7 +1,7 @@ | ||
--- | ||
name: Build and Deploy Latest | ||
|
||
on: | ||
on: # yamllint disable-line | ||
push: | ||
branches: | ||
- 'main' | ||
|
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,10 +1,10 @@ | ||
--- | ||
name: Build Tag | ||
|
||
on: | ||
on: # yamllint disable-line | ||
push: | ||
tags: | ||
- '*' | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
|
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,7 +1,7 @@ | ||
--- | ||
name: Build | ||
|
||
on: pull_request | ||
on: pull_request # yamllint disable-line | ||
|
||
jobs: | ||
build: | ||
|
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/jackdewinter/pymarkdown | ||
rev: v0.9.26 | ||
hooks: | ||
- id: pymarkdown | ||
- repo: https://github.com/djlint/djLint | ||
rev: v1.36.4 | ||
hooks: | ||
- id: djlint-reformat | ||
- id: djlint |
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 |
---|---|---|
|
@@ -9,19 +9,20 @@ RUN apt-get update \ | |
|
||
RUN mkdir -p /build/wheels | ||
RUN pip3 install --upgrade pip setuptools wheel | ||
ADD requirements.txt /tmp/requirements.txt | ||
RUN pip3 wheel -r /tmp/requirements.txt --wheel-dir=/build/wheels | ||
ADD pyproject.toml /tmp/pyproject.toml | ||
RUN cd /tmp && pip3 wheel --wheel-dir=/build/wheels . | ||
|
||
# Now build the wheel for this project too. | ||
ADD . /app | ||
WORKDIR /app | ||
|
||
RUN python3 setup.py bdist_wheel -d /build/wheels | ||
RUN pip3 install build | ||
RUN python3 -m build --wheel --outdir /build/wheels | ||
|
||
# DEPLOY | ||
# ===== | ||
|
||
FROM ubuntu:22.04 as deploystep | ||
FROM ubuntu:22.04 AS deploystep | ||
LABEL maintainer="Richard Bullington-McGuire <[email protected]>" | ||
|
||
RUN apt-get update \ | ||
|
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 @@ | ||
recursive-include freezing/sync * |
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,85 @@ | ||
[project] | ||
name = "freezing-sync" | ||
version = "1.6.0" | ||
description = "Freezing Saddles activity and metadata sync." | ||
authors = [ | ||
{name = "Hans Lellelid", email = "[email protected]"}, | ||
{name = "Merlin Hughes"}, | ||
{name = "Richard Bullington-McGuire", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Richard Bullington-McGuire", email = "[email protected]"}, | ||
] | ||
license = {text = "Apache License (2.0)"} | ||
dependencies = [ | ||
"APScheduler==3.11.0", | ||
"GeoAlchemy2==0.16.0", | ||
"PyMySQL==1.1.1", | ||
"SQLAlchemy==1.4.54", | ||
"colorlog==6.9.0", | ||
"datadog==0.50.2", | ||
"envparse==0.2.0", | ||
"freezing-model @ https://github.com/freezingsaddles/freezing-model/archive/0.11.2.tar.gz", | ||
"greenstalk==2.0.2", | ||
"polyline==1.4.0", | ||
"pytz==2024.2", | ||
"requests==2.32.3", | ||
"stravalib==1.2.0", | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Topic :: Games", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"flake8-pyproject", | ||
"flake8", | ||
"isort", | ||
"pre-commit", | ||
"uppd", | ||
] | ||
|
||
[project.entry-points.console_scripts] | ||
freezing-sync = "freezing.sync.run:main" | ||
freezing-sync-activities = "freezing.sync.cli.sync_activities:main" | ||
freezing-sync-athletes = "freezing.sync.cli.sync_athletes:main" | ||
freezing-sync-detail = "freezing.sync.cli.sync_details:main" | ||
freezing-sync-photos = "freezing.sync.cli.sync_photos:main" | ||
freezing-sync-streams = "freezing.sync.cli.sync_streams:main" | ||
freezing-sync-weather = "freezing.sync.cli.sync_weather:main" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.flake8] | ||
# Thanks https://www.reddit.com/r/learnpython/comments/rr6y69/comment/hqeqt68/?utm_source=share&utm_medium=web2x&context=3 | ||
ignore = [ | ||
"E203", | ||
"E501", | ||
"W503", | ||
] | ||
max-line-length = 88 | ||
max-complexity = 39 | ||
extend-ignore = "E203" | ||
inline-quotes = "double" | ||
|
||
[tool.setuptools] | ||
# Thanks https://stackoverflow.com/a/72547402/424301 | ||
py-modules = ["freezing"] | ||
|
||
|
||
[tool.djlint] | ||
line_break_after_multiline_tag=true | ||
max_line_length=88 | ||
|
||
[tool.pymarkdown] | ||
plugins.md013.enabled = false | ||
extensions.front-matter.enabled = true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.