Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
E
ensembl
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Jira
    • Jira
  • Merge Requests 6
    • Merge Requests 6
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ensembl-gh-mirror
  • ensembl
  • Merge Requests
  • !524

Open
Opened Oct 07, 2020 by Marek Szuba@mksOwner
  • Report abuse
Report abuse

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b "feature/refactor_fetch_by_region" "origin/feature/refactor_fetch_by_region"

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "master"
git merge --no-ff "feature/refactor_fetch_by_region"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Refactor code in SliceAdaptor::fetch_by_region

  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 1

Created by: nwillhoft

Description

There is code in SliceAdaptor::fetch_by_region() that has been marked for refactoring, specifically the code dealing with synonym/wildcard/fuzzy-matching. During work on creating a chromosome alias feature, I worked on refactoring this code into two new subroutines. This has led to splitting the original task into two (1. chromosome alias feature, and 2. refactoring code). See JIRA tickets ENSCORESW-3021 and ENSCORESW-3562.

Use case

This refactored code will be used by any SliceAdaptor::fetch_by_region request where the seq_region_name user argument is not an exact match to a seq_region_name attribute in the relevant core database.

I understand that this code is used extensively by Ensembl users and therefore a note here to say that these changes will of course be extensively tested. (Use cases to be added here during this work.)

Benefits

In brief, the removal of superfluous code and making the code more readable.

During work on the chromosome alias feature, it became clear that the synonym/wildcard/fuzzy-match code needed to be refactored into subroutines to avoid large chunks of duplicate code being used in SliceAdaptor::fetch_by_region.

Possible Drawbacks

Testing

Have you added/modified unit tests to test the changes?

Not yet added any.

If so, do the tests pass/fail?

Have you run the entire test suite and no regression was detected?

Not yet run.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
Reference: ensembl-gh-mirror/ensembl!524
Source branch: feature/refactor_fetch_by_region