Skip to content

Commit

Permalink
Merge pull request #2 from climatepolicyradar/feature/pdct-1395-fix-t…
Browse files Browse the repository at this point in the history
…runk-issues

Feature/pdct 1395 fix trunk issues
  • Loading branch information
katybaulch authored Aug 27, 2024
2 parents e1ce595 + dc42f07 commit 56fd60f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
###############################################################################

# Ignore the following SHAs
b7a8a627a80864f03a4e58ce05bb4fc05eb749b4
2 changes: 1 addition & 1 deletion .trunk/configs/bandit.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://bandit.readthedocs.io/en/latest/config.html
exclude_dirs: ["unit_tests", "integration_tests", "test", "tests"]
exclude_dirs: [unit_tests, integration_tests, test, tests]
5 changes: 4 additions & 1 deletion .trunk/configs/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
"pytest",
"dotenv",
"virtualenvs",
"PYTHONPATH"
"PYTHONPATH",
"markdownlint",
"shellcheck",
"SCRIPTDIR"
],
"flagWords": ["hte"],
"suggestionsTimeout": 5000
Expand Down
2 changes: 2 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ lint:
# Hadolint seems to have excessive memory use on Mac.
# Disable until we can investigate further.
- hadolint

definitions:
- name: bandit
direct_configs: [bandit.yaml]
Expand All @@ -39,6 +40,7 @@ lint:
- linters: [cspell]
paths:
- .trunk/configs/cspell.json
- .gitignore

enabled:
- [email protected]
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

A CLI tool to map the GCF data to the required JSON format for bulk-import.

- _Developers_ please read the [DEVELOPERS.md](DEVELOPERS.md) file for more information.
- _Developers_ please read the [DEVELOPERS.md](DEVELOPERS.md) file for more
information.

- This tool is designed to map this [GCF data](https://drive.google.com/drive/folders/1FBia9JzpdaCjRe7M7-pgh3Ahl9_MReh_)

## Installation

This package is not available on PyPI. To install it, you need to build the package and install it locally.
This package is not available on PyPI. To install it, you need to build the
package and install it locally.

```bash
make build # Ensure you have the package built
Expand Down
3 changes: 1 addition & 2 deletions gcf_data_mapper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

__version__ = '0.1.0'
__version__ = "0.1.0"
10 changes: 6 additions & 4 deletions gcf_data_mapper/cli.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import click


@click.command()
@click.option('--name', required=True, help='The name to greet.')
@click.version_option('0.1.0', '--version', '-v', help='Show the version and exit.')
@click.option("--name", required=True, help="The name to greet.")
@click.version_option("0.1.0", "--version", "-v", help="Show the version and exit.")
def greet(name):
"""Simple program that greets NAME."""
click.echo(f'Hello {name}!')
click.echo(f"Hello {name}!")


if __name__ == '__main__':
if __name__ == "__main__":
greet()
7 changes: 4 additions & 3 deletions tests/unit_tests/test_say_hi.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

from click.testing import CliRunner

from gcf_data_mapper.cli import greet


def test_greet():
runner = CliRunner()
result = runner.invoke(greet, ['--name', 'World'])
result = runner.invoke(greet, ["--name", "World"])
assert result.exit_code == 0
assert result.output.strip() == 'Hello World!'
assert result.output.strip() == "Hello World!"

0 comments on commit 56fd60f

Please sign in to comment.