Skip to content

Commit 6b6e513

Browse files
author
Mike
committed
Update requirements.txt
Publish with GH Actions
1 parent f62598c commit 6b6e513

File tree

11 files changed

+48
-32
lines changed

11 files changed

+48
-32
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Get history and tags for SCM versioning to work
14+
run: |
15+
git fetch --prune --unshallow
16+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install --upgrade tox-gh-actions
25+
- name: Publish with tox and twine
26+
env:
27+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
29+
run: |
30+
tox -e publish

.github/workflows/run-python-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
pip install --upgrade -r test-requirements.txt
2827
pip install --upgrade tox-gh-actions
2928
- name: Test with tox/pytest
3029
run: |

MANIFEST.in

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/main.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ relative to your working directory at **config/project\_configuration.yml** whic
240240
configuration is used for any configuration specific to your project.
241241

242242
The default logging configuration reads a configuration file internal to the library that sets up an coloured console
243-
handler outputting at DEBUG level and a file handler writing to errors.log at ERROR level.
243+
handler outputting at INFO level and a file handler writing to errors.log at ERROR level.
244244

245245
## Facades
246246

@@ -332,7 +332,8 @@ If not using facade:
332332
from hdx.utilities.easy_logging import setup_logging
333333
...
334334
logger = logging.getLogger(__name__)
335-
setup_logging(error_file=True)
335+
setup_logging(console_log_level="DEBUG", log_file="output.log",
336+
file_log_level="INFO")
336337

337338
To use logging in your files, simply add the line below to the top of each Python file:
338339

pyproject.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[build-system]
2-
requires = [ "setuptools", "wheel"]
2+
requires = [ "setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
33
build-backend = "setuptools.build_meta"
44

5+
[tool.setuptools_scm]
6+
write_to = "src/hdx/api/_version.py"
7+
local_scheme = "no-local-version"
8+
version_scheme = "python-simplified-semver"
9+
510
[tool.black]
611
line-length = 79
712

@@ -16,6 +21,7 @@ format = "grouped"
1621
max_line_length = 79
1722
# show line of source code in output
1823
show_source = true
24+
exclude = ["_version.py"]
1925

2026
# list of plugins and rules for them
2127
[tool.flakeheaven.plugins]
@@ -28,6 +34,7 @@ show_source = true
2834

2935
[tool.pytest.ini_options]
3036
pythonpath = "src"
37+
addopts = "--color=yes"
3138
log_cli = 1
3239

3340
[tool.coverage.paths]
@@ -165,11 +172,10 @@ commands =
165172
166173
[testenv:publish]
167174
wheel_build_env = py310
168-
passenv = SSH_AUTH_SOCK
175+
passenv = SSH_AUTH_SOCK TWINE_USERNAME TWINE_PASSWORD
169176
deps =
170177
twine
171178
172179
commands =
173-
python -c \"from hdx.utilities.wheel import git_tag_whl; git_tag_whl('{distdir}')\"
174180
twine upload {distdir}/*
175181
"""

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ckanapi==4.6
2-
hdx-python-country==3.1.0
2+
hdx-python-country==3.1.1
33
ndg-httpsclient==0.5.1
44
pyasn1==0.4.8
55
pyOpenSSL==22.0.0

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ python_requires = >=3.6
4343

4444
install_requires =
4545
ckanapi >= 4.6
46-
hdx-python-country>=3.1.0
46+
hdx-python-country>=3.1.1
4747
ndg-httpsclient
4848
pyasn1
4949
pyOpenSSL

src/hdx/api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "5.5.5"
1+
from ._version import version as __version__ # noqa: F401

src/hdx/facades/keyword_arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from hdx.api.configuration import Configuration
1010

1111
logger = logging.getLogger(__name__)
12-
setup_logging(error_file=True)
12+
setup_logging(log_file="errors.log")
1313

1414

1515
def facade(projectmainfn: Callable[[Any], None], **kwargs: Any):

src/hdx/facades/simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from hdx.api.configuration import Configuration
1010

1111
logger = logging.getLogger(__name__)
12-
setup_logging(error_file=True)
12+
setup_logging(log_file="errors.log")
1313

1414

1515
def facade(projectmainfn: Callable[[None], None], **kwargs: Any):

0 commit comments

Comments
 (0)