Dear Pywikibot developers,
I am a Pywikibot user interested in creating a Conda package for Pywikibot.
With your permission and guidance, I would like to contribute to the
Pywikibot Conda package effort.
A Conda package for Pywikibot would provide several advantages over the
existing pip package. Conda offers better management of dependencies,
allowing for isolated environments and easy installation. It caters to
users who prefer Conda as their package manager and facilitates integration
with Conda-based workflows and tools.
I kindly request your permission to proceed with creating the Conda package
and would greatly appreciate your guidance throughout the process. Once
complete, I will share the package link for your review and feedback.
Thank you for considering my request. I look forward to your response.
Mahfuza
LinkedIn <https://www.linkedin.com/in/mhmohona/> | GIthub
<https://github.com/mhmohona> | Phabricator
<https://phabricator.wikimedia.org/p/Mhmohona/>
I periodically struggle with finding a good way to write unit tests for a pywikibot app. I've come to the conclusion that using unittest.mock to patch calls into pywikibot is just not the way to go. It's certainly hermetic, but the overhead of building tests is so high, it doesn't seem worth it. It's also not really the right level. For sure, I'm testing my own code, which says "unit test", but I'm also testing my understanding of how a real wiki behaves, which says "integration test". I've done some work with making live calls to test.wikipedia.org <http://test.wikipedia.org/>, but I hate relying on external resources.
So, I think the next thing I'm going to try is spinning up a wiki locally and test against that. Unfortunately, my docker-fu is pretty weak, so I'm seeking some advice to avoid going off in the weeds on this.
I already have docker installed on my laptop. I guess now I need to find an appropriate docker image to use. Could somebody point me at that? I'll also need some kind of integration with pytest. I'm looking at pytest-docker <https://pypi.org/project/pytest-docker/>, which seems like the right thing. Does this seem reasonable?
Briefly: I began to use new replace.py.
(I used the old compat one as long as I could with satisfaction, but at a
point some sysop threw out all the logged in bots, and by that time the
login had been crashed.)
Sometimes it works well, sometimes it keeps the first character of the
article and throws away everything else. I cannot find the reason. For
testing here is an example where it shows BOTH behaviours:
My fix is:
fixes['nemezetek'] = {
'regex': True,
'msg': {
'hu':'Nemezetek → nemzetek tömeges javítása',
},
'replacements': [
(r'(n|N)emezetek', r'\1emzetek'), # Ez az alap, amit a
lajostalanításhoz kikommentezünk
]
}
My command in huwiki is:
python pwb.py -nolog replace -fix:nemezetek -search:nemezetek
And the same fix and same command sometimes works well, and in other
arcticles shows the above mentioned silly behaviour.
What do I do wrong?
I try to attach a small creenshot: two articles are correct, the 3rd one
is totally bad.
[image: kép.png]
--
Bináris
Hi Pywikibot Team,
My name is Ethan Nagano. I am a recent graduate working in industry. In my
current role, I contribute to the development of internal Python tools for
testing industry software.
I am looking for ways to expand outside my current role and this project
seems like a good place to start. I have not contributed to a project like
this before and am excited for the learning experience.
I was referred to this project by https://up-for-grabs.net/#/.
I look forward to working with the team! :)
Thanks,
Ethan Nagano