-
Notifications
You must be signed in to change notification settings - Fork 51
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
ketcher2 User templates #1984
ketcher2 User templates #1984
Conversation
``` bin/ket2-install.sh ``` compatible version of ketcher 2 to install tracked in .service-dependencies
…lstorage in file format
…OFILES collection
LCOV of commit
|
LCOV of commit
|
…ublic/public_editor public/editors
app/api/chemotion/profile_api.rb
Outdated
|
||
# remove file from store | ||
file_path = Rails.root.join('uploads', Rails.env, params[:path]) | ||
File.delete(file_path) if(File.exist?(file_path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/NonAtomicFileOperation: Use atomic file operation method FileUtils.rm_f
.
app/api/chemotion/profile_api.rb
Outdated
|
||
# remove file from store | ||
file_path = Rails.root.join('uploads', Rails.env, params[:path]) | ||
File.delete(file_path) if(File.exist?(file_path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceAroundKeyword: Space after keyword if
is missing.
app/api/chemotion/profile_api.rb
Outdated
|
||
# remove file from store | ||
file_path = Rails.root.join('uploads', Rails.env, params[:path]) | ||
File.delete(file_path) if(File.exist?(file_path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/NonAtomicFileOperation: Remove unnecessary existence check File.exist?
.
requires :path, type: String, desc: 'file path of user template' | ||
end | ||
delete do | ||
user_templates = current_user.profile.user_templates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/IndentationWidth: Use 2 (not 0) spaces for indentation.
app/api/chemotion/profile_api.rb
Outdated
new_profile) || error!('profile update failed', 500) | ||
|
||
{ status: true } | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/BlockAlignment: end
at 207, 8 is not aligned with delete do
at 191, 6.
|
||
# remove file from store | ||
file_path = Rails.root.join('uploads', Rails.env, params[:path]) | ||
File.delete(file_path) if File.exist?(file_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/NonAtomicFileOperation: Use atomic file operation method FileUtils.rm_f
.
|
||
# remove file from store | ||
file_path = Rails.root.join('uploads', Rails.env, params[:path]) | ||
File.delete(file_path) if File.exist?(file_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/NonAtomicFileOperation: Remove unnecessary existence check File.exist?
.
LCOV of commit
|
LCOV of commit
|
made redundant by #2061 |
This PR resolves Sub-feature (1.4) of Issue # 138:
User.template.feature.demo.1.mp4
rather 1-story 1-commit than sub-atomic commits
commit title is meaningful => git history search
commit description is helpful => helps the reviewer to understand the changes
code is up-to-date with the latest developments of the target branch (rebased to it or whatever) => ⏩-merge for linear history is favoured
added code is linted
tests are passing (at least locally): we still have some random test failure on CI. thinking of asking spec/examples.txt to be commited
in case the changes are visible to the end-user, video or screenshots should be added to the PR => helps with user testing
testing coverage improvement is improved.
CHANGELOG : add a bullet point on top (optional: reference to github issue/PR )
parallele PR for documentation on docusaurus if the feature/fix is tagged for a release