Base progress calculations on external file structure #11

Merged
mdk merged 1 commit from maciek/potodo:pot into main 2024-12-22 23:50:18 +01:00
Contributor

Closes #4.

I am hesitant between using --base or --pot flag name (the latter suggested by Julien). For now I stick to the second one.

I skipped cache topic so far. I don't use it when scanning (cache argument always False). The cache written is in the temporary directory, so transient. For a case of external file structure the cache would be quite complicated, cause we'd need to check against external file structure timestamps or a directory tree hash 🤔

  • TODO: unit tests
  • Windows support?
  • unit tests passing on CI

With regard to the merging method, I've considered three utilities:

  • msgmerge: decided to use msgmerge as most straight-forward (though it's a operating system dependency);
  • pomerge: it works only in one direction: PO files content is written to POTs and then I'd need to rename all files to make potodo read it, cause it has hardcoded filtering to *.po names
  • sphinx-intl update: it requires a specific directories layout (locales/{lang}/LC_MESSAGES), and also it feels like a bit strange dependency for potodo, not sure if that would be an issue to potodo maintainers
Closes #4. I am hesitant between using `--base` or `--pot` flag name (the latter [suggested](https://git.afpy.org/AFPy/potodo/issues/7#issuecomment-4086) by Julien). For now I stick to the second one. I skipped cache topic so far. I don't use it when scanning (cache argument always `False`). The cache written is in the temporary directory, so transient. For a case of external file structure the cache would be quite complicated, cause we'd need to check against external file structure timestamps or a directory tree hash 🤔 * [x] TODO: unit tests * [x] Windows support? * [x] unit tests passing on CI With regard to the merging method, I've considered three utilities: * **msgmerge**: decided to use `msgmerge` as most straight-forward (though it's a operating system dependency); * **pomerge**: it works only in one direction: PO files content is written to POTs and then I'd need to rename all files to make potodo read it, cause it has hardcoded filtering to *.po names * **sphinx-intl update**: it requires a specific directories layout (`locales/{lang}/LC_MESSAGES`), and also it feels like a bit strange dependency for potodo, not sure if that would be an issue to potodo maintainers
maciek changed title from Base progress calculations on external file structure to WIP: Base progress calculations on external file structure 2024-11-20 00:40:39 +01:00
Debug log
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
d55b98c869
Error handling for missing xgettext
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
eddd3e3d03
Reformat
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
22e6d1c756
Drop superfluous code
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
f78f514441
Refactor import
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
5dc198583f
Zero out the PO file on merge error
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
1bd001b4bb
Remove PO files without matching POTs to make them not affect the stats
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
f5bb5e9d9c
Improve matching logic
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
1dd33de04b
Revert imports changes
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
f134262635
Remove comments, replace prints with logging.debug
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
cdc880874a
Handle OSError in msgmerge
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
98d40cfb3d
maciek force-pushed pot from 98d40cfb3d
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
to f107bc558a
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2024-11-25 01:25:30 +01:00
Compare
Support Windows
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
087dd1b5f9
First test
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
33cf6d5627
Test of merging in a subdirectory
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
e107f13c93
Add rest of merging tests
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
60c2bcb6e3
Skip tests if no GNU gettext
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
df4ff35e29
Install GNU gettext in CI
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
94464cbd8b
Get rid of sudo
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
c9366a69a4
Add apt-get update to update indices
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
83483b66f6
Don't suppress a merge error, for debugging purposes in CI
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
0ea1328048
Write output files in msgmerge with -o option
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
3a23b56151
Author
Contributor

The tests that complete successfully locally fail on CI. I wonder if it is connected somehow with transient filesystem in Docker. Will try to reproduce it in a Docker container, but some other day.

The tests that complete successfully locally fail on CI. I wonder if it is connected somehow with transient filesystem in Docker. Will try to reproduce it in a Docker container, but some other day.
Replace deprecated pipeline name with steps in .woodpecker.yml
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
0728f5d348
Add recommended triggers info to .woodpecker.yml
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
1f15d01ca7
Debug -- tmp dir existence check
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
20acd7e56a
revert trigger change in ci
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
7f06cf1e73
print tmpdir content
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
86d6727e27
pytest stdout, verbose
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
96ecbfd7a1
debug log in internal iteration
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ffa7a0581c
print subprocess.run out
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2a48a0b344
raise logging level
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
0019c4443d
text true
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
12d41aa36f
dockerfile
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
cbf3b5c115
version
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
d5178819cd
logging to print
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2509f6bbc7
shell true
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
1461c0dacc
shell true fix
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
24d2922096
sanity check subprocess
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
4d1b86273d
debug dirs
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2011bc190f
add missing template files
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
8daf01240e
maciek force-pushed pot from 8daf01240e
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
to 2dfb60803e
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2024-12-07 00:28:55 +01:00
Compare
check skip
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
faa6d0a866
maciek force-pushed pot from faa6d0a866
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
to 2dfb60803e
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2024-12-07 00:34:52 +01:00
Compare
maciek force-pushed pot from 2dfb60803e
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
to 46f89b763d
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2024-12-07 00:41:13 +01:00
Compare
Author
Contributor

The tests that complete successfully locally fail on CI. I wonder if it is connected somehow with transient filesystem in Docker. Will try to reproduce it in a Docker container, but some other day.

It was connected with pot files that were gitignored therefore not added to the repo.

> The tests that complete successfully locally fail on CI. I wonder if it is connected somehow with transient filesystem in Docker. Will try to reproduce it in a Docker container, but some other day. It was connected with pot files that were gitignored therefore not added to the repo.
maciek changed title from WIP: Base progress calculations on external file structure to Base progress calculations on external file structure 2024-12-07 00:42:19 +01:00
Bump version to 0.23.0, add changelog entries since 0.21.3
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline failed
884771a7c9
mdk merged commit 884771a7c9 into main 2024-12-07 15:43:24 +01:00
mdk deleted branch pot 2024-12-07 15:43:25 +01:00
Owner

Merged and released, thanks @maciek!

Merged and released, thanks @maciek!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AFPy/potodo!11
No description provided.