๐ป Simplicity focused open source advocate. Author of several open source R and python packages like cytounet, urlfix, manymodelr, pyfdc, mde. A full list is available at https://nelson-gon.github.io/projects.
I would like to exclude some URLs from being replaced.
Similar Features
This will be similar to the replacement method once it's in place.
Feature Details
Exclude certain URLs from the replacement. If I have a URL like that of Zenodo that I know is correct (links that allow citing the latest version of multiple releases), this should be skipped when replacing.
Describe the bug
When setting up the virtual environment, the urllib library version is not specified in the requirements.txt file thus it uses the system default.
To Reproduce
Clone a clean branch of the repo, check the system's version of urllib using (Linux) pip show urllib.
Create the virtual env python3 -m venv urlvenv and install requirements pip install -r requirements.txt
Check the urllib version again, see that it matches the sysem default.
Expected behavior
Version of urllib specific to the source code to be explicitly installed.
Unexpected behavior
System default version of urllib is used when running the source code. The only version of urllib installed inside or outside the venv setup with the current requirements.txt file is urllib3==1.26.3, which is in fact the latest release (perhaps this is intentional).
Running tests twice will fail because of inplace replacement tests.
To Reproduce
Run python tests.py twice.
Expected behavior
I expected to have OK tests regardless of how many times I run them.
Unexpected behavior
Tests will fail. This is because when we replace inplace, the file has already changed therefore running twice fails. A way to fix this might be to restore the files in the testinplace directory after running tests. Might also need to test to ensure that we have 0s for all files if inplace worked.
When running replace_urls, I receive the following error:
[WinError 10060] A connection attempt failed because the connected p....
Similar Features
This is related to replace_urls
Feature Details
For some reason, the code editor or python itself may be blocked by a firewall. In that case, replacements will not work and the above error will be thrown.
This is similar to replace_urls in URLFix and DirURLFix. The issue with the current replacements is that the former requires an output file while the latter creates them on-the-fly.
Feature Details
Using output files may create a lot of files in the user's system which may be problematic for users with low storage space. Proposed Implementation
Create temporary files to write to before renaming them as the input file.
Describe the bug
The test creates files which cause future tests to fail. To Reproduce
Clone the main branch, run the tests (success), then run the tests again (3 != 6 fails).
Expected behavior
The tests should succeed multiple times in a row if the code does not change or stays correct.
Make this executable via python main.py -in myfile.md -o [optional] --v 1 -i 1. Add to path? This should work in the sense that one can run this from anywhere not just within urlfix (if cloned for instance).
Add correct_urls argument for known URLs. This is less practical and may not be convenient at the command line. A current idea is to provide a file with known URLs and read that instead.