Page MenuHomeSoftware Heritage

tenma (Tenma)
User

Projects

User Details

User Since
Wed, Sep 2, 11:39 AM (3 w, 1 d)

Recent Activity

Today

tenma created D4034: Add static check to object_type literals in buffers.
Thu, Sep 24, 4:37 PM
tenma created D4033: Improve typing of the buffering interface.
Thu, Sep 24, 4:35 PM
tenma created D4032: Fix default value handling in constructor.
Thu, Sep 24, 4:32 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

Last attempt:
https://docs.python.org/3/reference/datamodel.html#objects-values-and-types
clearly states what is object identity and that it does not change and that we compare it with is.

Thu, Sep 24, 2:09 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

Wanted also to rename constructor parameters but they are tied to the config parameters.

Thu, Sep 24, 1:38 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

@zack @olasd @vlorentz I am puzzled. Do I go with the ImmutableDict solution or throw away another part of what I did the last 3 days (did it also in another commit)? Already removed code that was against the strict signature checker in the unit tests.

Thu, Sep 24, 1:36 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

@vlorentz: true, this is bad. I added the check after, and didn't check this...

Thu, Sep 24, 1:23 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

And look! I can get rid of the identity check, just it would merge with itself. This one is to avoid perf penalty.

Thu, Sep 24, 1:17 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

The fact that is not so common a pattern does not make it bad.
It IS exactly like using None if we make this dict immutable, with added benefits of readability and checking. It even has no performance penalty or anything.

Thu, Sep 24, 1:13 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.
In D4017#99688, @olasd wrote:

I see that e37f63930b323a1e811861d298e62516ed94649a has been pushed. Meh.

To properly push after a rebase, you need to do arc diff --update to make sure that the changes after rebase will be picked up by phabricator and the diff will be automatically closed.

Thu, Sep 24, 12:57 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

