PRs to review for ftw.upgrade

I have a couple of PRs to review on:

since quite some time.

Is there anybody here from FTW that can push them forward?

Thanks a lot!

Hi @alert

I'm a former employee (until 2020) of 4teamwork.
I now have my own company, which does Plone development. I currently use a fork of this package on my deployments.

I'm afraid nobody will take care of your PR's there. I might be wrong, but since they are open for a while, I guess that's a solid statement.

I can offer to fork it and create a new package, including tests, within the wcs or collective namespace. collective.upgrade already exists though.

Any idea for a different name? I need the package as well and I'm happy to maintain it.

Cheers,
Mathias

collective.ftwupgrade :slight_smile:

I have also a a couple of PRs on ftw.tokenauth to provide Python 3 and Plone 5.2 (and 6) compatibility, and was thinking of forking or requesting transfer it to the collective...

I will check the PRs and possibily fork-and-rename them.

Thank you all for your feedback.

I know a bit about 4teamwork story.
It is a pity that all the wonderful code that has been opened sourced across those years is now quite hard to maintain.

BTW, business is business...
I also have the need to maintain this package and already got some PRs merged in the past.

IMO the best course of action would be to:

  1. transfer the GH repo to the collective organization
  2. share the PyPI project with the collective user and some other trusted maintainers

This seems pretty unlikely.

I would still wait a bit (e.g. until beginning of June) and if nothing works I would go for a fork.

The name collective.ftwupgrade is a nice suggestion, another option being collective.ftw.upgrade.
I do not have a strong opinion here, but I like consistency.

Bear in mind that something similar, as @erral mentioned, might happen to ftw.tokenauth or ftw.whatever.

So let me know what do you think and let's see how to approach this the best possible way.

Thanks again!

2 Likes

Yeah it is, they changed strategy...

I'm happy to help, though... I worked there for a long time and also contributed a lot to some of those packages.

My business partner and me started a new business 3 years ago. So we were really busy getting this off the ground and there was not much time to contribute back to the community.

In the meanwhile, I have a bit more time to make some of the stuff we developed opensource (like wcs.samlauth or wcs.adminauth) and contribute more to Plone itself and other packages.

But I took a shortcut for some of the ftw packages, just made forks and implemented untested commits, that served my purpose.

I can probably do everything but setup testing (CI) in the collective namespace. For our company, we use CircleCI, and I'm not sure if I can hook it up easy within the collective organization.

I, personally, would most likely get rid of the "ftw", but if that makes sense to you guys, I'm ok with it as well.

1 Like

I can probably do everything but setup testing (CI) in the collective namespace

Collective packages can use GHA.
That is set-up when you run plone/meta.

I, personally, would most likely get rid of the "ftw", but if that makes sense to you guys, I'm ok with it as well.

I have no strong opinion on that, but:

  • for sure we need to give credit to FTW
  • a package like collective.ftw.whatever will make it clear the history of that package (at least for me)
1 Like

Thanks!

I started working on it.

I converted ftw.upgrade to collective.ftw.upgrade and used cookieplone for scaffolding.

There are some dependencies to other ftw test packages. I probably have to resolve or remove or reimplement.

The repo is currently here: GitHub - webcloud7/collective.ftw.upgrade
I'll keep the complete git history, once I have a working package and all tests are passing, we can move it to the collective and adapt to plone/meta.

Current state:

  Ran 195 tests with 11 failures, 52 errors, 20 skipped in 39.464 seconds.
Tearing down left over layers:
  Tear down collective.ftw.upgrade.testing.ftw.upgrade:functional in 0.000 seconds.
  Tear down collective.ftw.upgrade.testing.UpgradeLayer in 0.001 seconds.
  Tear down ftw.testing.layer.ComponentRegistryIsolationLayer in 0.000 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.023 seconds.
  Tear down plone.testing.zope.Startup in 0.002 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.000 seconds.
  Tear down ftw.testing.layer.TempDirectoryLayer in 0.000 seconds.
  Tear down ftw.builder.testing.set_builder_session_factory in 0.000 seconds.
  Tear down ftw.builder.testing.BuilderLayer in 0.000 seconds.
Total: 305 tests, 11 failures, 56 errors, 20 skipped in 51.868 seconds.```
2 Likes

Progress report:

All tests are passing now!! :partying_face:

  Ran 72 tests with 0 failures, 0 errors, 1 skipped in 4 minutes 24.329 seconds.
Running collective.ftw.upgrade.testing.ftw.upgrade-intid:functional tests:
  Tear down collective.ftw.upgrade.testing.ftw.upgrade:command_and_functional in 0.000 seconds.
  Tear down plone.app.testing.layers.Plone:WSGIServer in 0.000 seconds.
  Tear down plone.testing.zope.WSGIServer in 0.002 seconds.
  Tear down ftw.builder.testing.set_builder_session_factory in 0.000 seconds.
  Tear down ftw.testing.layer.ftw.upgrade:command in 0.019 seconds.
  Set up collective.ftw.upgrade.testing.IntIdUpgradeLayer in 0.019 seconds.
  Set up ftw.builder.testing.set_builder_session_factory in 0.000 seconds.
  Set up collective.ftw.upgrade.testing.ftw.upgrade-intid:functional in 0.000 seconds.
  Running:

  Ran 44 tests with 0 failures, 0 errors, 0 skipped in 3.606 seconds.
Running collective.ftw.upgrade.testing.ftw.upgrade:functional tests:
  Tear down collective.ftw.upgrade.testing.ftw.upgrade-intid:functional in 0.000 seconds.
  Tear down collective.ftw.upgrade.testing.IntIdUpgradeLayer in 0.001 seconds.
  Tear down ftw.builder.testing.set_builder_session_factory in 0.000 seconds.
  Set up plone.testing.zope.WSGIServer in 0.015 seconds.
  Set up plone.app.testing.layers.Plone:WSGIServer in 0.000 seconds.
  Set up ftw.builder.testing.set_builder_session_factory in 0.000 seconds.
  Set up collective.ftw.upgrade.testing.ftw.upgrade:functional in 0.000 seconds.
  Running:

  Ran 192 tests with 0 failures, 0 errors, 20 skipped in 47.298 seconds.
Tearing down left over layers:
  Tear down collective.ftw.upgrade.testing.ftw.upgrade:functional in 0.000 seconds.
  Tear down plone.app.testing.layers.Plone:WSGIServer in 0.000 seconds.
  Tear down plone.testing.zope.WSGIServer in 0.002 seconds.
  Tear down collective.ftw.upgrade.testing.UpgradeLayer in 0.001 seconds.
  Tear down ftw.testing.layer.ComponentRegistryIsolationLayer in 0.000 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.030 seconds.
  Tear down plone.testing.zope.Startup in 0.004 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.000 seconds.
  Tear down ftw.testing.layer.TempDirectoryLayer in 0.000 seconds.
  Tear down ftw.builder.testing.set_builder_session_factory in 0.000 seconds.
  Tear down ftw.builder.testing.BuilderLayer in 0.000 seconds.
Total: 391 tests, 0 failures, 0 errors, 21 skipped in 6 minutes 12.750 seconds.

Next steps:

  • Remove/Resolve ftw.testing dependency
  • Potentially move code over from ftw.testing.
6 Likes

Thanks a lot @maethu!
If you need some help, just shout!

2 Likes

Thanks @alert

I was able to remove ftw.testing as test dependency.

There is still ftw.builder, which is by the way an excellent package to create readable tests.

I have to transform this one too to collective.ftw.builder.

collective.ftw.upgrade tasks:

  • Update documentation (readme, changelog, etc.)
  • apply plone/meta
  • Format code
  • more?

Help with appying plone/meta to setup tests, etc. would be appriciated

1 Like
  1. install plone/meta
git clone https://github.com/plone/meta.git
cd meta
python3 -m venv venv
venv/bin/pip install -e .
  1. apply default config
    run config-package --no-commit /path/to/collective.ftw.upgrade

  2. edit your .meta.toml and add

[tox]
test_runner = "zope.testrunner"
test_path = "/src"
test_matrix = { "6.1" = ["3.13", "3.10"], "6.0" = ["3.13", "3.9"] }
use_mxdev = true
constraints_files = { "6.1" = "https://dist.plone.org/release/6.1-latest/constraints.txt", "6.0" = "https://dist.plone.org/release/6.0-latest/constraints.txt" }
test_environment_variables = """
    zope_i18n_compile_mo_files=True
"""

and run config-package --no-commit /path/to/collective.ftw.upgrade

Note: every changes in the .meta.toml requires a run config-package --no-commit /path/to/collective.ftw.upgrade to apply the new config to your package

In your package call simply:

if use_mxdev = true run

tox -e init

and then:

run linting

tox -e lint

run dependencies check

tox -e dependencies

run circular check

tox -e circular

or all together:

tox
1 Like

Thanks a lot I started a branch, unluckily I failed to use the proper base branch :stuck_out_tongue:

I will now bring my changes to the rebuild-branch branch.

Shoot sorry. Probably my bad, i did not communicate the branch I'm working on!

Thank so much @alert for the help!

I moved the repo over to GitHub - collective/collective.ftw.upgrade

I will work on documentation a bit and use it in my production environment.

I'll also document an upgrade path from ftw.upgrade to collective.ftw.upgrade (As far as I know there is only a browserlayer and an action, nothing else is persisted.)

After that I think we can make the first release :slight_smile: