Giter Site home page Giter Site logo

Comments (7)

jacebrowning avatar jacebrowning commented on June 9, 2024

Git does not follow symlinks

Can you expand on this a bit? If you attempt to use soft links for you use case, what happens?

Suggested implementation

Initially, my thought was something like this:

...
links:
      - source: doc
        target: vendor/doc/gitman
        type: hard

or this:

...
links:
      - source: doc
        target: vendor/doc/gitman
        symbolic: false

from gitman.

dxlr8r avatar dxlr8r commented on June 9, 2024

Git does not follow symlinks

Can you expand on this a bit? If you attempt to use soft links for you use case, what happens?

Git in general does not follow symlinks, for git, a symlink is a regular file. And if the directory/file it points to is in .gitignore, it will be copied in it's broken (pointing to a non existing directory/file) state.

Suggested implementation

Initially, my thought was something like this:

...
links:
      - source: doc
        target: vendor/doc/gitman
        type: hard

or this:

...
links:
      - source: doc
        target: vendor/doc/gitman
        symbolic: false

Seems good to me. The important part is the feature itself :)

from gitman.

jacebrowning avatar jacebrowning commented on June 9, 2024

Most likely this function will need an additional parameter if someone wants to work on a proposal.

from gitman.

dxlr8r avatar dxlr8r commented on June 9, 2024

Not an experience Python programmer myself, but I can take a look at it. First, how do I get started? I want to import shell.py to get access to functions mkdir, call etc. but I seem to be unable to do this. I could not find developer documentation either.

from gitman.

dxlr8r avatar dxlr8r commented on June 9, 2024

Trying to build following instructions https://gitman.readthedocs.io/en/latest/about/contributing/#installation , from my virtual environment:

(mygitman) sBook github/gitman % make all
poetry run isort gitman tests
('Configuration file exists at /Users/simen/Library/Application Support/pypoetry, reusing this directory.\n\nConsider moving TOML configuration files to /Users/simen/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.',)
poetry run black gitman tests
('Configuration file exists at /Users/simen/Library/Application Support/pypoetry, reusing this directory.\n\nConsider moving TOML configuration files to /Users/simen/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.',)

poetry run mypy gitman tests --config-file=.mypy.ini
('Configuration file exists at /Users/simen/Library/Application Support/pypoetry, reusing this directory.\n\nConsider moving TOML configuration files to /Users/simen/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.',)
Success: no issues found in 34 source files
poetry run pylint gitman tests --rcfile=.pylint.ini
('Configuration file exists at /Users/simen/Library/Application Support/pypoetry, reusing this directory.\n\nConsider moving TOML configuration files to /Users/simen/Library/Application Support/pypoetry, as support for the legacy directory will be removed in an upcoming release.',)
Traceback (most recent call last):
  File "/Users/simen/projects/private/github/gitman/mygitman/bin/pylint", line 4, in <module>
    run_pylint()
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/__init__.py", line 22, in run_pylint
    PylintRun(sys.argv[1:])
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/lint/run.py", line 349, in __init__
    linter.check(args)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 862, in check
    self._check_files(
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 896, in _check_files
    self._check_file(get_ast, check_astroid_module, name, filepath, modname)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 922, in _check_file
    check_astroid_module(ast_node)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 1054, in check_astroid_module
    retval = self._check_astroid_module(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 1099, in _check_astroid_module
    walker.walk(ast_node)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/utils/ast_walker.py", line 75, in walk
    self.walk(child)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/utils/ast_walker.py", line 75, in walk
    self.walk(child)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/utils/ast_walker.py", line 75, in walk
    self.walk(child)
  [Previous line repeated 1 more time]
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/utils/ast_walker.py", line 72, in walk
    callback(astroid)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/checkers/base.py", line 782, in visit_call
    self._check_inferred_class_is_abstract(inferred, node)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/checkers/base.py", line 799, in _check_inferred_class_is_abstract
    abstract_methods = _has_abstract_methods(inferred)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/checkers/base.py", line 386, in _has_abstract_methods
    return len(utils.unimplemented_abstract_methods(node)) > 0
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/checkers/utils.py", line 825, in unimplemented_abstract_methods
    inferred = safe_infer(obj)
               ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/pylint/checkers/utils.py", line 1143, in safe_infer
    value = next(infer_gen)
            ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 132, in raise_if_nothing_inferred
    yield next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 96, in wrapped
    res = next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/bases.py", line 136, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 132, in raise_if_nothing_inferred
    yield next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 96, in wrapped
    res = next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/inference.py", line 227, in infer_call
    for callee in self.func.infer(context):
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 132, in raise_if_nothing_inferred
    yield next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 96, in wrapped
    res = next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/bases.py", line 136, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 132, in raise_if_nothing_inferred
    yield next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 96, in wrapped
    res = next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/bases.py", line 136, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 132, in raise_if_nothing_inferred
    yield next(generator)
          ^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/decorators.py", line 93, in wrapped
    generator = _func(node, context, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/inference.py", line 273, in infer_import_from
    module = self.do_import_module()
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/mixins.py", line 99, in do_import_module
    return mymodule.import_module(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/scoped_nodes.py", line 642, in import_module
    return MANAGER.ast_from_module_name(absmodname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/manager.py", line 189, in ast_from_module_name
    return self.ast_from_file(found_spec.location, modname, fallback=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/manager.py", line 98, in ast_from_file
    return AstroidBuilder(self).file_build(filepath, modname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/builder.py", line 137, in file_build
    module = self._data_build(data, modname, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/builder.py", line 191, in _data_build
    module = builder.visit_module(node, modname, node_file, package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/rebuilder.py", line 113, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/rebuilder.py", line 113, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/rebuilder.py", line 125, in visit
    return visit_method(node, parent)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/rebuilder.py", line 633, in visit_functiondef
    return self._visit_functiondef(nodes.FunctionDef, node, parent)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/rebuilder.py", line 623, in _visit_functiondef
    body=[self.visit(child, newnode) for child in node.body],
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/rebuilder.py", line 623, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/simen/projects/private/github/gitman/mygitman/lib/python3.11/site-packages/astroid/rebuilder.py", line 123, in visit
    visit_method = getattr(self, visit_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TreeRebuilder' object has no attribute 'visit_match'. Did you mean: 'visit_with'?
make: *** [check] Error 1
Exit: 2
(mygitman) sBook github/gitman %

from gitman.

dxlr8r avatar dxlr8r commented on June 9, 2024

I gave up using macOS, so tried using Debian Bookworm. Sadly got many of the same issues as I did with macOS. I found some references to that Python 3.11 was too new etc. so I installed pyenv in Debian, and found Python 3.8.17 working perfectly.

Now the make commands actually work.

And the code is done as well. I am not a Python developer, and could not wrap my head around the test framework though, but except for that everything should be in place and working.

from gitman.

dxlr8r avatar dxlr8r commented on June 9, 2024

#310

from gitman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.