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

Fix normalized names #289

Merged

Conversation

frenzymadness
Copy link
Collaborator

Fixes #288

@eganma-umich thanks once more for the report! Could you please take a look at the fix? It also contains test so you can just check the generated files.

@op1st-prow
Copy link

op1st-prow bot commented Oct 30, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from frenzymadness. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@op1st-prow op1st-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 30, 2023
@goern
Copy link
Member

goern commented Oct 31, 2023

/lgtm

@op1st-prow op1st-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2023
@eganma-umich
Copy link

@frenzymadness Will take a look today.

@eganma-umich
Copy link

@frenzymadness

Thanks for the quick response. I've been using a requirements.txt generated using poetry in the meantime, so don't rush to get this fixed on my account.

Tried this out locally. It looks like the top-level dependencies are correctly grouped now, but their dependencies are still being incorrectly grouped.

Copied terminal output for attempt. Started with generating the lock file from the pyproject.toml included in bug report and then tried installing packages in a separate environment with the command used by the s2i builder image.

Generate the lock file from pyproject.toml and confirming test application successfully runs

micropipenv-test % poetry install --without dev --no-root
Creating virtualenv micropipenv-test-nDa1on5v-py3.9 in {/path/to}/Library/Caches/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (0.6s)

Package operations: 13 installs, 0 updates, 0 removals

  • Installing markupsafe (2.1.3)
  • Installing typing-extensions (4.8.0)
  • Installing zipp (3.17.0)
  • Installing blinker (1.6.3)
  • Installing click (8.1.7)
  • Installing importlib-metadata (6.8.0)
  • Installing itsdangerous (2.1.2)
  • Installing jinja2 (3.1.2)
  • Installing mako (1.2.4)
  • Installing sqlalchemy (2.0.22)
  • Installing werkzeug (3.0.1)
  • Installing alembic (1.12.1)
  • Installing flask (3.0.0)

Writing lock file
micropipenv-test % poetry shell
Spawning shell within {/path/to}/Library/Caches/pypoetry/virtualenvs/micropipenv-test-nDa1on5v-py3.9
micropipenv-test % emulate bash -c '. {/path/to}/Library/Caches/pypoetry/virtualenvs/micropipenv-test-nDa1on5v-py3.9/bin/activate'
(micropipenv-test-py3.9) micropipenv-test % which flask
{/path/to}/Library/Caches/pypoetry/virtualenvs/micropipenv-test-nDa1on5v-py3.9/bin/flask
(micropipenv-test-py3.9) micropipenv-test % flask run
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
Press CTRL+C to quit
127.0.0.1 - - [31/Oct/2023 18:09:17] "GET / HTTP/1.1" 200 -
^C%                                                                                                                                                                                                                          
(micropipenv-test-py3.9) micropipenv-test % exit
micropipenv-test % which python
{/path/to}/.pyenv/shims/python

Check out pull request and install in separate environment

micropipenv-test % git clone https://github.com/thoth-station/micropipenv.git                          
Cloning into 'micropipenv'...
remote: Enumerating objects: 1691, done.
remote: Counting objects: 100% (534/534), done.
remote: Compressing objects: 100% (183/183), done.
remote: Total 1691 (delta 379), reused 454 (delta 350), pack-reused 1157
Receiving objects: 100% (1691/1691), 543.49 KiB | 5.38 MiB/s, done.
Resolving deltas: 100% (979/979), done.
micropipenv-test % git -C micropipenv fetch origin pull/289/head:fix_normalized_names
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 28 (delta 15), reused 28 (delta 15), pack-reused 0
Unpacking objects: 100% (28/28), 25.47 KiB | 1.02 MiB/s, done.
From https://github.com/thoth-station/micropipenv
 * [new ref]         refs/pull/289/head -> fix_normalized_names
micropipenv-test % git -C micropipenv checkout fix_normalized_names                  
Switched to branch 'fix_normalized_names'
micropipenv-test % which python
{/path/to}/.pyenv/shims/python
micropipenv-test % python -m venv micropipenv-env
micropipenv-test % . micropipenv-env/bin/activate
(micropipenv-env) micropipenv-test % which python
{/path/to}/junk/micropipenv-test/micropipenv-env/bin/python
(micropipenv-env) micropipenv-test % pip install -e micropipenv       
Obtaining file://{/path/to}/junk/micropipenv-test/micropipenv
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: pip>=9 in ./micropipenv-env/lib/python3.9/site-packages (from micropipenv==1.5.1) (22.0.4)
Building wheels for collected packages: micropipenv
  Building editable for micropipenv (pyproject.toml) ... done
  Created wheel for micropipenv: filename=micropipenv-1.5.1-0.editable-py3-none-any.whl size=10746 sha256=9c945610def7fa9cb1467bc7956605084d2ea1ed34c0b0e89dd3bf2fe1fb6dec
  Stored in directory: /private/var/folders/6b/06439jpd0490fyfmvj8jcz280000gn/T/pip-ephem-wheel-cache-gymr6cda/wheels/b8/88/00/8cdbc5011c5a50ea0f7541c4ac635e2e11f8a1c84a2397d32d
Successfully built micropipenv
Installing collected packages: micropipenv
Successfully installed micropipenv-1.5.1
WARNING: You are using pip version 22.0.4; however, version 23.3.1 is available.
You should consider upgrading via the '{/path/to}/junk/micropipenv-test/micropipenv-env/bin/python -m pip install --upgrade pip' command.
(micropipenv-env) micropipenv-test % which micropipenv
{/path/to}/junk/micropipenv-test/micropipenv-env/bin/micropipenv
(micropipenv-env) micropipenv-test % pip install 'micropipenv[toml]'
Requirement already satisfied: micropipenv[toml] in ./micropipenv-env/lib/python3.9/site-packages (1.5.1)
Requirement already satisfied: pip>=9 in ./micropipenv-env/lib/python3.9/site-packages (from micropipenv[toml]) (22.0.4)
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Installing collected packages: toml
Successfully installed toml-0.10.2
WARNING: You are using pip version 22.0.4; however, version 23.3.1 is available.
You should consider upgrading via the '{/path/to}/junk/micropipenv-test/micropipenv-env/bin/python -m pip install --upgrade pip' command.

Install from poetry lock file and try to run test application, observed exception

