Giter Club home page Giter Club logo

Comments (4)

nicoddemus avatar nicoddemus commented on June 7, 2024

Hi @xiamubobby,

I've edited the original post to use inline permalink to the code, but I'm not sure about the second part. Do you mean you are having trouble specifying ConfigArgParse==0.15.2 in your devenv.yml file?

from conda-devenv.

nicoddemus avatar nicoddemus commented on June 7, 2024

Oh OK I get it:

Traceback (most recent call last):
  File "W:\Miniconda3\Scripts\conda-devenv-script.py", line 9, in <module>
    sys.exit(main())
  File "W:\Miniconda3\lib\site-packages\conda_devenv\devenv.py", line 562, in main
    conda_yaml_dict, environment = load_yaml_dict(filename)
  File "W:\Miniconda3\lib\site-packages\conda_devenv\devenv.py", line 251, in load_yaml_dict
    merged_dict = merge(all_yaml_dicts.values())
  File "W:\Miniconda3\lib\site-packages\conda_devenv\devenv.py", line 181, in merge
    merge_dependencies_version_specifications(final_dict, key_to_merge='dependencies')
  File "W:\Miniconda3\lib\site-packages\conda_devenv\devenv.py", line 210, in merge_dependencies_version_specifications
    ' expected format.'.format(dep))
RuntimeError: The package version specification "ConfigArgParse==0.15.2" do not follow the expected format.

The problem is that some letters on the package specification are capitalized, and the regex does not account for that. I've updated the title better describing the issue.

I think conda-devenv should account for capitalized characters (probably by ignoring case during matching).

As a workaround, you can just change the package names to all lower case:

name: footest
dependencies:
  - configargparse==0.15.2

from conda-devenv.

xiamubobby avatar xiamubobby commented on June 7, 2024

Hi Nicodemus,

The company is blocking POST requests towards GitHub thus please ignore the spelling mistakes I've made and about to make, because I'm using OCR for this... Apologies for that.

Thank you for the quick reaction indeed.
I understand that switching the matching mode to IGNORE_CASE stops the devenv files from not being able to parsed.

Still the work around I have not yet got it clearly.
By lower the package name sure conda-devenv will never complain about the problem reported as above. But will it be even possible to resolve that dependency later?
I assume not, because pip is managing packages in a case sensitive way.

Worth mentioning that the mentioned package above: ConfigArgParse is not my work but one of my expected dependencies. So I can't actually change its naming convention in PyPI.

Last but not least, thanks much for the awesome project. I'm definitely taking it anyway no matter the blocker since it solves the big problem that no one else does, especially not by Anaconda itself.

It's just for now I'm doing the hack the old way: luckily ConfigArgParse is a single script module, so I duplicated the code literals into my project.
I would definitely prefer a better solution/work around, but I think what you have suggested might not even be working anyway. Please correct me if I'm wrong.
Thanks again.

from conda-devenv.

nicoddemus avatar nicoddemus commented on June 7, 2024

Hi Nicodemus,

The company is blocking POST requests towards GitHub thus please ignore the spelling mistakes I've made and about to make, because I'm using OCR for this... Apologies for that.

Thank you for the quick reaction indeed.
I understand that switching the matching mode to IGNORE_CASE stops the devenv files from not being able to parsed.

Still the work around I have not yet got it clearly.
By lower the package name sure conda-devenv will never complain about the problem reported as above. But will it be even possible to resolve that dependency later?
I assume not, because pip is managing packages in a case sensitive way.

Actually conda-devenv just acts as a preprocessor, after that it just calls conda env with the resulting file (which can be inspected later).

I believe case is ignored anyway by conda and pip:

λ pip install configargparse
Collecting configargparse
  Downloading https://files.pythonhosted.org/packages/ee/e2/d392af39dfe241e9fa5e9830ea1f00c077c7ae1dd6ede97cba06404c66fb/ConfigArgParse-0.15.2.tar.gz
Installing collected packages: configargparse
    Running setup.py install for configargparse ... done
Successfully installed configargparse-0.15.2

λ pip list
Package            Version              Location
------------------ -------------------- -------------------------
atomicwrites       1.3.0
attrs              19.3.0
colorama           0.4.3
ConfigArgParse     0.15.2
...

Last but not least, thanks much for the awesome project. I'm definitely taking it anyway no matter the blocker since it solves the big problem that no one else does, especially not by Anaconda itself.

Thanks! We have created it at ESSS for exactly those missing functionalities. 👍

It's just for now I'm doing the hack the old way: luckily ConfigArgParse is a single script module, so I duplicated the code literals into my project.
I would definitely prefer a better solution/work around, but I think what you have suggested might not even be working anyway. Please correct me if I'm wrong.

I think things should just work, otherwise let us know to see if there's a solution/workaround.

from conda-devenv.

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.