Skip to content
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

Deprecate StateLog model, to instead, bring your own model. #176

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

ticosax
Copy link
Member

@ticosax ticosax commented Apr 4, 2023

This is an implementation that support the idea exposed in #133

It's still a Draft, I'm open for any feedback more specifically around the names. Not tested yet with a real project.

It's meant to be completely backward compatible.

@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

Merging #176 (39ac59d) into master (06422d5) will decrease coverage by 0.26%.
The diff coverage is 92.91%.

❗ Current head 39ac59d differs from pull request most recent head 9262180. Consider uploading reports for the commit 9262180 to get more accurate results

@@            Coverage Diff             @@
##           master     #176      +/-   ##
==========================================
- Coverage   97.28%   97.02%   -0.26%     
==========================================
  Files          24       25       +1     
  Lines         516      572      +56     
==========================================
+ Hits          502      555      +53     
- Misses         14       17       +3     
Impacted Files Coverage Δ
...ango_fsm_log/migrations/0004_auto_20190131_0341.py 100.00% <ø> (ø)
django_fsm_log/backends.py 81.25% <50.00%> (+0.21%) ⬆️
django_fsm_log/admin.py 90.00% <75.00%> (-10.00%) ⬇️
django_fsm_log/apps.py 100.00% <100.00%> (ø)
django_fsm_log/conf.py 100.00% <100.00%> (ø)
django_fsm_log/managers.py 100.00% <100.00%> (ø)
django_fsm_log/migrations/0001_initial.py 100.00% <100.00%> (ø)
django_fsm_log/models.py 100.00% <100.00%> (ø)
tests/admin.py 100.00% <100.00%> (ø)
tests/conftest.py 100.00% <100.00%> (ø)
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ticosax ticosax force-pushed the gh-133-state-lessmodels branch 2 times, most recently from be8f775 to f8c879f Compare April 5, 2023 09:10
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
```

Additionally you'd want to migrate the data from django_fsm_log.models.StateLog to your new table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have an example/snippet here that can be used as a base.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it could be a nice addition, If I have to go through that path. I'll add it.
As of today I don't have incentive to migrate to an internal concrete model within the projects I maintain. It will come at some point, probably not as part of this PR though.

django_fsm_log/admin.py Outdated Show resolved Hide resolved
django_fsm_log/managers.py Outdated Show resolved Hide resolved
django_fsm_log/managers.py Outdated Show resolved Hide resolved
django_fsm_log/managers.py Outdated Show resolved Hide resolved
django_fsm_log/models.py Outdated Show resolved Hide resolved
django_fsm_log/models.py Outdated Show resolved Hide resolved
Comment on lines +65 to +66
"\nPlease check the documentation at https://django-fsm-log.readthedocs.io/en/latest/"
"\nto know how to.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"\nPlease check the documentation at https://django-fsm-log.readthedocs.io/en/latest/"
"\nto know how to.",
"\nSee the documentation at https://django-fsm-log.readthedocs.io/en/latest/.",

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: use more specific link.

ticosax and others added 10 commits April 26, 2023 09:30
This is an implementation that support the idea exposed in
jazzband#133

It's still a Draft, I'm open for any feedback more specifically around the names.
Not tested yet with a real project.

It's meant to be completely backward compatible.
Co-authored-by: Daniel Hahler <[email protected]>
Co-authored-by: Daniel Hahler <[email protected]>
Co-authored-by: Daniel Hahler <[email protected]>
@ticosax ticosax changed the title Deprecate StateLog model, to instead bring your own model. Deprecate StateLog model, to instead, bring your own model. Jul 12, 2023
@samuel-andres
Copy link

What happened with this? 👀

@thomasmassmann
Copy link

@ticosax , do you need some help finishing this PR?

@ticosax
Copy link
Member Author

ticosax commented Apr 10, 2024

@thomasmassmann If I recall correctly, I left it in an alpha state. It's meant to be testable with existing projects.
What needs to be done is to check/develop a migration path, enhance the documentation around that transition, catch bugs, and make sure we can offer a smooth transition with clear guidelines, before making a major release.

Unfortunately I'm not using Django at the moment, which means I can't commit time to it. But hopefully this work can be continued by more contributors.

@thomasmassmann
Copy link

@thomasmassmann If I recall correctly, I left it in an alpha state. It's meant to be testable with existing projects. What needs to be done is to check/develop a migration path, enhance the documentation around that transition, catch bugs, and make sure we can offer a smooth transition with clear guidelines, before making a major release.

Unfortunately I'm not using Django at the moment, which means I can't commit time to it. But hopefully this work can be continued by more contributors.

I’m working on a bigger Django project where I would like to use it and would need those changes being available. Depending on the importance of this for the stakeholders, I could be stepping in in the second half of this year.

What would be your preferred way for contribution? Continue in your fork or create a new fork of your changes?

@ticosax
Copy link
Member Author

ticosax commented Apr 10, 2024

What would be your preferred way for contribution? Continue in your fork or create a new fork of your changes?

I don't want to stay in the way. I think it's preferable that you clone the PR and then you re-submit a new PR from your fork. As long as you keep attributions to my identity, make the process as easy as you'd like.
I'm also okay with rebasing and squashing the existing commits if that's what you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants