Skip to content

fix: Allows checks for both underscores and dashes as equal#86

Merged
bryant-finney merged 7 commits intoMadoshakalaka:masterfrom
jshwi:fix/issues/72
Nov 19, 2021
Merged

fix: Allows checks for both underscores and dashes as equal#86
bryant-finney merged 7 commits intoMadoshakalaka:masterfrom
jshwi:fix/issues/72

Conversation

@jshwi
Copy link
Contributor

@jshwi jshwi commented Nov 18, 2021

Fixes open issue: sync-then-check fails with underscores #72

@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2021

Codecov Report

Merging #86 (e8fbed6) into master (01356ae) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head e8fbed6 differs from pull request most recent head 5dbd538. Consider uploading reports for the commit 5dbd538 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master      #86   +/-   ##
=======================================
  Coverage   94.63%   94.63%           
=======================================
  Files          10       10           
  Lines         745      746    +1     
=======================================
+ Hits          705      706    +1     
  Misses         40       40           
Impacted Files Coverage Δ
pipenv_setup/inconsistency_checker.py 98.01% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01356ae...5dbd538. Read the comment docs.

Fixes open issue: sync-then-check fails with underscores #72
bryant-finney added a commit that referenced this pull request Nov 18, 2021
* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data/broken_1

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data/extra_0

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump requests from 2.18.4 to 2.20.0 in /tests/data

Bumps [requests](https://github.com/psf/requests) from 2.18.4 to 2.20.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.18.4...v2.20.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@bryant-finney bryant-finney linked an issue Nov 18, 2021 that may be closed by this pull request
Copy link
Collaborator

@bryant-finney bryant-finney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job! I had a few suggestion; to summarize:

  • test_sync_underscore_or_dash() can be simplified a bit further:
    def test_sync_underscore_or_dash(shared_datadir):  # type: (Path) -> None
        """
        sync --pipfile should work for either dash or underscore names.
    
        Asserts fix for https://github.com/Madoshakalaka/pipenv-setup/issues/72.
        """
        with data("dash_or_underscore_0", shared_datadir / "dash_or_underscore_0"):
            cmd(["", "sync", "--pipfile"])
            cmd(["", "check"])
  • tests/data/dash_or_underscore_0/Pipfile.lock can be removed
  • tests/data/dash_or_underscore_0/pyproject.toml can be removed
  • add a hyphenated dependency to tests/data/dash_or_underscore_0/Pipfile for completeness

@jshwi
Copy link
Contributor Author

jshwi commented Nov 19, 2021

@bryant-finney awesome, thanks for the review, I'll check out you found

@jshwi
Copy link
Contributor Author

jshwi commented Nov 19, 2021

@bryant-finney the pyproject.toml was a side effects of pipenv lock, apparently it adds those keys now (or creates a new one if it does not exist).

jshwi and others added 4 commits November 19, 2021 13:59
Removes unused arguments

Co-authored-by: Bryant Finney <[email protected]>
Removes unnecessary copying of files

Co-authored-by: Bryant Finney <[email protected]>
We can simply test that an error is not raised

Co-authored-by: Bryant Finney <[email protected]>
@jshwi
Copy link
Contributor Author

jshwi commented Nov 19, 2021

I will pull this PR as it is now, and remedy these failed tests.

jshwi and others added 2 commits November 19, 2021 14:13
Removes parametrized attrs as single use cases (this test will probably not need to be expanded upon in the future - i.e. premature optimization).

Co-authored-by: Bryant Finney <[email protected]>
@jshwi
Copy link
Contributor Author

jshwi commented Nov 19, 2021

I left the other commits in here for completeness. Of course, this can be rebased onto the master branch, or merged, etc. Whatever the preferred strategy is.

@jshwi
Copy link
Contributor Author

jshwi commented Nov 19, 2021

@bryant-finney I've run the test without the change to pipenv_setup/inconsistency_checker.py and it fails, so the test does what we want it to

@bryant-finney bryant-finney self-requested a review November 19, 2021 05:13
@bryant-finney
Copy link
Collaborator

bryant-finney commented Nov 19, 2021

@jshwi Great 👍 I'll go ahead with squash+merge!

@bryant-finney bryant-finney requested review from bryant-finney and removed request for bryant-finney November 19, 2021 05:15
@bryant-finney bryant-finney merged commit 4c94937 into Madoshakalaka:master Nov 19, 2021
bryant-finney added a commit that referenced this pull request Nov 19, 2021
* #86 additional security updates (#85)

* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data/broken_1

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data/extra_0

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump requests from 2.18.4 to 2.20.0 in /tests/data

Bumps [requests](https://github.com/psf/requests) from 2.18.4 to 2.20.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.18.4...v2.20.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data/broken_1

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sqlalchemy from 1.1.14 to 1.3.0 in /tests/data/extra_0

Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.1.14 to 1.3.0.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@jshwi jshwi deleted the fix/issues/72 branch November 19, 2021 09:42
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

Successfully merging this pull request may close these issues.

sync-then-check fails with underscores

3 participants