Skip to content

Commit

Permalink
default python
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Nov 7, 2023
1 parent 35e4d75 commit 9da0d62
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 1,280 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,3 @@ node_modules/

# Camply Data Files
camply/providers/usedirect/*/*.json

# Camply Requirements Files
requirements/*.bak
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY camply/ /tmp/camply/camply/
MAINTAINER Justin Flannery <[email protected]>
LABEL description="camply, the campsite finder"

COPY requirements/requirements-prod.txt /tmp/camply/requirements.txt
COPY requirements.txt /tmp/camply/requirements.txt

RUN python -m pip install -r /tmp/camply/requirements.txt && \
python -m pip install /tmp/camply --no-dependencies && \
Expand Down
24 changes: 3 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,14 @@ dependencies = [
"pip-tools~=6.13.0"
]
features = ["all"]
pre-install-commands = ["pip install -U -r requirements/requirements-dev.txt"]
pre-install-commands = ["python -m pip install --no-deps -r requirements.txt"]
python = "3.11"

[tool.hatch.envs.default.env-vars]
PUSHOVER_PUSH_TOKEN = "{env:PUSHOVER_PUSH_TOKEN:placeholder}"
PUSHOVER_PUSH_USER = "{env:PUSHOVER_PUSH_USER:placeholder}"

[tool.hatch.envs.default.scripts]
_pip_compile = "pip-compile --resolver=backtracking --generate-hashes --all-extras {args:}"
_sed_requirements = "sed -i.bak 's/-r requirements.in/camply (pyproject.toml)/'"
all = ["format", "lint", "test"]
check = [
"mypy --install-types --strict-optional --non-interactive {args:camply/ tests/}"
Expand All @@ -116,24 +114,8 @@ docs-deploy = "python -m mkdocs gh-deploy {args:}"
docs-serve = "python -m mkdocs serve --dev-addr localhost:8000"
format = ["ruff --fix {args:.}", "ruff format {args:.}"]
lint = ["ruff {args:.}", "ruff format --check {args:.}"]
requirements = [
"hatch dep show requirements --project-only --all > requirements.in",
"_pip_compile --output-file requirements/requirements-prod.txt",
"_sed_requirements requirements/requirements-prod.txt",
"hatch dep show requirements --all > requirements.in",
"_pip_compile --output-file requirements/requirements-dev.txt",
"_sed_requirements requirements/requirements-dev.txt",
"rm requirements.in"
]
requirements-upgrade = [
"hatch dep show requirements --project-only --all > requirements.in",
"_pip_compile --output-file requirements/requirements-prod.txt --upgrade",
"_sed_requirements requirements/requirements-prod.txt",
"hatch dep show requirements --all > requirements.in",
"_pip_compile --output-file requirements/requirements-dev.txt --upgrade",
"_sed_requirements requirements/requirements-dev.txt",
"rm requirements.in"
]
requirements = "pip-compile {args:} --generate-hashes --output-file requirements.txt --resolver=backtracking --all-extras"
requirements-upgrade = "pip-compile {args:} --upgrade --generate-hashes --output-file requirements.txt --resolver=backtracking --all-extras"
semantic-release = [
"npm install --prefix .github/semantic_release/",
"npx --prefix .github/semantic_release/ semantic-release {args:}"
Expand Down
Loading

0 comments on commit 9da0d62

Please sign in to comment.