Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • dumux dumux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 100
    • Issues 100
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 86
    • Merge requests 86
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • dumux-repositoriesdumux-repositories
  • dumuxdumux
  • Merge requests
  • !3359

remove ".git" with endswidth check rather than rstrip

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ned Coltman requested to merge fix/installscript into master Jan 11, 2023
  • Overview 3
  • Commits 1
  • Pipelines 4
  • Changes 1

What this MR does / why does DuMux need it:

The make_installscript.py script cleans the URL provided to find the name of the module that it wants to clone. During the cleaning, the ".git" ending is removed using the string rstrip method.

Unfortunately, if the module ends with the characters g, i, t, or ., these are also removed. Here is an example:

url = "https://gitlab.dune-project.org/core/dune-something.git"
targetModule = url.rstrip(".git").split("/")[-1]
print(targetModule)

returns dune-somethin, where the actual target should be dune-something

Notes for the reviewer

url = "https://gitlab.dune-project.org/core/dune-something.git"
targetModule = url.split("/")[-1].replace(".git", "")
print(targetModule)

returns dune-something. I tested this briefly and it works for all cases I can think of.

I guess we don't have many dumux-appl modules that end in those characters, and the dumux-pub modules typically end in numbers or characters earlier in the alphabet.

Before you request a review from someone, make sure to revise the following points:

  • does the new code follow the style guide?
  • do the test pipelines pass? (see guide on how to run pipelines for a merge request)
  • is the code you changed and/or the new code you wrote covered in the test suite? (if not, extend the existing tests or write new ones)
Edited Jan 11, 2023 by Ned Coltman
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/installscript