Skip to content

Commit

Permalink
Merge pull request #1 from MountainField/v6
Browse files Browse the repository at this point in the history
feat: add python package structure
  • Loading branch information
nogayama authored Dec 15, 2023
2 parents 29f260d + 5d23009 commit b30ea0e
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,10 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

tmp
.vscode
dev
tmp_old

.DS_Store
5 changes: 4 additions & 1 deletion README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@



[Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)



## Getting Started
Expand All @@ -12,6 +14,7 @@

```sh
$ pip3 install --upgrade pip wheel
$ python3 -m pip install --upgrade build
```


Expand All @@ -20,7 +23,7 @@ $ pip3 install --upgrade pip wheel

```sh
$ git clone git@github.com:MountainField/dw.git
$ cd mvi-validator
$ cd dw
$ pip3 install -e '.[dev]'
```

Expand Down
6 changes: 6 additions & 0 deletions examples/ex001_hello_dw.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import dw

print(dw.DEFAULT_ENCODING)
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
46 changes: 46 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[metadata]
name = python-dw
version = 0.6.0
author = Takahide Nogayama
author_email = nogayama@gmail.com
description = Data Wrangler (dw)
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/MountainField/dw
project_urls =
Bug Tracker = https://github.com/MountainField/dw/issues
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
install_requires =
openpyxl
# pyyaml



package_dir =
= src
packages = find:
python_requires = >=3.6

[options.extras_require] # in setup.cfg
test =
uspec
PyHamcrest
dev =
uspec
PyHamcrest
yapf

#scripts =
# scripts/dw
[options.entry_points]
console_scripts =
dw = dw:main_cli

[options.packages.find]
where = src

24 changes: 24 additions & 0 deletions src/dw/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-

# =================================================================
# dw
#
# Copyright (c) 2022 Takahide Nogayama
#
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
# =================================================================

__version__ = "0.6.0"

import logging as _logging
import sys as _sys

# Logger
_LOGGER: _logging.Logger = _logging.getLogger(__name__)
_LOG_FORMAT: str = '%(asctime)s | %(levelname)-7s | %(message)s (%(filename)s L%(lineno)s %(name)s)'

DEFAULT_ENCODING = "utf-8"

if __name__ == "__main__":
_logging.basicConfig(stream=_sys.stderr, format=_LOG_FORMAT, level=_logging.WARNING)

0 comments on commit b30ea0e

Please sign in to comment.