-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Plibonigi la instalado kaj prizorgeblo de devigaj programopartoj #346
base: master
Are you sure you want to change the base?
Plibonigi la instalado kaj prizorgeblo de devigaj programopartoj #346
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #346 +/- ##
==========================================
+ Coverage 80.82% 80.85% +0.03%
==========================================
Files 90 90
Lines 6606 6606
Branches 829 829
==========================================
+ Hits 5339 5341 +2
+ Misses 1193 1192 -1
+ Partials 74 73 -1 ☔ View full report in Codecov by Sentry. |
de0c253
to
4131f49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Denove dankon por via zorga esploro kaj la detala priskribo de la konkludoj. Mi finfine havis tempon por dediĉi al tiu ĉi TP la atenton kiun ĝi meritas kaj senperturbe tralegi la proponitajn ŝanĝojn.
Sonas al mi bona la elekto de uv
eĉ se ekzistas iom da kritiko kontraŭ ĝi (ĉar estas verkita en Rust). Plirapidigo estas ja signifa.
Unue ĝenerala rimarkigo: en la kodo mem ni uzas la anglan – do nomoj de funkcioj, komentoj, kaj dosiernomoj estas ĉiuj anglalingve.
Rilate uv
ĝenerale: mi legis ĉe https://www.loopwerk.io/articles/2024/python-uv-revisited/ ke preferindas difini default-groups = []
kaj por ĉiu komando indiki eksplicite la deziratan grupon. Kion vi opinias pri tio?
Rilate la instalilon: mi ne tre ŝatas ke la versio de uv
estas kaŝita ie meze de la skripto. Estus pli bone se ĝi aperus en, ekzemple, .uv-version
kaj la skripto legu ĝin el tie. Sed mi ankaŭ vidis ke indiki la version ne estas devige. Eble la ekzakta versio ne tiom gravas? (Cetere la plej aktuala estas jam 0.5.22)
Rilate la enmetajn hokojn:
- Estus pli bone se la dosieroj ĉe
requirements/
estu aktualigataj nur se vere okazis ŝanĝo en la bezonataj pakaĵoj. Sed mi ne scias ĉu entute eblas detekti tion. - Mi rimarkis ke la eksporta komando perdas la specifaĵojn de la pakaĵoj. Ekzemple, estas difinita dependeco je
django-anymail[postmark]
sed en la rezultaprod.txt
la specifigo de postmark mankas. Tio estas iom zorgiga.
Mi dankas vin pro via laboro!
# Por daŭrigi, ke nia aktuala disponiga sistemon ankoraŭ povas legi de requirements.txt | ||
# TODO:FAROTE Decidi ĉu ŝanĝindas tio. | ||
- id: export-requirements-base | ||
name: export-requirements-base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: export requirements (base)
verbose: false | ||
|
||
- id: export-requirements-dev | ||
name: export-requirements-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: export requirements (dev)
name: export-requirements-base | ||
require_serial: true | ||
language: system | ||
entry: uv export --locked --no-dev -o requirements/base.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bv. aldonu --quiet
name: export-requirements-dev | ||
require_serial: true | ||
language: system | ||
entry: bash -c '( echo "-r base.txt"; uv export --only-dev --locked ) > requirements/dev.txt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bv. aldonu --quiet
|
||
Se vi vidas `eo.utf8` en la listo, la ĝusta lokaĵaro estas nun aktiva. | ||
|
||
### uv: ``VIRTUAL_ENV does not match the project environment path `.venv` and will be ignored`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mi aldonis tiun ĉi sekcion – mi havas jam agorditan kaj funkciantan virtualan medion, kaj aldono de uv
al ĝi ne glate paŝis.
maintainers = [ | ||
{ name = "Meir", email = "[email protected]" }, | ||
{ name = "Baptiste Darthenay", email = "[email protected]" }, | ||
{ name = "Etenil", email = "[email protected]" }, | ||
{ name = "Chloe Shetreet", email = "[email protected]" }, | ||
{ name = "Salman Mohammadi", email = "[email protected]" }, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nur mi kaj vi estu listigitaj ĉi tie. Cetere, email ne estas deviga ŝlosilo, povas aperi nur nomo. Vi povas meti mian plenan nomon: Meir Goren.
"uv>=0.5.1", | ||
] | ||
|
||
# TODO:FAROTE Konsideri kiel unuigi la agordojn kaj skriptojn de setup.cf, fabfile.py, kaj pyproject.toml ĉi tien. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plejparto de setup.cfg (krom flake8) povas translokiĝi al pyproject.toml, sed tio estu aparta projekteto. La skripto fabfile.py, aliflanke, estas tute alia besto – ĝi estas uzata de fab
kaj estas aro de taskoj por fab
. Ĝi devos resti.
urls.documentation = "https://github.com/tejoesperanto/pasportaservo/blob/master/README.md" | ||
urls.issues = "https://github.com/tejoesperanto/pasportaservo/issues" | ||
urls.source = "https://github.com/tejoesperanto/pasportaservo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aldoneblas urls.homepage = "https://www.pasportaservo.org"
classifiers = [ | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mi opinias ke la versio de Python ne tiom gravas, finfine PS ne estas disponigata biblioteko. Trarigardinte https://pypi.org/classifiers ŝajnas al mi ke plej taŭgus:
Framework :: Django
Programming Language :: Python
Development Status :: 5 - Production/Stable
License :: OSI Approved :: GNU Affero General Public License v3
Natural Language :: Esperanto
keywords = [ | ||
"django", "postgresql", "saas", "pasporta", "servo", "esperanto", "tejo", "zamenhof", | ||
"tutmonda", "junulara", "organizo", "lingvo", "interparolo", "internacia", "loĝado", "vojaĝi", "gastigo", "mapo", "retejo", | ||
"passport", "service", "global", "youth", "orginization", "language", "exchange", "international", "lodging", "travel", "hospitality", "map", "website", "online", | ||
# TODO:FAROTE: Ĉu pli da lingvaj tradukoj aldonendas? Ebla nur la denaskaj lingvoj de niaj kontribuantoj, aŭ eble nur la plej vidataj je GitHub. | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estas multaj ne-necesaj ŝlosilvortoj laŭ mi. Mi tenus la liston laŭeble baza:
hospitality, accommodation, travel, esperanto, gastigo, vojaĝoj
Aĥ, ja, mi forgesis ankoraŭ kelkajn etajn aferojn:
|
Priskribo de la Ŝanĝoj
pyproject.toml
, la aktualan rekomendatan manifestan dosieron por pitonaj projektoj, laŭ PEP-518 kaj PEP-621. Legu plu pripyproject.toml
. Uzi tion estas ĝenerale preferata inter pitonaj programistoj en la komunumo. Almenaŭ aktuale.uv
(kaj ĝian par-anonuvx
) por administri la projekton kaj konsekvence pakaĵojn enpyproject.toml
*Rimarketo: La
uvx
estas konvenka sinonimo poruv tool run
, komapreble al lanpx
komandon denpm
por ĴavaSkriptoKunsideroj por decidoj elektitaj
El la amaso da pitonaj pakaĵiloj kiuj ekzistas, mi celis ke la solvo:
pyproject.toml
ol la aliajElektoj apartene por pitono
pipenv
poetry
pdm
hatch
uv
Elektoj kiuj pli ĝeneralas
docker
entuteguix
nix flake
devenv
devbox
flox
Finfine mi decidis ke
uv
plej taŭgas kiel ekvilibrigo de la kunsederoj. La dokumentadon haveblas tie ĉi..Programada detaloj
venv
nun defaŭlte nomiĝas.venv
./instalilo.sh
)pre-commit
ilo eksportas la liston de devigaj program-partoj reen alrequirements*.txt
por, ke ĝi (espereble) ne malhelpos la aktualajn CI kaj disponigon.apt
. Verŝajne ankaŭ tio veras dednf
por Fedora.README.md
nun montras la novajn.uv run
(projekta medio) kajuvx
(apartigita medio)Testado
dnf
apt
kaj ankaŭĉ pernixpkgs
en malpura ŝelo.`from http://api.opencagedata.com/geocode/v1/json: ERROR - 401 Client Error: Unauthorized
Estas malfrua nokte en Kalfornio en Usono nun, do mi enlitiĝos tuj. Pardonon, se mi mistajpis iomete en tiu ĉi PR.
Dankon! Kaj mi esperas ke tiu ĉi PR estas bona por nia projekto
Ligataj taskoj
Resolve #240 (la ĉefa celo)
Resolve #151 (nu, ne tute. nur ĉar mi klarigis tiujn ŝanĝojn en la
README.md
)