Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does "move it into a 'librtd/' subdirectory" mean? #804

Open
Benjamin-Lee opened this issue May 26, 2020 · 9 comments
Open

What does "move it into a 'librtd/' subdirectory" mean? #804

Benjamin-Lee opened this issue May 26, 2020 · 9 comments

Comments

@Benjamin-Lee
Copy link

I'm getting the incorrect package structure warning. Its well written, but there is an ambiguous phrase. My directory structure looks like this:

.
├── README.md
├── librtd
│   ├── __init__.py
│   ├── cli.nim
│   ├── cli_wrapper.py
│   └── librtd.nim
├── librtd.nimble
├── setup.py
├── test.fasta
└── tests
    ├── config.nims
    ├── tests.cpython-37m-darwin.so
    └── tests.nim

The entire directory for the project (tests and all) is entitled librtd. Thus, the warning message could mean:

  1. Move it into a subdirectory of librtd/librtd like librtd/librtd/cli/cli.nim.
  2. Move it into the subdirectory librtd/librtd.
  3. Move it into librtd/ (same level as librtd.nimble).

Which is it?

@Benjamin-Lee
Copy link
Author

Additionally, I am still receiving the warning even after adding skipFiles = @["cli.nim"] to the .nimble file

@Benjamin-Lee
Copy link
Author

For reference, here's the code I'm working on: https://github.com/Lab41/librtd/tree/python

@dom96
Copy link
Collaborator

dom96 commented Jun 12, 2020

You've deleted the branch so I can't see it now. Hard to say without seeing the .nimble file and the exact message you got. Did you manage to get it fixed?

@genotrance
Copy link
Contributor

@Benjamin-Lee ping

@Benjamin-Lee
Copy link
Author

Still having the same issue after a restructuring. Here's the link to the main repo and here's the current structure:

├─ .github
│  └─ workflows
│     ├─ ci.yml
│     └─ release.yml
├─ benchmarks
│  ├─ .gitignore
│  ├─ benchmark.py
│  └─ requirements.txt
├─ librtd-py
│  ├─ librtdpy
│  │  ├─ librtdpy.nim
│  │  └─ librtdpy.nimble
│  ├─ cli.nim
│  ├─ cli_wrapper.py
│  ├─ librtd.py
│  ├─ setup.py
│  └─ test_output.fasta
├─ librtd
│  ├─ tests
│  │  └─ tests.nim
│  ├─ librtd.nim
│  └─ librtd.nimble
├─ .flake8
├─ .gitignore
├─ LICENSE
├─ README.md
└─ test.fasta

Within the librtd subdirectory, when installing I still get this error:

~/D/P/R/l/librtd ❯❯❯ nimble install -y
   Warning: Package 'librtd' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'librtd', but file 'tests.nim' is in a directory named 'tests' instead. This will be an error in the future.
      Hint: If 'tests' contains source files for building 'librtd', rename it to 'librtd'. Otherwise, prevent its installation by adding `skipDirs = @["tests"]` to the .nimble file.
  Verifying dependencies for librtd@0.0.1
      Info: Dependency on progress@>= 1.1.1 already satisfied
  Verifying dependencies for progress@1.1.1
 Installing librtd@0.0.1
    Prompt: librtd@0.0.1 already exists. Overwrite? -> [forced yes]
   Success: librtd installed successfully.

Here's what my .nimble file looks like:

# Package

version       = "0.0.1"
author        = "Benjamin Lee"
description   = "Generalized k-mer return time distribution calculation"
license       = "Apache-2.0"
skipDirs      = @["tests"]
installExt    = @["nim"]


# Dependencies

requires "nim >= 1.0.4"
requires "progress >= 1.1.1"

@dom96
Copy link
Collaborator

dom96 commented Aug 26, 2020

Hm, this may be a bug. If you remove the installExt = @["nim"] (which is redundant btw) it works. But it should work with it too I think.

@Benjamin-Lee
Copy link
Author

There's another strange thing happening. Take a look:

~/D/P/R/l/librtd ❯❯❯ cat librtd.nimble
# Package

version       = "0.0.1"
author        = "Benjamin Lee"
description   = "Generalized k-mer return time distribution calculation"
license       = "Apache-2.0"
skipDirs      = @["tests"]
installExt    = @["nim"]


# Dependencies

requires "nim >= 1.0.4"
requires "progress >= 1.1.1"⏎                                                                                                                  ~/D/P/R/l/librtd ❯❯❯ nimble install -y
   Warning: Package 'librtd' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'librtd', but file 'tests.nim' is in a directory named 'tests' instead. This will be an error in the future.
      Hint: If 'tests' contains source files for building 'librtd', rename it to 'librtd'. Otherwise, prevent its installation by adding `skipDirs = @["tests"]` to the .nimble file.
  Verifying dependencies for librtd@0.0.1
      Info: Dependency on progress@>= 1.1.1 already satisfied
  Verifying dependencies for progress@1.1.1
 Installing librtd@0.0.1
    Prompt: librtd@0.0.1 already exists. Overwrite? -> [forced yes]
   Success: librtd installed successfully.
~/D/P/R/l/librtd ❯❯❯ cat librtd.nimble
# Package

version       = "0.0.1"
author        = "Benjamin Lee"
description   = "Generalized k-mer return time distribution calculation"
license       = "Apache-2.0"
skipDirs      = @["tests"]


# Dependencies

requires "nim >= 1.0.4"
requires "progress >= 1.1.1"⏎                                                                                                                  ~/D/P/R/l/librtd ❯❯❯ nimble install -y
  Verifying dependencies for librtd@0.0.1
      Info: Dependency on progress@>= 1.1.1 already satisfied
  Verifying dependencies for progress@1.1.1
 Installing librtd@0.0.1
    Prompt: librtd@0.0.1 already exists. Overwrite? -> [forced yes]
   Warning: Package 'librtd' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'librtd', but file 'tests.nim' is in a directory named 'tests' instead. This will be an error in the future.
      Hint: If 'tests' contains source files for building 'librtd', rename it to 'librtd'. Otherwise, prevent its installation by adding `skipDirs = @["tests"]` to the .nimble file.
   Success: librtd installed successfully.
~/D/P/R/l/librtd ❯❯❯ nimble install -y
  Verifying dependencies for librtd@0.0.1
      Info: Dependency on progress@>= 1.1.1 already satisfied
  Verifying dependencies for progress@1.1.1
 Installing librtd@0.0.1
    Prompt: librtd@0.0.1 already exists. Overwrite? -> [forced yes]
   Success: librtd installed successfully.

When I reinstall as usual (with installExt) I get the warning. Removing the installExt and then reinstalling still produces the warning but this time at the end. Reinstalling again without installExt removes the warning.

A fresh install (after uninstalling the lib) produces no warning when installExt is removed.

@Benjamin-Lee
Copy link
Author

Might it be a good idea to rename this issue to more clearly reflect what the issue is?

@dom96
Copy link
Collaborator

dom96 commented Aug 26, 2020

A fresh install (after uninstalling the lib) produces no warning when installExt is removed.

That's because you get the warning about the installed library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants