-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/push package collector #25
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The sub-collectors (currently only `LMSCollector` and `LocalCollector`) push available packages to the `Indexer` and notify it on the removal or modification of a package.
Test ReportReport generated on 12-Jan-2023 at 12:09:30 by pytest-md Summary42 tests ran in 4.38 seconds
Coverage Report
|
MartinGauk
requested changes
Dec 9, 2022
MartinGauk
reviewed
Dec 9, 2022
TODO: Replace every `patch()` with `patch.object()` when possible..
MartinGauk
reviewed
Dec 24, 2022
The `asyncio.Lock` needs to be initialized inside the webservers eventloop. Otherwise, this causes a `RuntimeError`. This error does not occur for the Python versions 3.10 and above.
55f5547
to
ffef9c1
Compare
MartinGauk
approved these changes
Jan 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #23, closes #24.
Die einzelnen Kollektoren des
PackageCollector
s updaten denIndexer
bei Veränderungen ihres Paketbestandes nun selbst.Außerdem initialisiert jetzt der
Indexer
diePackage
s, statt wie bisher die Sub-Kollektoren.Existiert beim Registrieren eines Pakets bereits die dazugehörige
Package
-Klasse im Indexer, so wird der Kollektor in denPackageSources
vermerkt. Dadurch wird nur einePackage
-Klasse erstellt, selbst wenn ein Paket von mehreren Kollektoren angeboten wirdAnhand dieser
PackageSources
entscheidet derIndexer
über die Visibilität des Pakets.Der
LocalCollector
reagiert nun bei jeglichen Änderungen (Umbenennung, Modifizierung, Löschung, Erstellung) der Pakete im zugehörigen Ordner, updatet seine interneLocalCollector.map
und nimmt ggf. auch Änderungen amIndexer
vor.Zusätzlich wurde das Pylint-Plugin pylint-pytest entfernt, da dieses Bugs enthält und archiviert wurde. Dadurch werden nun beim Ausführen des Linters, zuvor ignorierte Warnungen (
redefined-outer-name
undprotected-access
) ausgegeben, die unseren Testcode betreffen.Es ist leider (noch) nicht möglich, bestimmte Warnungen pro Ordner zu ignorieren, allerdings könnte man entweder den gesamten
questionpy-server/tests/
-Ordner ignorieren,# pylint: disable=...
an den Anfang jeder Test-Datei kopieren oder Pylint mit einer anderen Konfiguration auf den Test-Ordner laufen lassen.