styles icon indicating copy to clipboard operation
styles copied to clipboard

Test renamed-styles.json

Open rmzelle opened this issue 10 years ago • 9 comments

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).

rmzelle avatar Feb 04 '15 15:02 rmzelle

@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.

rmzelle avatar Apr 19 '15 16:04 rmzelle

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.

rmzelle avatar Apr 19 '15 16:04 rmzelle

I guess, that moving an independent style into a dependent style or vice versa should not occur in this deleted/moved list. Correct?

zuphilip avatar Apr 19 '15 18:04 zuphilip

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?

zuphilip avatar Apr 19 '15 19:04 zuphilip

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.

rmzelle avatar Apr 20 '15 16:04 rmzelle

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.

rmzelle avatar Apr 20 '15 16:04 rmzelle

We should also add a test to make sure "renamed-styles.json" doesn't contain any style IDs for styles present in the repository.

rmzelle avatar Apr 20 '15 16:04 rmzelle