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

Ecosystem configuration refactoring #19

Closed
IceKhan13 opened this issue Sep 13, 2021 · 3 comments · Fixed by #39
Closed

Ecosystem configuration refactoring #19

IceKhan13 opened this issue Sep 13, 2021 · 3 comments · Fixed by #39
Assignees
Labels
enhancement New feature or request priority: normal Normal priority tasks QAMP fall 2021

Comments

@IceKhan13
Copy link
Member

What is the expected behavior?

Review ecosystem configuration files.

Currently configuration supports extra dependencies and tests commands and only works for python repositories and using tox as testing and configuration (which is good actually and follows other Qiskit projects)

We need at least to add extra configurable commands to run style checks and coverage.

Epic: #9

@IceKhan13 IceKhan13 added enhancement New feature or request QAMP fall 2021 labels Sep 13, 2021
@IceKhan13 IceKhan13 added the priority: high High priority tasks label Sep 24, 2021
@IceKhan13 IceKhan13 changed the title Ecosystem configuration file Ecosystem configuration file refactor Sep 24, 2021
@IceKhan13 IceKhan13 added priority: normal Normal priority tasks and removed priority: high High priority tasks labels Sep 24, 2021
@mickahell
Copy link
Collaborator

bouh :p

@IceKhan13
Copy link
Member Author

I think we need to address number of issue in current configuration setup:

  1. rename file appropriately. qe_config.json is not the best option
  2. we have this snippet in 3 runner files (coverage, tests, lint) which is not good. We should hide it inside configuration class or refactor somehow https://github.com/qiskit-community/ecosystem/blob/ac1c4a05ec1150f33593ce64dfeffca89465aa3a/ecosystem/runners/python_coverages_runner.py#L41-L50
  3. Optional: move from json to yaml (as all configs usually in yaml)
  4. Maybe store configuration class inside Repository class and store in db too. So this configuration will be deafult: if repository has config file -> we use it, if not -> we use config stored in DB

@IceKhan13 IceKhan13 changed the title Ecosystem configuration file refactor Ecosystem configuration refactoring Sep 27, 2021
@mickahell
Copy link
Collaborator

mickahell commented Sep 27, 2021

#39 (comment)

  1. rename file appropriately. qe_config.json is not the best option

Ok, for a more clear name (config_file, project_file, project_config, testing_config, ... ?)


  1. we have this snippet in 3 runner files (coverage, tests, lint) which is not good. We should hide it inside configuration class or refactor somehow

Yes, we could make a simple function in the runner class and call it


  1. Optional: move from json to yaml (as all configs usually in yaml)

hmm, does it really mater ? I don't know the usual best practice, but I find the json file pretty clear to read and easy to fill


  1. Maybe store configuration class inside Repository class and store in db too. So this configuration will be deafult: if repository has config file -> we use it, if not -> we use config stored in DB

Hmm.. for me if the project don't have the config file, we just should use the default parameters and that's it. I don't see the place of these parameters in the db.
And, if a project has a config file I thing he'll keep it and not removing it even if it's not used anymore.


Suggestion

Maybe we can add a check of if already exist a tox file, if yes we don't render our and just run the tests with the one who is already here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: normal Normal priority tasks QAMP fall 2021
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants