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

Allow extra information in bear-requirements.yaml #2444

Closed
jayvdb opened this issue Apr 18, 2018 · 5 comments · Fixed by #2446
Closed

Allow extra information in bear-requirements.yaml #2444

jayvdb opened this issue Apr 18, 2018 · 5 comments · Fixed by #2446

Comments

@jayvdb
Copy link
Member

jayvdb commented Apr 18, 2018

.ci/generate_bear_requirements.py currently overwrites bear-requirements.yaml, removing any information that was in it.

It should load the yaml, and have

  • an --update mode which modifies only the information which needs to be modified. This can be achieved using https://pypi.org/project/ruamel.yaml/ 's RoundTrip functionality.

  • a --check mode which reports any differences in a helpful way, tells the user to run in --update mode and commit and re-push, with a non-zero exit status when differences were found.

In travis, we would --check and --update, so that any yaml output differences will be caught by git diff --exit-code even if --check doesnt report dependency differences.

To test this, overrides: coala-build.yaml should be moved to the top of bear-requirements.yaml, and a comment added at the top of the file, and travis shouldnt report any differences.

@nemani
Copy link
Member

nemani commented Apr 18, 2018

I don't understand the RoundTrip Functionality and cant find any documentation/explanation of what it does exactly.

@nemani
Copy link
Member

nemani commented Apr 18, 2018

Nevermind, understood the first part of the description :)

@nemani
Copy link
Member

nemani commented Apr 19, 2018

I will be sending in the PR soon, testing it on my fork travis takes too long as the build takes 2 hours :(

@jayvdb
Copy link
Member Author

jayvdb commented Apr 19, 2018

ya, you need to test these things locally, and then hope for the best with the PR.
But use the travis cron triggers (in settings) to do a build of master (weekly) on your fork, as that will prime your forks cache so your branches can use the master cache.

@nemani
Copy link
Member

nemani commented Apr 19, 2018

The extra information will not be a part of the requirements right?

I mean do both the update and check need to be shallow or deep?

extra info:
  ...
npm_requirements:
  ...
gem_requirements:
  csvlint: true
  ...

nemani added a commit to nemani/coala-bears that referenced this issue Apr 19, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Add Update and Check mode for diffing and updating
Bear-Requirments yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Apr 19, 2018
TODO: break into commits.
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Add Update and Check mode for diffing and updating
Bear-Requirments yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue May 27, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue May 28, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jun 20, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jun 20, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
gitmate-bot pushed a commit to nemani/coala-bears that referenced this issue Jun 22, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
gitmate-bot pushed a commit to nemani/coala-bears that referenced this issue Jun 24, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 4, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 4, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 4, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 4, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 4, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 5, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 5, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 5, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 7, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
nemani added a commit to nemani/coala-bears that referenced this issue Jul 13, 2018
This commits updates the script to use ruamel.yaml
which is better fork of PyYaml.
Also adds Update and Check mode for diffing and
updating Bear-Requirements yaml.

Closes coala#2444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants