Skip to content

Commit

Permalink
Merge pull request #19 from claui/redport
Browse files Browse the repository at this point in the history
Sync upstream template using Redport
  • Loading branch information
claui authored Oct 9, 2024
2 parents 7511176 + 85a71af commit 5ca04e0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .redport/manifest.rpt.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"upstream": {
"type": "cookiecutter-template",
"source": "https://github.com/claui/cookiecutter-python-package.git",
"commit": "d9f839e34864cbd0c38f9bfd53e9d81aa1c2a2d1",
"commit": "3ab6969a03cfa353e1f520522b02ad69f4cdc08b",
"replay": "cookiecutter_replay/cookiecutter-python-package.json",
"patches": [
"patches/disable-install-step.patch"
Expand Down
13 changes: 9 additions & 4 deletions .redport/patches/disable-install-step.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py
index c3d1ed6..1c071ce 100644
index d40d99c..d1241e2 100644
--- a/hooks/post_gen_project.py
+++ b/hooks/post_gen_project.py
@@ -1,76 +1,2 @@
@@ -1,24 +1,5 @@
-import logging
-import os
import os
-from pathlib import Path, PurePath
import shutil
-import subprocess
Expand All @@ -24,8 +24,13 @@ index c3d1ed6..1c071ce 100644
- (PurePath(config_dict['replay_dir']) / template_name).with_suffix('.json'),
- target_replay_path,
-)
-
shutil.rmtree('licenses')

@@ -28,56 +9,3 @@ os.remove('{{ cookiecutter.project_slug }}/__main__.py')
os.remove('{{ cookiecutter.project_slug }}/cli.py')
os.remove('{{ cookiecutter.project_slug }}/fire_workarounds.py')
{% endif -%}
-
-{%- if cookiecutter.install_dependencies_now == "y" %}
-def sysexit_formatted(message: str) -> None:
Expand Down
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"editor.formatOnSave": false
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true
"editor.defaultFormatter": "charliermarsh.ruff"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml",
Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the exact Python version required by Itchcraft,
regardless of your system Python.

To install `pyenv` on Linux or WSL2, first make sure Python 3 is
installed. Then follow the *Basic GitHub Checkout* method described
installed. Then follow the _Basic GitHub Checkout_ method described
at [github.com/pyenv/pyenv](https://github.com/pyenv/pyenv#basic-github-checkout).

#### Checking your system-wide pyenv installation
Expand Down Expand Up @@ -135,12 +135,18 @@ act

### Generating project documentation

To generate project documentation and open it in your browser, run:
To generate project documentation, run:

```shell
poetry run poe doc
```

To open the generated documentation with `man`, run:

```shell
poetry run poe man
```

## Maintenance

### Refreshing dependencies
Expand Down
7 changes: 4 additions & 3 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ The default is `sensitive`, the safer setting of the two.

Itchcraft supports the following environment variable:

`DEBUG`
`ITCHCRAFT_DEBUG`
: If set to a non-zero value, causes Itchcraft to enable debug-level
: logging. Also decreases some retry counters and prints stack traces
: for errors where it normally wouldn’t.
: logging.
: Also decreases some retry counters and prints stack traces for errors
: where it normally would not.

# Monitoring the bite healer’s state once activated

Expand Down
3 changes: 2 additions & 1 deletion doc/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Itchcraft'
executable_name = 'itchcraft'
author = 'Claudia Pellegrino <[email protected]>'
description = 'Tech demo for interfacing with heat-based USB insect bite healers'

Expand All @@ -30,7 +31,7 @@

man_pages = [(
'index',
project.lower(),
executable_name,
description,
[author],
1,
Expand Down
2 changes: 1 addition & 1 deletion itchcraft/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
PACKAGE_ROOT = Path(__file__).parent.absolute()
PYPROJECT_TOML = PROJECT_ROOT / 'pyproject.toml'

debugMode = bool(os.getenv('DEBUG'))
debugMode = bool(os.getenv('ITCHCRAFT_DEBUG'))

0 comments on commit 5ca04e0

Please sign in to comment.