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

Develop refactoring #428

Merged
67 commits merged into from
Dec 28, 2020
Merged

Develop refactoring #428

67 commits merged into from
Dec 28, 2020

Conversation

oltionchampari
Copy link
Contributor

@oltionchampari oltionchampari commented Sep 17, 2020

Closes #425

Developer Checklist (Definition of Done)

  • Descriptive title for this pull request provided (will be used for release notes later)
  • All acceptance criteria from the issue are met
  • Branch is up-to-date with the branch to be merged with, i.e., develop
  • Code is cleaned up and formatted
  • Code documentation written
  • Unit tests written
  • Build is successful
  • Summary of changes written
  • Wiki documentation written
  • Assign at least one reviewer
  • Assign at least one assignee
  • Add type label (e.g., bug, enhancement) to this pull request
  • Add next version label (e.g., release: minor) to this PR following semver

Summary of changes

  • utils:

    • split version to NpmUtils and PipUtils (make a VersionUtils for functions that can be used by both techniques)
    • rename Repo to RepoUtils and make it static
    • add pip to PipUtils
    • add checkRequiredVersion(requriedNode, requiredNpm) to NpmUtils Add tests to test the check-node-version generator.
  • SpawnUtils

    • abort(msg)
    • spawn(cmd, argline, cwd)
    • spawnOrAbort(cmd, argline,cwd)
    • spawnCommand(command: string, args: string[], opt?: {}): any; --> check from generator (It is not necessary since it is not used in any generator anymore. All generators use the sync version)
    • spawnCommandSync(command: string, args: string[], opt?: {}): any; --> check from generator
  • GeneratorUtils

    • checkVersion
  • WorkspaceUtils

    • clonePlugins(log, plugins, ssh, reslolve, workspace, destinationPath) - from clone. (This is part of the clone generator which is deprecated and does not work)
    • resolveNeighbors(log, plugins, useSSH, types, shallow, destinationPath) - from clone
    • cloneRepository(log, repoUrl, branch, extras, destinationPath, cwd) - from clone-repo (created a Util function called cloneRepo that calls the clone-repo generator instead so we do not have to parse the arguments ourselves)
    • add all of list-plugins

Screenshots

@oltionchampari oltionchampari added the type: refactor Refactor the current implementation label Sep 17, 2020
@ghost
Copy link

ghost commented Oct 27, 2020

@oltionchampari very, very good work 👍

could you also change all required with "xxx" to required with 'xxx'

@oltionchampari
Copy link
Contributor Author

@anita-steiner I have addressed your feedback, so you may take another look when you have time.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

The following doesn't work as expected:

  • init-setup: the workspace command is executed in the wrong directory; so the workspace is unusable at the moment
  • app: throws an exception - what should this generator do?
  • init-app-slib: throws an error: You don't seem to have a generator with the name “phovea:init-undefined” installed.
  • why is the cwd a parameter for the generator and must be stored in the yo-rc file

@oltionchampari
Copy link
Contributor Author

Documentation

  • To check what genrator-phovea version is currently installed:
    npm ls -g --depth=0 generator-phovea ---> [email protected]

  • To check wheather u are using the develop branch (linked)
    npm ls -g --depth=0 generator-phovea --link=true --> [email protected]

We could integrate these commands as a --version flag in the generator.

@oltionchampari
Copy link
Contributor Author

The following doesn't work as expected:

  • init-setup: the workspace command is executed in the wrong directory; so the workspace is unusable at the moment
  • app: throws an exception - what should this generator do?
  • init-app-slib: throws an error: You don't seem to have a generator with the name “phovea:init-undefined” installed.
  • why is the cwd a parameter for the generator and must be stored in the yo-rc file
  • I removed the cwd from the yo-rc.json.
  • The rest of the errors i could not reproduce.

@ghost
Copy link

ghost commented Nov 30, 2020

  • To check what genrator-phovea version is currently installed:
    npm ls -g --depth=0 generator-phovea ---> [email protected]
  • To check wheather u are using the develop branch (linked)
    npm ls -g --depth=0 generator-phovea --link=true --> [email protected]

We could integrate these commands as a --version flag in the generator.

I made a new issue for that: #442

@ghost
Copy link

ghost commented Nov 30, 2020

I think there is again a problem with the folder structure: i executed init-app
image

The generator generates two folder: test and test-app

image

in test-plugin there are only the following files:

ISSUE_TEMPLATE
LICENSE
package.json
README.md

@oltionchampari
Copy link
Contributor Author

oltionchampari commented Nov 30, 2020

I think there is again a problem with the folder structure: i executed init-app
image

The generator generates two folder: test and test-app

image

in test-plugin there are only the following files:

ISSUE_TEMPLATE
LICENSE
package.json
README.md

The error occurred for types app and service when called from the workspace and pluginName and applicationName/serviceName are different .
I included those cases when copying the templates.

@ghost ghost merged commit e112093 into develop Dec 28, 2020
@ghost ghost deleted the develop_refactoring branch December 28, 2020 09:23
@dvvanessastoiber dvvanessastoiber mentioned this pull request Feb 15, 2021
21 tasks
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: minor PR merge results in a new minor version type: refactor Refactor the current implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants