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

Fix Sparta Sync command and allow for local testing #6

Merged
merged 2 commits into from
Feb 19, 2021

Conversation

Fenntasy
Copy link
Contributor

@Fenntasy Fenntasy commented Feb 16, 2021

Description

This PR has two main goals:

  • fixing the fact that sparta sync overrides the repository even when the exercises already exists with the same SHA,
  • and allowing the use of a local instance of Sparta API.

sparta init has now two hidden flags: --force (or -f) and --spartaURL="url".
Both have default values so it will not change the usage for students.
--spartaURL is there to change the URL that the CLI will ask for the calendar (which can now be set to our .local instance) and will record that in the config.json that the CLI generates at init
--force is a convenience option to recreate an exercises directory when calling sparta init.

Motivation and Context

We couldn't tell the previous students to use sparta sync even if they missed some day because it would have overwritten all their exercises.

How Has This Been Tested?

Manually locally

Types of changes

  • Chore (non-breaking change which refactors / improves the existing code base)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    change)

Checklist:

  • ✅ : My code follows the code style of this project.
  • ✅ : My change requires a change to the documentation.
  • ✅ : I have updated the documentation accordingly.
  • ✅ : I have read the CONTRIBUTING document.
  • 🔴 : I have added tests to cover my changes.
  • ✅ : All new and existing tests passed.

@Fenntasy Fenntasy requested a review from Meyclem February 16, 2021 14:13
@Fenntasy Fenntasy merged commit 4618fc8 into master Feb 19, 2021
@Fenntasy Fenntasy deleted the CU-8cr5g2-fix_sparta_sync branch February 19, 2021 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants