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

dm/config-refactor #185

Merged
merged 15 commits into from Dec 6, 2019
Merged

dm/config-refactor #185

merged 15 commits into from Dec 6, 2019

Conversation

@dmerejkowsky
Copy link
Member

@dmerejkowsky dmerejkowsky commented Dec 3, 2019

Fix #178
Fix #179
Fix #180
Fix #181

@codecov-io
Copy link

@codecov-io codecov-io commented Dec 3, 2019

Codecov Report

No coverage uploaded for pull request base (master@5e2ad51). Click here to learn what that means.
The diff coverage is 89.31%.

@@            Coverage Diff            @@
##             master     #185   +/-   ##
=========================================
  Coverage          ?   83.51%           
=========================================
  Files             ?       30           
  Lines             ?     1650           
  Branches          ?      199           
=========================================
  Hits              ?     1378           
  Misses            ?      223           
  Partials          ?       49
@dmerejkowsky dmerejkowsky force-pushed the dm/config-refactor branch 3 times, most recently from 33795d0 to 4a15ce9 Dec 3, 2019
dmerejkowsky added 15 commits Nov 29, 2019
Turns out we don't really need it - the logic to use
all elements from the group list belongs to higher-level
code like the `sync` or `foreach` implementation
Do not use `gitlab` and `github_enterprise` nested classes, just use
`gitlab_url` and `github_enterprise_url` attributes.

Also, get rid of the named types in tsrc/manifest.py - one of them
(ManifestConfig) had the same name as an other class! If anything, we
should use TypedDict instead

Finally, rename vague `.load()` method into `apply_config()`
LocalManifest class:
* no longer hold any configuration, and only knows how to
update the manifest clone in <workspace>/.tsrc/manifest. All configuration
attributes are now managed by the WorkspaceConfig class
* rename confusing `manifest` property into a `get_manifest()` method

Workspace class:
* contains a LocalManifest and a WorkspaceConfig instance.
* instead of having to call `load_manifest`, the config file in
`<workspace>/.tsrc/config.yml` is parsed in Workspace ctor
* remove some delegation methods that were reading config from
  self.local_manifest and either use
    - self.config or
    - self.local_manifest.get_manifest()

Also, no longer handle local manifest commit from a *path* and not an url, and
get rid of the concept of a manifest *tag* altogether.

Finally, get rid of the confusing "active_groups" naming. It's now in WorkspaceConfig.repo_groups
which is hopefully a better location and nome.
* `tsrc init` can now only be called once, and always with an URL
* Get rid of the `--file` option
Instead of running `init` twice, we need too
check what happens when we change the manifest
branch in the workspace config.
Fix #180, #178
Fix #186
Before:
  tsrc init --group foo --group bar

After:
   tsrc init --groups foo bar
This adds links from the doc to the GitHub repo, and also an "Edit this page
on GitHub" link, which is nice :)
@dmerejkowsky dmerejkowsky force-pushed the dm/config-refactor branch from 4a15ce9 to 55bb73a Dec 3, 2019
@dmerejkowsky dmerejkowsky merged commit f6ee476 into master Dec 6, 2019
9 checks passed
9 checks passed
run_linters
Details
run_tests (3.5, ubuntu-latest)
Details
run_tests (3.5, macos-latest)
Details
run_tests (3.6, ubuntu-latest)
Details
run_tests (3.6, macos-latest)
Details
run_tests (3.7, ubuntu-latest)
Details
run_tests (3.7, macos-latest)
Details
run_tests (3.8, ubuntu-latest)
Details
run_tests (3.8, macos-latest)
Details
@dmerejkowsky dmerejkowsky deleted the dm/config-refactor branch Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.