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

Introduction of a way to provide a configuration file and folder from the CLI. #380

Merged
merged 9 commits into from
Oct 3, 2024

Conversation

funilrys
Copy link
Owner

This patch fixes #377.

Contributors:


Hey @spirillen & others. I'm lookinf for tester before getting this merged. Could you please test this branch and let me know ?

Thanks!

@funilrys funilrys self-assigned this Sep 22, 2024
@coveralls
Copy link

coveralls commented Sep 22, 2024

Coverage Status

coverage: 94.812% (+0.09%) from 94.723%
when pulling 95db003 on issue-377
into e8a5976 on dev.

@funilrys funilrys force-pushed the issue-377 branch 2 times, most recently from 14e370f to 6ad83f3 Compare September 22, 2024 14:03
@@ -1197,6 +1197,18 @@ def get_default_group_data() -> List[Tuple[List[str], dict]]:
"version": "%(prog)s " + PyFunceble.storage.PROJECT_VERSION,
},
),
(
[
"--config-file",
Copy link
Contributor

@spirillen spirillen Sep 23, 2024

Choose a reason for hiding this comment

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

--config-file => --config-dir

the equivalent to ~/.config/PyFunceble with all the config files, since the values of ~/.config/PyFunceble/.pyfunceble-env are not picked up in when running in venv

@spirillen
Copy link
Contributor

As mentioned in the comment, https://github.com/funilrys/PyFunceble/pull/380/files#r1771238700, then none of the config/setup files from the default root config dir are picked up when running in python venv as it is a virtual closed environment. This means it is the dir_path to the config files "collection" not only .PyFunceble.overwrite.yaml

/home/$USER/.config/PyFunceble
├── /home/$USER/.config/PyFunceble/dir_structure.json
├── /home/$USER/.config/PyFunceble/iana-domains-db.json
├── /home/$USER/.config/PyFunceble/.idea
│   ├── /home/$USER/.config/PyFunceble/.idea/.gitignore
│   ├── /home/$USER/.config/PyFunceble/.idea/misc.xml
│   ├── /home/$USER/.config/PyFunceble/.idea/modules.xml
│   ├── /home/$USER/.config/PyFunceble/.idea/PyFunceble.iml
│   └── /home/$USER/.config/PyFunceble/.idea/workspace.xml
├── /home/$USER/.config/PyFunceble/inactive.csv
├── /home/$USER/.config/PyFunceble/ipv4_reputation.data
├── /home/$USER/.config/PyFunceble/public-suffix.json
├── /home/$USER/.config/PyFunceble/.pyfunceble-env
├── /home/$USER/.config/PyFunceble/.pyfunceble_intern_downtime.json
├── /home/$USER/.config/PyFunceble/.PyFunceble.overwrite.yaml
├── /home/$USER/.config/PyFunceble/.PyFunceble.yaml
├── /home/$USER/.config/PyFunceble/user_agents.json
└── /home/$USER/.config/PyFunceble/whois.csv

@funilrys
Copy link
Owner Author

@spirillen added a --config-dir option (also). Please test.

Indeed, before this patch, any custom configuration may have been
destroyed when config_file and config_dir has been changed.
@spirillen
Copy link
Contributor

@spirillen added a --config-dir option (also). Please test.

I will, is it released on pipy or repo only?

@funilrys funilrys changed the title Introduction of a way to provide a configuration file from the CLI. Introduction of a way to provide a configuration file and folder from the CLI. Oct 3, 2024
@funilrys funilrys merged commit ee4d076 into dev Oct 3, 2024
83 of 89 checks passed
@funilrys funilrys deleted the issue-377 branch October 3, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

BUG: PyF in virtualvenv fails loading conf files
3 participants