python-medikit / medikit Goto Github PK
View Code? Open in Web Editor NEWStrongly opinionated python project management.
Home Page: https://python-medikit.github.io/
Strongly opinionated python project management.
Home Page: https://python-medikit.github.io/
Some fatals are really normal, and the stack trace dump misleads the user into thinking there is something wrong with the software.
For example:
FileExistsError Already started, use `medikit pipeline release start --force` to force a restart, or use `medikit pipeline release continue`.
Find a better way to output this, while not hiding anything (stack trace should be accessible, even if maybe hidden by default).
Maybe this should be a https://github.com/python-mondrian/mondrian feature ?
Tornado is only used to format logs nicely, and it's a bit overkill to depend on a web framework for this job. Let's code a minimal and similar log formatter and remove it.
Let's see if we can use projectfiles for no-python projects, like okdocker or maybe a node only project.
Probably linked to releasing with multiple version targets. Works with 3.5/3.6 but complains with 3.7. Need bytecode cache clearing between versions and/or regeneration? Maybe it's just because py3.7 is not released yet?
Traceback (most recent call last):
File "setup.py", line 78, in <module>
download_url='https://github.com/python-medikit/medikit/archive/{version}.tar.gz'.format(version=version),
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 209, in run
os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 245, in zip_safe
return analyze_egg(self.bdist_dir, self.stubs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 355, in analyze_egg
safe = scan_module(egg_dir, base, name, stubs) and safe
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 392, in scan_module
code = marshal.load(f)
Maybe delegate all unknown tasks to and entrypoint provided by the project ? At elast allow to do so ?
How would that work with "help" task, as there would then be 2 different command lists ?
docker.set_remote(registry=...)
docker.use_rocker_builder()
works but not the other way round, because the variables are computed at use_* call time.
Find a way to make it work both ways.
Easy to do the following, but one should opt-in to prereleases.
--- a/medikit/feature/python.py
+++ b/medikit/feature/python.py
@@ -309,7 +309,7 @@ class PythonFeature(Feature):
tmpfile.name, finder=repository.finder, session=repository.session, options=pip_options
)
)
- resolver = Resolver(constraints, repository, prereleases=False, clear_caches=False, allow_unsafe=False)
+ resolver = Resolver(constraints, repository, prereleases=True, clear_caches=False, allow_unsafe=False)
self.render_file_inline(
'requirements{}.txt'.format('-' + extra if extra else ''),
README.rst vs README.md, travis config, etc ...
Coul help for releases, both of this project and managed ones.
Event bubbling should still be visible if someone wants to see it, but this should not be the default.
Should be already enabled by the git
feature, but we need to test that, and maybe have command line flags to avoid updating git repo if unwanted.
So we can do:
(python
.setup(...)
.add_requirements(...)
)
This is already available for the nodejs feature, generalize this.
Pipelines are very raw, for now. Enhancements that would be a quick win:
This file is generated by medikit ... Recipe is Projectfile, regenerate using "make update", "make update-requirements" or medikit update (if make update broken).
There should be a version check in there, maybe better output too.
And maybe refuse to auto-install/upgrade if systemwide python.
And use python variables instead of hardcode.
This is what sphinx does, we don't have the full list available outside of the makefile but we may do it with simple "echo" lines (and I believe until recently, sphinx was doing the same).
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
pip._vendor.pkg_resources.ContextualVersionConflict: (stevedore 1.28.0 (/Users/rd/.virtualenvs/rdnet/lib/python3.6/site-packages), Requirement.parse('stevedore<1.28,>=1.27'), {'bonobo'})
make: *** [install] Error 2
Make('clean install') is complete, moving forward.
While releasing, no check is done on version number. Add the following:
Current version: 0.5.8 Git version: 0.5.8
Next version? 0.5.9
Mock/MagicMock calls are recorded in order, we may be able to improve the configuration process with a really nice syntax by recording all calls to mock objects then replaying them on real configurator objects once the config parsing is finished.
pkg_resources.DistributionNotFound: The 'stevedore<1.20,>=1.19' distribution was not found and is required by edgy.project
A lightweight "make check" task could run a lightweight environment check :
Can enhance the DX / onboarding for medikit-unaware developpers on managed projects.
edgy-project will recreate an empty git repo if, for example, git repo is in ..
Should not happen.
Michael had an old setuptools version, and looks that setup.py was not parseable.
(bonobo)bash-3.2$ pip install --upgrade setuptools
Collecting setuptools
Using cached setuptools-36.6.0-py2.py3-none-any.whl
Installing collected packages: setuptools
Found existing installation: setuptools 18.2
Uninstalling setuptools-18.2:
Successfully uninstalled setuptools-18.2
Successfully installed setuptools-36.6.0
(Do not work with 18.2, but works with 36.6)
Error was:
(bonobo)bash-3.2$ pip install --editable bonobo
Obtaining file:///Users/misha/pyconde17/bonobo
Complete output from command python setup.py egg_info:
error in bonobo setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /Users/misha/pyconde17/bonobo/
Following code kept for reference even if not working, but it would be amazing to be able to tune settings (like ensure that something is in INSTALLED_APPS). Maybe not achievable easily and safely, though.
# Use yapf to adjust settings (for example, add some apps).
@subscribe('medikit.feature.django.on_configure')
def on_django_configure(self, event):
original_source, newline, encoding = yapf_api.ReadFile('config/settings.py')
print(original_source, newline, encoding)
reformatted_code, encoding, has_change = yapf_api.FormatFile(
'config/settings.py',
in_place=True,
)
print(reformatted_code, encoding, has_change)
Should we version check too ?
Pipelines would benefit it too
Hi 👊
This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.
Once you have closed this issue, I'll create seperate pull requests for every update as soon as I find one.
That's it for now!
Happy merging! 🤖
Something like edgy-project list-event
should list all available events, by feature, so it's easier to customise Projectfile. Available event content would be nice to have, too.
Readme of bonobo breaks windows install because of emoji.
For now, we have "yapf" feature.
Maybe, we'd prefer to have a "formatting" feature, that can use different "implementations" to work with different languages.
Python code can use google/yapf, ambv/black, prettier, ...
Javascript code can use prettier, ...
Etc.
Related to #83
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.