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(misc): ignore lib/ created by virtualenv #723

Closed
wants to merge 4 commits into from
Closed

fix(misc): ignore lib/ created by virtualenv #723

wants to merge 4 commits into from

Conversation

elenakrittik
Copy link
Contributor

@elenakrittik elenakrittik commented Aug 30, 2022

Summary

virtualenv creates lib/ folder, which is not ignored by Git yet it's not included in MANIFEST.in, making check-manifest complain. This PR updates .gitignore to ignore lib/ folder, too.

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running task lint
    • I have type-checked the code by running task pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@shiftinv shiftinv added t: meta Changes to the project itself (CI, configs, etc.) skip news labels Aug 30, 2022
@shiftinv
Copy link
Member

The virtualenv folder name is determined by whatever you pass when creating it - virtualenv venv creates a venv/ folder with e.g. venv/lib/python3.10/site-packages.
The common virtualenv names venv and .venv are already .gitignore'd, not sure how the lib/ directory would appear in the repo root (unless you ran virtualenv ., I suppose?).

Anyway, seems fine to me, though this change doesn't need a changelog entry since it's not relevant to end users.

@elenakrittik
Copy link
Contributor Author

I usually make virtual envs like this

git clone https://github.com/someorg/repo
virtualenv repo

(i.e., like you said, virtualenv .).
Even though this might not be a very popular place to create venvs, having a former except: for such cases will not make everything worse.

About changelog entry.. IIRC github won't let you merge the pr if any of the required checks dont pass.. I'll remove changelog entry, but how can we ignore that check?

@shiftinv
Copy link
Member

About changelog entry.. IIRC github won't let you merge the pr if any of the required checks dont pass.. I'll remove changelog entry, but how can we ignore that check?

That's what the skip news label is used for :) It's generally for things that don't concern users and/or only apply to lib development, and completely skips the changelog/newsfragment check:

name: Check for changelog entry
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'skip news') != true

@spifory
Copy link
Contributor

spifory commented Aug 30, 2022

It wouldn't be best to be stacking things onto a PR, but is there any chance __pycache__ could be git ignored? At some point, a pycache folder was created(however I'm not too sure what I did to make that happen), so it would be nice if that could be gone too.

@elenakrittik
Copy link
Contributor Author

Why not, i think (but i'll better wait for shift's or other maintainer opinion)

@shiftinv
Copy link
Member

It wouldn't be best to be stacking things onto a PR, but is there any chance __pycache__ could be git ignored? At some point, a pycache folder was created(however I'm not too sure what I did to make that happen), so it would be nice if that could be gone too.

__pycache__ directories themselves aren't ignored, and while that could be changed, it's not necessary as they should only contain *.pyc files. Those are already ignored, and git doesn't care about empty directories :p

@shiftinv shiftinv changed the title Ignore lib/ created by virtualenv fix(misc): ignore lib/ created by virtualenv Aug 30, 2022
@elenakrittik
Copy link
Contributor Author

changelog entry removed

@spifory
Copy link
Contributor

spifory commented Aug 30, 2022

It wouldn't be best to be stacking things onto a PR, but is there any chance __pycache__ could be git ignored? At some point, a pycache folder was created(however I'm not too sure what I did to make that happen), so it would be nice if that could be gone too.

__pycache__ directories themselves aren't ignored, and while that could be changed, it's not necessary as they should only contain *.pyc files. Those are already ignored, and git doesn't care about empty directories :p

Ahh okay, I see the logic now.

@onerandomusername
Copy link
Member

This isn't necessary, as you can use a .git/info/exclude file for adding user-specific ignores. What we've added to the .gitignore file are build artifacts that may be appearing for everyone, or files that most people will be using.

@elenakrittik elenakrittik deleted the patch-1 branch August 31, 2022 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news t: meta Changes to the project itself (CI, configs, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants