Skip to content

Commit

Permalink
DEV 2863 standardize structure (#292)
Browse files Browse the repository at this point in the history
* use setup.cfg

* add pyproject.toml

* move bin/gdc-client -> src/gdc_client/cli.py

* fix console_scripts

---------

Co-authored-by: Rowland Ogwara <[email protected]>
  • Loading branch information
qqiao2024 and kulgan authored Jul 29, 2024
1 parent 8d96475 commit 0bcfbcb
Show file tree
Hide file tree
Showing 51 changed files with 171 additions and 99 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ include:
file:
- templates/artifacts/python-library.yaml

variables:
LANGUAGE_VERSION: python3.8

tox:
parallel:
Expand Down
4 changes: 2 additions & 2 deletions bin/package
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ cd ..
python -m pip install --upgrade pip
python -m pip install --no-deps -r requirements.txt
python -m pip install --no-deps .
python setup.py install

# go back go the ./gdc_client/bin dir
cd bin
Expand All @@ -100,7 +99,8 @@ pyinstaller \
--noconfirm \
--onefile \
--copy-metadata gdc-client \
-c gdc-client
--name gdc-client \
-c ../src/gdc_client/cli.py

echo "Testing produced binary..."
./dist/$BINARY_NAME --help
Expand Down
14 changes: 0 additions & 14 deletions dev-requirements.in

This file was deleted.

80 changes: 46 additions & 34 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile dev-requirements.in
# pip-compile --extra=dev --output-file=dev-requirements.txt
#
atomicwrites==1.4.1
# via pytest
attrs==22.1.0
# via pytest
aws-sam-translator==1.11.0
# via
# -r dev-requirements.in
# cfn-lint
# gdc-client (pyproject.toml)
aws-xray-sdk==2.11.0
# via moto
boto==2.49.0
Expand All @@ -27,31 +27,26 @@ botocore==1.19.63
# moto
# s3transfer
certifi==2024.7.4
# via
# -c requirements.txt
# requests
# via requests
cffi==1.15.1
# via
# -c requirements.txt
# cryptography
# via cryptography
cfn-lint==0.21.6
# via
# -r dev-requirements.in
# gdc-client (pyproject.toml)
# moto
chardet==3.0.4
# via
# -c requirements.txt
# requests
# via requests
click==8.1.7
# via
# -r dev-requirements.in
# flask
coverage==5.5
# gdc-client (pyproject.toml)
coverage[toml]==7.6.0
# via pytest-cov
cryptography==43.0.0
# via
# -c requirements.txt
# gdc-client (pyproject.toml)
# moto
# pyopenssl
# python-jose
# sshpubkeys
docker==4.4.4
Expand All @@ -62,18 +57,19 @@ ecdsa==0.14.1
# python-jose
# sshpubkeys
flask==1.0.4
# via -r dev-requirements.in
# via gdc-client (pyproject.toml)
httmock==1.3.0
# via -r dev-requirements.in
# via gdc-client (pyproject.toml)
idna==2.8
# via
# -c requirements.txt
# moto
# requests
importlib-metadata==7.0.1
# via
# -c requirements.txt
# gdc-client (pyproject.toml)
# pytest
intervaltree==3.0.2
# via gdc-client (pyproject.toml)
itsdangerous==1.1.0
# via flask
jinja2==2.11.3
Expand All @@ -92,9 +88,11 @@ jsonpointer==2.3
# via jsonpatch
jsonschema==2.6.0
# via
# -c requirements.txt
# aws-sam-translator
# cfn-lint
# gdc-client (pyproject.toml)
lxml==4.4.3
# via gdc-client (pyproject.toml)
markupsafe==1.1.1
# via
# jinja2
Expand All @@ -106,56 +104,65 @@ more-itertools==8.14.0
# moto
# pytest
moto==1.3.16
# via -r dev-requirements.in
# via gdc-client (pyproject.toml)
ndg-httpsclient==0.5.1
# via gdc-client (pyproject.toml)
packaging==20.9
# via pytest
pluggy==0.13.1
# via pytest
progressbar2==4.4.2
# via gdc-client (pyproject.toml)
py==1.11.0
# via pytest
pyasn1==0.4.8
# via
# -c requirements.txt
# gdc-client (pyproject.toml)
# ndg-httpsclient
# python-jose
# rsa
pycparser==2.21
# via cffi
pyopenssl==24.2.1
# via
# -c requirements.txt
# cffi
# gdc-client (pyproject.toml)
# ndg-httpsclient
pyparsing==2.4.7
# via packaging
pytest==4.6.2
# via
# -r dev-requirements.in
# gdc-client (pyproject.toml)
# pytest-cov
pytest-cov==2.7.1
# via -r dev-requirements.in
pytest-cov==5.0.0
# via gdc-client (pyproject.toml)
python-dateutil==2.8.2
# via
# botocore
# moto
python-jose[cryptography]==3.2.0
# via
# -r dev-requirements.in
# gdc-client (pyproject.toml)
# moto
python-utils==3.8.2
# via progressbar2
pytz==2022.7.1
# via moto
pyyaml==5.3.1
# via
# -c requirements.txt
# cfn-lint
# gdc-client (pyproject.toml)
# moto
requests==2.22.0
# via
# -c requirements.txt
# cfn-lint
# docker
# gdc-client (pyproject.toml)
# httmock
# moto
# requests-mock
# responses
requests-mock==1.5.2
# via -r dev-requirements.in
# via gdc-client (pyproject.toml)
responses==0.17.0
# via moto
rsa==4.7.2
Expand All @@ -164,7 +171,6 @@ s3transfer==0.3.7
# via boto3
six==1.16.0
# via
# -c requirements.txt
# aws-sam-translator
# cfn-lint
# docker
Expand All @@ -177,11 +183,18 @@ six==1.16.0
# requests-mock
# responses
# websocket-client
sortedcontainers==2.4.0
# via intervaltree
sshpubkeys==3.3.1
# via moto
termcolor==1.1.0
# via gdc-client (pyproject.toml)
tomli==2.0.1
# via coverage
typing-extensions==4.12.2
# via python-utils
urllib3==1.25.11
# via
# -c requirements.txt
# botocore
# requests
# responses
Expand All @@ -199,7 +212,6 @@ xmltodict==0.13.0
# via moto
zipp==3.17.0
# via
# -c requirements.txt
# importlib-metadata
# moto

Expand Down
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "gdc-client"
dynamic = [
"version",
"description",
"readme",
"requires-python",
"license",
"authors",
"maintainers",
"keywords",
"classifiers",
"urls",
"scripts",
"gui-scripts",
"entry-points",
"dependencies",
"optional-dependencies"
]

[tool.coverage.html]
title = "gdc-client coverage report"
directory = "docs/htmlcov"
show_contexts = true

[tool.coverage.run]
branch = true
context = "unit tests"
source = ["gdc_client"]

[tool.isort]
extend_skip = [".md", ".json"]
known_first_party = ["gdc_client"]
py_version = 38
skip = [".gitignore", ".dockerignore"]

[tool.setuptools_scm]
local_scheme = "dirty-tag"
26 changes: 13 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,46 @@ chardet==3.0.4
# via requests
cryptography==43.0.0
# via
# gdc_client (setup.py)
# gdc-client (pyproject.toml)
# pyopenssl
idna==2.8
# via requests
importlib-metadata==7.0.1
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
intervaltree==3.0.2
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
jsonschema==2.6.0
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
lxml==4.4.2
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
ndg-httpsclient==0.5.0
# via gdc_client (setup.py)
progressbar2==3.43.1
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
progressbar2==3.55.0
# via gdc-client (pyproject.toml)
pyasn1==0.4.8
# via
# gdc_client (setup.py)
# gdc-client (pyproject.toml)
# ndg-httpsclient
pycparser==2.21
# via cffi
pyopenssl==24.2.1
# via
# gdc_client (setup.py)
# gdc-client (pyproject.toml)
# ndg-httpsclient
python-utils==2.7.1
# via progressbar2
pyyaml==5.3.1
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
requests==2.22.0
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
six==1.16.0
# via
# progressbar2
# python-utils
sortedcontainers==2.4.0
# via intervaltree
termcolor==1.1.0
# via gdc_client (setup.py)
# via gdc-client (pyproject.toml)
urllib3==1.25.11
# via requests
zipp==3.17.0
Expand Down
Loading

0 comments on commit 0bcfbcb

Please sign in to comment.