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

Rename script #848

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Rename script #848

wants to merge 2 commits into from

Conversation

Jimvy
Copy link
Collaborator

@Jimvy Jimvy commented Jul 9, 2020

As suggested in #835

Currently, this script supports the following:

  • Change of quadri
  • Change of course code (either the option like SINF or the number like 1252)
  • Change of course name (like coo, os...)
  • Change of course title

In order to make it work and keep the other scripts functional, I had to change a bit the config.yml, so that it stays with the "names" at the end of file even after PyYAML's reordering.

Current limitations:

  • Has some difficulties when different courses share the same course name, as it considers that only one course has a given course name (in database parlance, the course name is a primary key). This breaks for crypto q7/q8, and also for meca, elec, math etc courses.
  • For now, exams and tests have their \hypertitle also updated. Maybe we should keep the old quadri/title/course code in old exams. Open to discussion (it's a 3 lines fix in the code).
  • It leaves the working tree without any addition to Git; maybe we can integrate Git with it, so that it git adds the files.
  • On Windows, one has to call it using explicitly python; it's more a feature than a bug however...

Bad things:

  • It's extremely over-engineered probably, but at least it supports nearly all corner cases that I can think of.
  • Python 3 + Windows + Unicode + PyYAML = nuclear explosion of bugs and strange issues.

Jimvy added 2 commits July 9, 2020 03:25
As suggested in Gp2mv3#835

Currently, this script supports the following:
- Change of quadri
- Change of course code (either the option like SINF or the number like
  1252)
- Change of course name (like coo, os...)
- Change of course title

In order to make it work and keep the other scripts functional, I had to
change a bit the config.yml, so that it stays with the "names" at the
end of file even after PyYAML's reordering.

Current limitations:
- Has some difficulties when different courses share the same course
  name, as it considers that only one course has a given course name
  (in database parlance, the course name is a primary key). This breaks
  for crypto q7/q8, and also for meca, elec, math etc courses.
- For now, exams and tests have their \hypertitle also updated.
  Maybe we should keep the old quadri/title/course code in old exams.
  Open to discussion (it's a 3 lines fix in the code).
- It leaves the working tree without any addition to Git; maybe we can
  integrate Git with it, so that it git adds the files.
- On Windows, one has to call it using explicitly python; it's more a
  feature than a bug however...
Bad things:
- It's extremely over-engineered probably, but at least it supports
  nearly all corner cases that I can think of.
- Python 3 + Windows + Unicode + PyYAML = nuclear explosion of bugs and
  strange issues.
@Peiffap
Copy link
Collaborator

Peiffap commented Jul 9, 2020

Shouldn't limitations be considered "bad things" as well 😉? I'll look at this when I have some time.

@Jimvy Jimvy mentioned this pull request Jul 9, 2020
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