Skip to content

Commit

Permalink
Merge pull request ESCOMP#12 from jedwards4b/poetry_cleanup
Browse files Browse the repository at this point in the history
Poetry cleanup
  • Loading branch information
jedwards4b authored Feb 5, 2024
2 parents 461ee4b + e7fdd39 commit 80f419d
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Welcome to git-fleximod's documentation!
:caption: Contents:
.. module:: sphinxcontrib.autoprogram
.. sphinx_argparse_cli::
:module: classes.cli
:module: git_fleximod.cli
:func: get_parser
:prog: git-fleximod

Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/classes/cli.py → git_fleximod/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

__version__ = "0.5.0"


def find_root_dir(filename=".git"):
d = Path.cwd()
root = Path(d.root)
Expand Down
12 changes: 6 additions & 6 deletions src/git-fleximod → git_fleximod/git-fleximod.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import shutil
import logging
import textwrap
from classes import utils
from classes import cli
from classes.gitinterface import GitInterface
from classes.gitmodules import GitModules
from git_fleximod import utils
from git_fleximod import cli
from git_fleximod.gitinterface import GitInterface
from git_fleximod.gitmodules import GitModules
from configparser import NoOptionError

# logger variable is global
Expand Down Expand Up @@ -343,7 +343,7 @@ def submodules_test(gitmodules, root_dir):
return testfails + localmods


def _main_func():
def main():
(
root_dir,
file_name,
Expand Down Expand Up @@ -393,4 +393,4 @@ def _main_func():


if __name__ == "__main__":
sys.exit(_main_func())
sys.exit(main())
3 changes: 1 addition & 2 deletions src/classes/gitinterface.py → git_fleximod/gitinterface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
from classes import utils

from . import utils

class GitInterface:
def __init__(self, repo_path, logger):
Expand Down
2 changes: 1 addition & 1 deletion src/classes/gitmodules.py → git_fleximod/gitmodules.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import shutil
from configparser import ConfigParser
from classes.lstripreader import LstripReader
from .lstripreader import LstripReader


class GitModules(ConfigParser):
Expand Down
File renamed without changes.
File renamed without changes.
19 changes: 10 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ readme = "README.md"
homepage = "https://github.com/jedwards4b/git-fleximod"
keywords = ["git", "submodule", "sparse-checkout"]
packages = [
{ include = "src/git-fleximod" },
{ include = "src/classes/*.py" },
{ include = "License" },
{ include = "tests" },
{ include = "doc/*.rst" },
{ include = "doc/Makefile" },
{ include = "doc/make.bat" },
{ include = "doc/conf.py" },
{ include = "git_fleximod"},
{ include = "doc"},
]

[tool.poetry.scripts]
git-fleximod = "git_fleximod.git-fleximod:main"
fsspec = "fsspec.fuse:main"

[tool.poetry.dependencies]
python = "^3.8"
GitPython = "^3.1.0"
sphinx = "^5.0.0"
fsspec = "^2023.12.2"
wheel = "^0.42.0"

[tools.poetry.urls]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/jedwards4b/git-fleximod/issues"

[build-system]
Expand Down
Empty file removed src/classes/__init__.py
Empty file.
9 changes: 4 additions & 5 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# pylint: disable=unused-import
from classes import utils
from classes.gitinterface import GitInterface
from classes.gitmodules import GitModules
from classes.version import __version__

from git_fleximod import cli
from git_fleximod import utils
from git_fleximod.gitinterface import GitInterface
from git_fleximod.gitmodules import GitModules

def test_import():
print("here")

0 comments on commit 80f419d

Please sign in to comment.