Open rmzelle opened 9 years ago
@inukshuk, something to think about (although Sheldon takes priority :) ).
The easiest thing would probably be to check each commit for style deletions, and make sure those deletions are present in "renamed-styles.json". Ideally we would go back and cover the last few years as well, but that might be a bit tricky.
We're running into some trouble with GitHub/git WRT identifying deletions vs. renames (see https://github.com/citation-style-language/styles/pull/1526#discussion_r28647187 ), but I assume that won't be an issue if we implement this purely in Ruby.
Ideally we would go back and cover the last few years as well, but that might be a bit tricky.
That said, we already have some code to visit each commit made to https://github.com/citation-style-language/styles-distribution in https://github.com/cpina/csls-styles-report (to generate http://pinux.info/csls_counter/ ), so it might not be too hard to visit the last year or so, up to when we first started using the "styles-distribution" repo. We could walk through the regular "styles" repo as well, but I never could figure out how to properly exclude pre-merge commits from pull requests.
I guess, that moving an independent style into a dependent style or vice versa should not occur in this deleted/moved list. Correct?
Another question concerning the renaming file: The journal "Acta Theriologica" has changed its name to "Mammal Research" but they also changed ISSN/EISSN. Is this handled as a normal rename?
I guess, that moving an independent style into a dependent style or vice versa should not occur in this deleted/moved list. Correct?
The list only deals with style IDs, and those don't indicate whether a style is dependent or independent. So if a style file name stays the same, but it switches from being an independent styles to a dependent one (or vice versa), it doesn't need to be added to the list.
The journal "Acta Theriologica" has changed its name to "Mammal Research" but they also changed ISSN/EISSN. Is this handled as a normal rename?
Yes, since we want users who have the "Acta Theriologica" style installed to automatically switch to the "Mammal Research" style.
We should also add a test to make sure "renamed-styles.json" doesn't contain any style IDs for styles present in the repository.
@adam3smith Is this something we should pursue, or can I close?
I think this makes sense to keep for next CI update
We should make sure that renamed-styles.json contains all style IDs that have been removed from the repository over time (and ideally, contain no style IDs that have never existed).
This requires comparisons between commits, so it might be easiest to periodically run a script over the commits from https://github.com/citation-style-language/styles-distribution, and keep track of which style IDs disappear over time. Integration in Travis would be nicer, but would be more complicated (although things can break pretty badly for users if we don't redirect styles).