I view it that way:

  • identity checking a default value is always good, even if mutable, precisely because static values like these can never change identity (identity/value dichotomy). It would be wrong to value equality check it through if it is mutable of course;
  • this value can only be modified inside the module (modulo import time hacking), so the question are:
      • do we want it immutable (we don't plan to have code that mutate it)?
      • trust the module code for well behaving? it is a real policy question, I think your answer is no
    • this pattern is equivalent to the None one, except we statically (as opposed to manually replace None by a default) never allow any invalid type like NoneType. I try to leverage static typing to the fullest

After this rationale, which could be a valid policy to introduce in the project, now the proposition is:

Thu, Sep 24, 11:31 AM
tenma updated the diff for D4018: Make all storages compatible with buffering.

repush?

Thu, Sep 24, 12:36 AM
tenma updated the diff for D4017: Improve code quality and doc in BufferedProxyStorage.

repush?

Thu, Sep 24, 12:34 AM
tenma committed rDSTOe37f63930b32: Improve code quality and doc in BufferedProxyStorage (authored by tenma).
Improve code quality and doc in BufferedProxyStorage
Thu, Sep 24, 12:28 AM
tenma updated the diff for D4018: Make all storages compatible with buffering.

Found how to do write passtrough functions while having good default handling and keep the signature checker happy. A bit hacky.

Thu, Sep 24, 12:18 AM

Yesterday

tenma updated the diff for D4017: Improve code quality and doc in BufferedProxyStorage.

Fix typo and remove TODO comment

Wed, Sep 23, 4:15 PM
tenma added inline comments to D4017: Improve code quality and doc in BufferedProxyStorage.
Wed, Sep 23, 3:56 PM
tenma added inline comments to D4017: Improve code quality and doc in BufferedProxyStorage.
Wed, Sep 23, 2:50 PM
tenma planned changes to D4018: Make all storages compatible with buffering.

build failed and one thing to rework

Wed, Sep 23, 1:25 PM
tenma created D4018: Make all storages compatible with buffering.
Wed, Sep 23, 1:14 PM
tenma added a revision to T2287: Improve code in BufferingProxyStorage: D4017: Improve code quality and doc in BufferedProxyStorage.
Wed, Sep 23, 1:08 PM · Easy hack, Storage manager
tenma created D4017: Improve code quality and doc in BufferedProxyStorage.
Wed, Sep 23, 1:08 PM

Tue, Sep 22

tenma accepted D3965: config: Deprecate SWHConfig mixin in favor of the load_from_envvar function.
Tue, Sep 22, 11:45 AM
tenma added inline comments to D3965: config: Deprecate SWHConfig mixin in favor of the load_from_envvar function.
Tue, Sep 22, 11:30 AM

Mon, Sep 21

tenma added a comment to D3965: config: Deprecate SWHConfig mixin in favor of the load_from_envvar function.

I think you should not remove this code as it has one use case (filename is provided as parameter, from CLI or not) but have a different function name for the "prod" use case (e.g. parse_config_file_envvar).
Some parts in the old code are not needed anymore, but not all. In another diff we will cover the other use case.
For now better to have 2 functions.

Mon, Sep 21, 2:48 PM
tenma updated the task description for T1410: Kill implicit configuration : new configuration scheme.
Mon, Sep 21, 2:20 PM · Core & foundations

Fri, Sep 18

tenma claimed T2287: Improve code in BufferingProxyStorage.
Fri, Sep 18, 11:59 AM · Easy hack, Storage manager

Thu, Sep 17

tenma updated the task description for T1410: Kill implicit configuration : new configuration scheme.
Thu, Sep 17, 6:12 PM · Core & foundations
tenma renamed T1410: Kill implicit configuration : new configuration scheme from Kill implicit configuration: new configuration scheme to Kill implicit configuration : new configuration scheme.
Thu, Sep 17, 5:20 PM · Core & foundations
tenma renamed T1410: Kill implicit configuration : new configuration scheme from Kill implicit configuration to Kill implicit configuration : new configuration scheme.
Thu, Sep 17, 10:50 AM · Core & foundations

Wed, Sep 16

tenma added inline comments to D3965: config: Deprecate SWHConfig mixin in favor of the load_from_envvar function.
Wed, Sep 16, 5:18 PM
tenma added inline comments to D3965: config: Deprecate SWHConfig mixin in favor of the load_from_envvar function.
Wed, Sep 16, 4:36 PM

Tue, Sep 15

tenma accepted D3953: config: Clarify the configuration setup path for the server part.
Tue, Sep 15, 6:07 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Tue, Sep 15, 4:12 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Tue, Sep 15, 4:01 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Tue, Sep 15, 3:57 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Tue, Sep 15, 3:56 PM
tenma committed rDDOC46ad8ea561c6: Update and organise debian deps for swh-env (authored by tenma).
Update and organise debian deps for swh-env
Tue, Sep 15, 3:40 PM
tenma closed D3954: Update and organise debian deps for swh-env.
Tue, Sep 15, 3:40 PM
tenma updated the diff for D3954: Update and organise debian deps for swh-env.

dedented debian packages and updated one description

Tue, Sep 15, 2:39 PM
tenma added a comment to D3954: Update and organise debian deps for swh-env.

Also, is the grouping and the description accurate?

Tue, Sep 15, 2:37 PM
tenma added inline comments to D3954: Update and organise debian deps for swh-env.
Tue, Sep 15, 2:34 PM
tenma created D3954: Update and organise debian deps for swh-env.
Tue, Sep 15, 2:09 PM
tenma created P764 developer setup debian packages doc.
Tue, Sep 15, 11:35 AM
tenma created P763 pg-dev package dependecies.
Tue, Sep 15, 10:45 AM

Mon, Sep 14

tenma closed D3932: use right abstraction replacing PosixPath with Path.
Mon, Sep 14, 2:10 PM
tenma committed rDTSCN8d7c6044f603: Use right abstraction replacing PosixPath with Path (authored by tenma).
Use right abstraction replacing PosixPath with Path
Mon, Sep 14, 2:10 PM
tenma committed rDTSCNcd487654f540: Refactor non-cli code out of cli.py in swh-scanner (authored by tenma).
Refactor non-cli code out of cli.py in swh-scanner
Mon, Sep 14, 2:10 PM
tenma closed D3931: refactor non-cli code out of cli in swh-scanner.
Mon, Sep 14, 2:10 PM
tenma committed rDTSCN0abe025e277b: Add standard config support and auth token for swh-scanner (authored by tenma).
Add standard config support and auth token for swh-scanner
Mon, Sep 14, 2:10 PM
tenma closed T2572: swh-scanner: add support for authentication token to lift rate-limit as Resolved by committing rDTSCN0abe025e277b: Add standard config support and auth token for swh-scanner.
Mon, Sep 14, 2:10 PM · Code scanner
tenma closed D3900: Add standard config support and HTTP auth token for swh-scanner.
Mon, Sep 14, 2:10 PM
tenma added a comment to D3931: refactor non-cli code out of cli in swh-scanner.

A message body is descriptive, the intent is different from the subject line, so it does not require imperative mood, as far as I know.
Commit bodies don't particularly use the imperative mood in the repo.
I mentioned the CLI functionality rather than the file, which I could also reformulate as "swh-scanner's CLI", but as your prefer I will use cli.py to be explicit about the location of the code.

Mon, Sep 14, 1:52 PM

Fri, Sep 11

tenma added a comment to D3932: use right abstraction replacing PosixPath with Path.

That's just typing, so it could just theoretically crash mypy with non-POSIX paths.
In windows there are MS paths and POSIX paths, depending on the API used.
I don't think it may actually pose a problem because the distinction only exists at runtime, it is just... semantically invalid.

Fri, Sep 11, 6:20 PM
tenma created D3932: use right abstraction replacing PosixPath with Path.
Fri, Sep 11, 5:41 PM
tenma created D3931: refactor non-cli code out of cli in swh-scanner.
Fri, Sep 11, 5:33 PM
tenma created P759 git diff WTF on imports.
Fri, Sep 11, 5:06 PM
tenma updated the diff for D3900: Add standard config support and HTTP auth token for swh-scanner.

Only included commit about config

Fri, Sep 11, 4:57 PM
tenma updated the title for P758 scanner erreur hors tests from scnner erreur hors tests to scanner erreur hors tests.
Fri, Sep 11, 4:11 PM
tenma created P758 scanner erreur hors tests.
Fri, Sep 11, 4:11 PM
tenma updated the diff for D3900: Add standard config support and HTTP auth token for swh-scanner.

rebased 2 times master and refactored commits, improving typing

Fri, Sep 11, 3:27 PM

Thu, Sep 10

tenma updated the diff for D3900: Add standard config support and HTTP auth token for swh-scanner.

Separated commits, improved config loading

Thu, Sep 10, 4:58 PM
tenma added inline comments to D3900: Add standard config support and HTTP auth token for swh-scanner.
Thu, Sep 10, 3:38 PM
tenma added inline comments to D3900: Add standard config support and HTTP auth token for swh-scanner.
Thu, Sep 10, 11:30 AM
tenma added inline comments to D3900: Add standard config support and HTTP auth token for swh-scanner.
Thu, Sep 10, 11:07 AM
tenma added inline comments to D3900: Add standard config support and HTTP auth token for swh-scanner.
Thu, Sep 10, 10:55 AM
tenma added reviewers for D3900: Add standard config support and HTTP auth token for swh-scanner: douardda, ardumont.
Thu, Sep 10, 10:37 AM

Wed, Sep 9

tenma added a revision to T2572: swh-scanner: add support for authentication token to lift rate-limit: D3900: Add standard config support and HTTP auth token for swh-scanner.
Wed, Sep 9, 7:58 PM · Code scanner
tenma created D3900: Add standard config support and HTTP auth token for swh-scanner.
Wed, Sep 9, 7:58 PM

Fri, Sep 4

tenma edited P755 Masterwork From Distant Lands.
Fri, Sep 4, 2:27 PM

Thu, Sep 3

tenma committed rDDOCaa22dbc87542: Adapt developer setup instructions as of sept 2020 (authored by tenma).
Adapt developer setup instructions as of sept 2020
Thu, Sep 3, 2:37 PM
tenma closed D3867: Adapt developer setup instructions as of sept 2020.
Thu, Sep 3, 2:37 PM
tenma updated the diff for D3867: Adapt developer setup instructions as of sept 2020.

Changed to install pre-commit as a python package in venv.
Removed PATH adjusting instructions since they are no longer needed here.

Thu, Sep 3, 12:19 PM
tenma added a comment to D3867: Adapt developer setup instructions as of sept 2020.

if the venv needs to be configured before pip, then pip install pre-commit should be below

The idea is to install it outside of a venv, to access it the same like the system package.
But I chose to install it as user (no pip install --system) because I think it shouldn't need to reside in root territory.
We can discuss the preferred approach :

  • system or user?
  • necessarily py3?

I don't think it needs to be py3 because instructions mentioned the Debian package which is py2 I think.

Thu, Sep 3, 11:48 AM

Wed, Sep 2

tenma created D3867: Adapt developer setup instructions as of sept 2020.
Wed, Sep 2, 6:31 PM