locales icon indicating copy to clipboard operation
locales copied to clipboard

Make composer package - Feature request

Open Deyter opened this issue 6 years ago • 2 comments

Motivation We using your project in our PHP project. The best way to manage PHP(and any other) project requirements is package checking/updating. The most popular package manager is Composer. Potential solving Can you make composer package from your project? Example of composer.json file which must be in the root folder of project attached(archived for attaching). composer.json.zip

Deyter avatar Dec 11 '17 07:12 Deyter

We're not opposed to accepting this, but we first need to figure out how to add a "composer.json" file to the "styles-distribution" repo.

There is discussion for that at https://github.com/citation-style-language/styles/pull/2706 and an incomplete pull request at https://github.com/citation-style-language/distribution-updater/pull/3. If you could help us fix up that PR, we'd consider also adding a "composer.json" file to the "locales" repo.

rmzelle avatar Dec 12 '17 04:12 rmzelle

As background, https://github.com/citation-style-language/styles-distribution hosts a cleaned-up copy of https://github.com/citation-style-language/styles, and is only updated by https://github.com/citation-style-language/distribution-updater if the Travis CI tests on the "styles" repo complete without errors.

I therefore think it makes most sense to add a "composer.json" file to the "styles-distribution" repo (since downstream users should usually pull their styles from there), but this would require some changes to "distribution-updater". The updater isn't my code, and I'm not the best coder, so any help with preparing a good PR would be much appreciated. Once we have that situation figured out adding a composer.json to the "locales" repo would be easy.

rmzelle avatar Dec 12 '17 04:12 rmzelle

This would be helpful for us. Looks like https://github.com/citation-style-language/styles is already set up this way, and a git tag is created for each commit which is helpful to, so it allows people to "lock" to a specific version of the repo.

bkosborne avatar Jan 06 '23 19:01 bkosborne

We can add the same composer.json workflow to locales, yes.

adam3smith avatar Jan 06 '23 19:01 adam3smith

I don't know anything about composer, though, so PRs would be very welcome -- for some reason the maintainer of the packagist package (who also maintains the one for citeproc-php) hasn't been responding to my mentions of him here recently, so might be worth trying to get in touch with him otherwise.

adam3smith avatar Jan 06 '23 20:01 adam3smith

Hi @adam3smith. I can see that GitHub workflow already copied here from styles repository. So you just need to add to repository composer.json file. You can use file from styles as template or I can create PR later.

AS-adci avatar Jan 06 '23 22:01 AS-adci

It's good enough for this purpose https://github.com/citation-style-language/locales/pull/161

Deyter avatar Mar 17 '23 05:03 Deyter

@adam3smith Could you also create the package for project like you made it for styles? https://packagist.org/packages/citation-style-language/styles Then this issue can be marked as finished.

Deyter avatar Mar 23 '23 00:03 Deyter

I'd much rather someone with even a basic understanding of the PhP ecosystem would do that. Any way that @seboettg (who maintains the styles one) would be willing to?

adam3smith avatar Mar 23 '23 03:03 adam3smith

https://github.com/seboettg/locales/blob/master/composer.json looks fine by me, but not by packagist. I tried to add this locales Repo to packagist and I got the following error:

Reading composer.json of citation-style-language/locales (v0.0.5)
Importing tag v0.0.5 (0.0.5.0)
Reading composer.json of citation-style-language/locales (v0.0.4)
Importing tag v0.0.4 (0.0.4.0)
Reading composer.json of citation-style-language/locales (v0.0.3)
Importing tag v0.0.3 (0.0.3.0)
Reading composer.json of citation-style-language/locales (v0.0.2)
Importing tag v0.0.2 (0.0.2.0)
Reading composer.json of citation-style-language/locales (v0.0.1)
Importing tag v0.0.1 (0.0.1.0)
Reading composer.json of citation-style-language/locales (master)
Importing branch master (dev-master)
Skipped branch master, Invalid package information: 
License "Creative Commons Attribution-ShareAlike 3.0 License" is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.
If the software is closed-source, you may use "proprietary" as license.

Reading composer.json of citation-style-language/locales (adam3smith-patch-1)
Skipped branch adam3smith-patch-1, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (b0.8)
Skipped branch b0.8, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (denismaier-patch-1)
Skipped branch denismaier-patch-1, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (denismaier-patch-2)
Skipped branch denismaier-patch-2, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (denismaier-patch-3)
Skipped branch denismaier-patch-3, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (rename-terms-102)
Skipped branch rename-terms-102, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (rmzelle-patch-1)
Skipped branch rmzelle-patch-1, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (ruby-3.0.0)
Skipped branch ruby-3.0.0, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (v1.0)
Skipped branch v1.0, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (v1.0.1)
Skipped branch v1.0.1, no composer file was found (404 HTTP status code)
Reading composer.json of citation-style-language/locales (v1.0.2)
Importing branch v1.0.2 (v1.0.2.x-dev)
Skipped branch v1.0.2, Invalid package information: 
License "Creative Commons Attribution-ShareAlike 3.0 License" is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.
If the software is closed-source, you may use "proprietary" as license.

Reading composer.json of citation-style-language/locales (102-test)
Skipped branch 102-test, no composer file was found (404 HTTP status code)

I don't know whether it's really necessary to have the composer.json in each branch or not in order to add this repo to packagist, but the License seems to be an issue what we definitily need to solve.

grafik

seboettg avatar Mar 23 '23 18:03 seboettg

I think CC-BY-NC-SA-3.0 is the correct term to match the SPDX license identifier.

seboettg avatar Mar 23 '23 18:03 seboettg

Thanks @seboettg -- this is now on packagist as well https://packagist.org/packages/citation-style-language/locales

adam3smith avatar Mar 30 '23 02:03 adam3smith