(micropipenv-env) micropipenv-test % micropipenv install --deploy   
Warning: Currently, Micropipenv is not able to parse complex Python version specifications used by Poetry. Desired version: ^3.9, current version: 3.9.
---------------------------------- Pipfile.lock ----------------------------------
{
    "_meta": {
        "hash": {
            "sha256": "f3ae2a1caf68b4f108f71769ae428db14562e9154f7c5f409223013f0644e0e8"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.9"
        },
        "sources": [
            {
                "name": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "alembic": {
            "hashes": [
                "sha256:47d52e3dfb03666ed945becb723d6482e52190917fdb47071440cfdba05d92cb",
                "sha256:bca5877e9678b454706347bc10b97cb7d67f300320fa5c3a94423e8266e2823f"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==1.12.1"
        },
        "flask": {
            "hashes": [
                "sha256:21128f47e4e3b9d597a3e8521a329bf56909b690fcc3fa3e477725aa81367638",
                "sha256:cfadcdb638b609361d29ec22360d6070a77d7463dcb3ab08d2c2f2f168845f58"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==3.0.0"
        }
    },
    "develop": {
        "blinker": {
            "hashes": [
                "sha256:296320d6c28b006eb5e32d4712202dbcdcbf5dc482da298c2f44881c43884aaa",
                "sha256:152090d27c1c5c722ee7e48504b02d76502811ce02e1523553b4cf8c8b3d3a8d"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==1.6.3"
        },
        "click": {
            "hashes": [
                "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28",
                "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==8.1.7"
        },
        "colorama": {
            "hashes": [
                "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6",
                "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "markers": "(platform_system == \"Windows\") or (sys_platform == \"win32\")",
            "version": "==0.4.6"
        },
        "exceptiongroup": {
            "hashes": [
                "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3",
                "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "markers": "(python_version < \"3.11\")",
            "version": "==1.1.3"
        },
        "greenlet": {
            "hashes": [
                "sha256:f89e21afe925fcfa655965ca8ea10f24773a1791400989ff32f467badfe4a064",
                "sha256:28e89e232c7593d33cac35425b58950789962011cc274aa43ef8865f2e11f46d",
                "sha256:b8ba29306c5de7717b5761b9ea74f9c72b9e2b834e24aa984da99cbfc70157fd",
                "sha256:19bbdf1cce0346ef7341705d71e2ecf6f41a35c311137f29b8a2dc2341374565",
                "sha256:599daf06ea59bfedbec564b1692b0166a0045f32b6f0933b0dd4df59a854caf2",
                "sha256:b641161c302efbb860ae6b081f406839a8b7d5573f20a455539823802c655f63",
                "sha256:d57e20ba591727da0c230ab2c3f200ac9d6d333860d85348816e1dca4cc4792e",
                "sha256:5805e71e5b570d490938d55552f5a9e10f477c19400c38bf1d5190d760691846",
                "sha256:52e93b28db27ae7d208748f45d2db8a7b6a380e0d703f099c949d0f0d80b70e9",
                "sha256:f7bfb769f7efa0eefcd039dd19d843a4fbfbac52f1878b1da2ed5793ec9b1a65",
                "sha256:91e6c7db42638dc45cf2e13c73be16bf83179f7859b07cfc139518941320be96",
                "sha256:1757936efea16e3f03db20efd0cd50a1c86b06734f9f7338a90c4ba85ec2ad5a",
                "sha256:19075157a10055759066854a973b3d1325d964d498a805bb68a1f9af4aaef8ec",
                "sha256:e9d21aaa84557d64209af04ff48e0ad5e28c5cca67ce43444e939579d085da72",
                "sha256:2847e5d7beedb8d614186962c3d774d40d3374d580d2cbdab7f184580a39d234",
                "sha256:97e7ac860d64e2dcba5c5944cfc8fa9ea185cd84061c623536154d5a89237884",
                "sha256:b2c02d2ad98116e914d4f3155ffc905fd0c025d901ead3f6ed07385e19122c94",
                "sha256:22f79120a24aeeae2b4471c711dcf4f8c736a2bb2fabad2a67ac9a55ea72523c",
                "sha256:100f78a29707ca1525ea47388cec8a049405147719f47ebf3895e7509c6446aa",
                "sha256:60d5772e8195f4e9ebf74046a9121bbb90090f6550f81d8956a05387ba139353",
                "sha256:daa7197b43c707462f06d2c693ffdbb5991cbb8b80b5b984007de431493a319c",
                "sha256:ea6b8aa9e08eea388c5f7a276fabb1d4b6b9d6e4ceb12cc477c3d352001768a9",
                "sha256:8d11ebbd679e927593978aa44c10fc2092bc454b7d13fdc958d3e9d508aba7d0",
                "sha256:dbd4c177afb8a8d9ba348d925b0b67246147af806f0b104af4d24f144d461cd5",
                "sha256:20107edf7c2c3644c67c12205dc60b1bb11d26b2610b276f97d666110d1b511d",
                "sha256:8bef097455dea90ffe855286926ae02d8faa335ed8e4067326257cb571fc1445",
                "sha256:b2d3337dcfaa99698aa2377c81c9ca72fcd89c07e7eb62ece3f23a3fe89b2ce4",
                "sha256:80ac992f25d10aaebe1ee15df45ca0d7571d0f70b645c08ec68733fb7a020206",
                "sha256:337322096d92808f76ad26061a8f5fccb22b0809bea39212cd6c406f6a7060d2",
                "sha256:b9934adbd0f6e476f0ecff3c94626529f344f57b38c9a541f87098710b18af0a",
                "sha256:dc4d815b794fd8868c4d67602692c21bf5293a75e4b607bb92a11e821e2b859a",
                "sha256:41bdeeb552d814bcd7fb52172b304898a35818107cc8778b5101423c9017b3de",
                "sha256:6e6061bf1e9565c29002e3c601cf68569c450be7fc3f7336671af7ddb4657166",
                "sha256:fa24255ae3c0ab67e613556375a4341af04a084bd58764731972bcbc8baeba36",
                "sha256:b489c36d1327868d207002391f662a1d163bdc8daf10ab2e5f6e41b9b96de3b1",
                "sha256:f33f3258aae89da191c6ebaa3bc517c6c4cbc9b9f689e5d8452f7aedbb913fa8",
                "sha256:d2905ce1df400360463c772b55d8e2518d0e488a87cdea13dd2c71dcb2a1fa16",
                "sha256:0a02d259510b3630f330c86557331a3b0e0c79dac3d166e449a39363beaae174",
                "sha256:55d62807f1c5a1682075c62436702aaba941daa316e9161e4b6ccebbbf38bda3",
                "sha256:3fcc780ae8edbb1d050d920ab44790201f027d59fdbd21362340a85c79066a74",
                "sha256:4eddd98afc726f8aee1948858aed9e6feeb1758889dfd869072d4465973f6bfd",
                "sha256:eabe7090db68c981fca689299c2d116400b553f4b713266b130cfc9e2aa9c5a9",
                "sha256:f2f6d303f3dee132b322a14cd8765287b8f86cdc10d2cb6a6fae234ea488888e",
                "sha256:d923ff276f1c1f9680d32832f8d6c040fe9306cbfb5d161b0911e9634be9ef0a",
                "sha256:0b6f9f8ca7093fd4433472fd99b5650f8a26dcd8ba410e14094c1e44cd3ceddd",
                "sha256:990066bff27c4fcf3b69382b86f4c99b3652bab2a7e685d968cd4d0cfc6f67c6",
                "sha256:ce85c43ae54845272f6f9cd8320d034d7a946e9773c693b27d620edec825e376",
                "sha256:89ee2e967bd7ff85d84a2de09df10e021c9b38c7d91dead95b406ed6350c6997",
                "sha256:87c8ceb0cf8a5a51b8008b643844b7f4a8264a2c13fcbcd8a8316161725383fe",
                "sha256:d6a8c9d4f8692917a3dc7eb25a6fb337bff86909febe2f793ec1928cd97bedfc",
                "sha256:9fbc5b8f3dfe24784cee8ce0be3da2d8a79e46a276593db6868382d9c50d97b1",
                "sha256:85d2b77e7c9382f004b41d9c72c85537fac834fb141b0296942d52bf03fe4a3d",
                "sha256:696d8e7d82398e810f2b3622b24e87906763b6ebfd90e361e88eb85b0e554dc8",
                "sha256:329c5a2e5a0ee942f2992c5e3ff40be03e75f745f48847f118a3cfece7a28546",
                "sha256:cf868e08690cb89360eebc73ba4be7fb461cfbc6168dd88e2fbbe6f31812cd57",
                "sha256:ac4a39d1abae48184d420aa8e5e63efd1b75c8444dd95daa3e03f6c6310e9619",
                "sha256:816bd9488a94cba78d93e1abb58000e8266fa9cc2aa9ccdd6eb0696acb24005b"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "markers": "(platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")",
            "version": "==3.0.1"
        },
        "importlib-metadata": {
            "hashes": [
                "sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb",
                "sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "markers": "(python_version < \"3.10\")",
            "version": "==6.8.0"
        },
        "iniconfig": {
            "hashes": [
                "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374",
                "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==2.0.0"
        },
        "itsdangerous": {
            "hashes": [
                "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44",
                "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==2.1.2"
        },
        "jinja2": {
            "hashes": [
                "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61",
                "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==3.1.2"
        },
        "mako": {
            "hashes": [
                "sha256:c97c79c018b9165ac9922ae4f32da095ffd3c4e6872b45eded42926deea46818",
                "sha256:d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==1.2.4"
        },
        "markupsafe": {
            "hashes": [
                "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa",
                "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57",
                "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f",
                "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52",
                "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00",
                "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6",
                "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779",
                "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7",
                "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431",
                "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559",
                "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c",
                "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575",
                "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee",
                "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2",
                "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9",
                "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc",
                "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9",
                "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac",
                "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb",
                "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686",
                "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2",
                "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b",
                "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707",
                "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e",
                "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc",
                "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48",
                "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155",
                "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0",
                "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24",
                "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4",
                "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0",
                "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee",
                "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be",
                "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e",
                "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8",
                "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3",
                "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d",
                "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5",
                "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc",
                "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198",
                "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b",
                "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58",
                "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e",
                "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c",
                "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636",
                "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea",
                "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e",
                "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2",
                "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba",
                "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==2.1.3"
        },
        "packaging": {
            "hashes": [
                "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7",
                "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==23.2"
        },
        "pluggy": {
            "hashes": [
                "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7",
                "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==1.3.0"
        },
        "pytest": {
            "hashes": [
                "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac",
                "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==7.4.3"
        },
        "sqlalchemy": {
            "hashes": [
                "sha256:f146c61ae128ab43ea3a0955de1af7e1633942c2b2b4985ac51cc292daf33222",
                "sha256:875de9414393e778b655a3d97d60465eb3fae7c919e88b70cc10b40b9f56042d",
                "sha256:13790cb42f917c45c9c850b39b9941539ca8ee7917dacf099cc0b569f3d40da7",
                "sha256:e04ab55cf49daf1aeb8c622c54d23fa4bec91cb051a43cc24351ba97e1dd09f5",
                "sha256:a42c9fa3abcda0dcfad053e49c4f752eef71ecd8c155221e18b99d4224621176",
                "sha256:14cd3bcbb853379fef2cd01e7c64a5d6f1d005406d877ed9509afb7a05ff40a5",
                "sha256:d143c5a9dada696bcfdb96ba2de4a47d5a89168e71d05a076e88a01386872f97",
                "sha256:ccd87c25e4c8559e1b918d46b4fa90b37f459c9b4566f1dfbce0eb8122571547",
                "sha256:4f6ff392b27a743c1ad346d215655503cec64405d3b694228b3454878bf21590",
                "sha256:f776c2c30f0e5f4db45c3ee11a5f2a8d9de68e81eb73ec4237de1e32e04ae81c",
                "sha256:c8f1792d20d2f4e875ce7a113f43c3561ad12b34ff796b84002a256f37ce9437",
                "sha256:d80eeb5189d7d4b1af519fc3f148fe7521b9dfce8f4d6a0820e8f5769b005051",
                "sha256:69fd9e41cf9368afa034e1c81f3570afb96f30fcd2eb1ef29cb4d9371c6eece2",
                "sha256:54bcceaf4eebef07dadfde424f5c26b491e4a64e61761dea9459103ecd6ccc95",
                "sha256:7ee7ccf47aa503033b6afd57efbac6b9e05180f492aeed9fcf70752556f95624",
                "sha256:b560f075c151900587ade06706b0c51d04b3277c111151997ea0813455378ae0",
                "sha256:2c9bac865ee06d27a1533471405ad240a6f5d83195eca481f9fc4a71d8b87df8",
                "sha256:625b72d77ac8ac23da3b1622e2da88c4aedaee14df47c8432bf8f6495e655de2",
                "sha256:b39a6e21110204a8c08d40ff56a73ba542ec60bab701c36ce721e7990df49fb9",
                "sha256:53a766cb0b468223cafdf63e2d37f14a4757476157927b09300c8c5832d88560",
                "sha256:0e1ce8ebd2e040357dde01a3fb7d30d9b5736b3e54a94002641dfd0aa12ae6ce",
                "sha256:505f503763a767556fa4deae5194b2be056b64ecca72ac65224381a0acab7ebe",
                "sha256:154a32f3c7b00de3d090bc60ec8006a78149e221f1182e3edcf0376016be9396",
                "sha256:129415f89744b05741c6f0b04a84525f37fbabe5dc3774f7edf100e7458c48cd",
                "sha256:3940677d341f2b685a999bffe7078697b5848a40b5f6952794ffcf3af150c301",
                "sha256:55914d45a631b81a8a2cb1a54f03eea265cf1783241ac55396ec6d735be14883",
                "sha256:2096d6b018d242a2bcc9e451618166f860bb0304f590d205173d317b69986c95",
                "sha256:19c6986cf2fb4bc8e0e846f97f4135a8e753b57d2aaaa87c50f9acbe606bd1db",
                "sha256:6ac28bd6888fe3c81fbe97584eb0b96804bd7032d6100b9701255d9441373ec1",
                "sha256:cb9a758ad973e795267da334a92dd82bb7555cb36a0960dcabcf724d26299db8",
                "sha256:40b1206a0d923e73aa54f0a6bd61419a96b914f1cd19900b6c8226899d9742ad",
                "sha256:3aa1472bf44f61dd27987cd051f1c893b7d3b17238bff8c23fceaef4f1133868",
                "sha256:56a7e2bb639df9263bf6418231bc2a92a773f57886d371ddb7a869a24919face",
                "sha256:ccca778c0737a773a1ad86b68bda52a71ad5950b25e120b6eb1330f0df54c3d0",
                "sha256:7c6c3e9350f9fb16de5b5e5fbf17b578811a52d71bb784cc5ff71acb7de2a7f9",
                "sha256:564e9f9e4e6466273dbfab0e0a2e5fe819eec480c57b53a2cdee8e4fdae3ad5f",
                "sha256:af66001d7b76a3fab0d5e4c1ec9339ac45748bc4a399cbc2baa48c1980d3c1f4",
                "sha256:9e55dff5ec115316dd7a083cdc1a52de63693695aecf72bc53a8e1468ce429e5",
                "sha256:4e869a8ff7ee7a833b74868a0887e8462445ec462432d8cbeff5e85f475186da",
                "sha256:9886a72c8e6371280cb247c5d32c9c8fa141dc560124348762db8a8b236f8692",
                "sha256:a571bc8ac092a3175a1d994794a8e7a1f2f651e7c744de24a19b4f740fe95034",
                "sha256:8db5ba8b7da759b727faebc4289a9e6a51edadc7fc32207a30f7c6203a181592",
                "sha256:0b0b3f2686c3f162123adba3cb8b626ed7e9b8433ab528e36ed270b4f70d1cdb",
                "sha256:0c1fea8c0abcb070ffe15311853abfda4e55bf7dc1d4889497b3403629f3bf00",
                "sha256:4bb062784f37b2d75fd9b074c8ec360ad5df71f933f927e9e95c50eb8e05323c",
                "sha256:58a3aba1bfb32ae7af68da3f277ed91d9f57620cf7ce651db96636790a78b736",
                "sha256:92e512a6af769e4725fa5b25981ba790335d42c5977e94ded07db7d641490a85",
                "sha256:3076740335e4aaadd7deb3fe6dcb96b3015f1613bd190a4e1634e1b99b02ec86",
                "sha256:5434cc601aa17570d79e5377f5fd45ff92f9379e2abed0be5e8c2fba8d353d2b"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==2.0.22"
        },
        "tomli": {
            "hashes": [
                "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
                "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "markers": "(python_version < \"3.11\")",
            "version": "==2.0.1"
        },
        "typing-extensions": {
            "hashes": [
                "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0",
                "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==4.8.0"
        },
        "werkzeug": {
            "hashes": [
                "sha256:90a285dc0e42ad56b34e696398b8122ee4c681833fb35b8334a095d82c56da10",
                "sha256:507e811ecea72b18a404947aded4b3390e1db8f826b494d76550ef45bb3b1dcc"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==3.0.1"
        },
        "zipp": {
            "hashes": [
                "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31",
                "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"
            ],
            "index": "5a06749b2297be54ac5699f6f2761716adc5001a2d5f8b915ab2172922dd5706",
            "version": "==3.17.0"
        }
    }
}
---------------------------------- Pipfile.lock ----------------------------------
Collecting alembic==1.12.1
  Using cached alembic-1.12.1-py3-none-any.whl (226 kB)
Installing collected packages: alembic
Successfully installed alembic-1.12.1
Collecting flask==3.0.0
  Using cached flask-3.0.0-py3-none-any.whl (99 kB)
Installing collected packages: flask
Successfully installed flask-3.0.0
(micropipenv-env) micropipenv-test % which flask
{/path/to}/junk/micropipenv-test/micropipenv-env/bin/flask
(micropipenv-env) micropipenv-test % flask run
Traceback (most recent call last):
  File "{/path/to}/junk/micropipenv-test/micropipenv-env/bin/flask", line 5, in <module>
    from flask.cli import main
  File "{/path/to}/junk/micropipenv-test/micropipenv-env/lib/python3.9/site-packages/flask/__init__.py", line 5, in <module>
    from . import json as json
  File "{/path/to}/junk/micropipenv-test/micropipenv-env/lib/python3.9/site-packages/flask/json/__init__.py", line 6, in <module>
    from ..globals import current_app
  File "{/path/to}/junk/micropipenv-test/micropipenv-env/lib/python3.9/site-packages/flask/globals.py", line 6, in <module>
    from werkzeug.local import LocalProxy
ModuleNotFoundError: No module named 'werkzeug'
(micropipenv-env) micropipenv-test %

@op1st-prow op1st-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 1, 2023
Copy link

op1st-prow bot commented Nov 1, 2023

New changes are detected. LGTM label has been removed.

@frenzymadness
Copy link
Collaborator Author

Thank you very much for your help. It's really good to have somebody to review these changes and test them in real environments.

I've added three new commits - first two are fixing the broken implementation for poetry groups basically improving how categories are handled and switching the implementation to normalized names of the packages. The next three commits contain changes for the test data. It turned out that we had some wrong tests there for quite some time. They are split into separate commits with explanations so it should be easy to review them one by one and check that the generated Pipfile* files correspond to what is in pyproject.toml/poetry.lock.

@eganma-umich
Copy link

@frenzymadness

Repeated the test in the previous comment, and I was able to run the test app with the environment created by micropipenv.

poetry environment

micropipenv-test % poetry shell
Spawning shell within {/path/to}/Library/Caches/pypoetry/virtualenvs/micropipenv-test-nDa1on5v-py3.9
micropipenv-test % emulate bash -c '. {/path/to}/Library/Caches/pypoetry/virtualenvs/micropipenv-test-nDa1on5v-py3.9/bin/ac
tivate'
(micropipenv-test-py3.9) micropipenv-test % which pip
{/path/to}/Library/Caches/pypoetry/virtualenvs/micropipenv-test-nDa1on5v-py3.9/bin/pip
(micropipenv-test-py3.9) micropipenv-test % pip list
Package            Version
------------------ -------
alembic            1.12.1
blinker            1.7.0
click              8.1.7
Flask              3.0.0
importlib-metadata 6.8.0
itsdangerous       2.1.2
Jinja2             3.1.2
Mako               1.2.4
MarkupSafe         2.1.3
pip                23.2.1
setuptools         68.1.2
SQLAlchemy         2.0.23
typing_extensions  4.8.0
Werkzeug           3.0.1
wheel              0.41.2
zipp               3.17.0

[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: pip install --upgrade pip
(micropipenv-test-py3.9) micropipenv-test % 

micropipenv environment

micropipenv-test % . micropipenv-env/bin/activate
(micropipenv-env) micropipenv-test % which pip
{/path/to}/junk/micropipenv-test/micropipenv-env/bin/pip
(micropipenv-env) micropipenv-test % pip list
Package            Version Editable project location
------------------ ------- -----------------------------------------------
alembic            1.12.1
blinker            1.7.0
click              8.1.7
Flask              3.0.0
importlib-metadata 6.8.0
itsdangerous       2.1.2
Jinja2             3.1.2
Mako               1.2.4
MarkupSafe         2.1.3
micropipenv        1.5.1   {/path/to}/junk/micropipenv-test/micropipenv
pip                22.0.4
setuptools         58.1.0
SQLAlchemy         2.0.23
toml               0.10.2
typing_extensions  4.8.0
Werkzeug           3.0.1
zipp               3.17.0
WARNING: You are using pip version 22.0.4; however, version 23.3.1 is available.
You should consider upgrading via the '{/path/to}/junk/micropipenv-test/micropipenv-env/bin/python -m pip install --upgrade pip' command.
(micropipenv-env) micropipenv-test % 

@frenzymadness
Copy link
Collaborator Author

Great. Do you have some time to check the changes here or at least the impact they have on tests?

@eganma-umich
Copy link

@frenzymadness Don't think I can do better than CI you already have set up. Are pull request approvals not limited to repo owners?

@frenzymadness
Copy link
Collaborator Author

@frenzymadness Don't think I can do better than CI you already have set up. Are pull request approvals not limited to repo owners?

The problem with tests and CI in general is that the results are compared with manually generated files and the bug you uncovered showed that we can have bugs in the generated files as well.

@frenzymadness
Copy link
Collaborator Author

All right. I'm going to merge it and do a new release. Thank you for the report and all the help with testing!

@frenzymadness frenzymadness merged commit 79a5531 into thoth-station:master Nov 7, 2023
103 of 104 checks passed
@frenzymadness frenzymadness deleted the fix_normalized_names branch November 7, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Poetry] Micropipenv mixing production and dependency lists during install
3 participants