brightway-lca / brightway2

Metapackage for brightway2 imports and documentation
https://brightway.dev/
BSD 3-Clause "New" or "Revised" License
100 stars 37 forks source link

Migrate conda packaging to conda forge #47

Closed cmutel closed 1 year ago

cmutel commented 2 years ago

Migrating to conda forge

Conda forge offers a number of advantages (big team maintaining CI and packaging, easier installation), but the most important is it makes it much easier to build os- or arch-specific packages, which we absolutely need for MacOS ARM64 machines.

Libraries

Here are the libraries which need to be added:

For each library, take the following steps:

Adapting the recipes

Make sure to add yourself as the maintainer, e.g.

extra:
  recipe-maintainers:
    - cmutel

Apparently the forge build is good enough that the following can be dropped:

build:
  ignore_run_exports:
    - python_abi

Delete source: fn if present.

More complete test section:

test:
  imports:
    - {{ name }}
  commands:
    - pip check
  requires:
    - pip

Change build: script command:

build:
  script: {{ PYTHON }} -m pip install . -vv

Make Python version in build and run to be >=3.6 if noarch

Fix license to be valid SPDX, e.g. BSD-3-Clause

Replace setuptools with pip in build section.

cmutel commented 2 years ago

the below PRs have been closed in favour of https://github.com/conda-forge/staged-recipes/pull/21165

package responsible comment
wurst @cmutel
bw_migrations @michaelweinold pending addition of bw2data
bw2data @michaelweinold pending addition of bw2parameters
bw2io @michaelweinold pending addition of bw2data
bw2calc @michaelweinold pending addition of bw2data
bw2analyzer @michaelweinold pending addition of bw2data, bw2calc
brightway2 @michaelweinold pending addition of all other bw packages
brightway25 @michaelweinold pending addition of all other bw packages
rower @michaelweinold pending addition of bw2data
m-rossi commented 1 year ago

People at our company want to use packages of the brightway ecosystem. As we rely heavily on conda-forge I bring all packages we use at our company there and maintain a few feedstocks. I started creating a few recipes unitl I found this issue. Can I help you @cmutel & @michaelweinold bring the packages to conda-forge? We could also add all packages at once

cmutel commented 1 year ago

Dear Marco-

It would be fantastic if you could help move this process forward, there are simply too many things to do, and this requires pushing the conda-forge people a bit to get recipe submissions approved (we have waited more than a week in the past). I don't mean anything bad about the forge maintainers, they are volunteers and doing a great job, but no one has unlimited time.

I think porting the recipes should be more or less simple; what I have used in the past when building conda packages is here: https://github.com/cmutel/conda-recipes

Feel free to tag me if you have other questions.

m-rossi commented 1 year ago

As I said I am willing to help. How should we proceed? I see two options here:

  1. Continue on the PRs you listed above. To help I need push access to your forks.
  2. Start a new PR bundling all remaining packages at once. We should close the other PRs then.
cmutel commented 1 year ago

If you can get them all done at once, that would be fantastic, and would also make it easier for the conda-forge team. I don't know anything about this, please feel free to take the lead.

m-rossi commented 1 year ago

Just started a PR for most of the packages listed above.

@michaelweinold can you close the PRs?

michaelweinold commented 1 year ago

@michaelweinold can you close the PRs?

Done! Many thanks for your initiative.

m-rossi commented 1 year ago

Ok, got all recipes green and requested a review. I skipped https://github.com/conda-forge/staged-recipes/pull/20212 as it requires some development versions of packages.

If you want to help maintain the recipes please leave a comment in the PR. However I can also add you later once the PR is merged.

m-rossi commented 1 year ago

Just a quick update from my side: The PR with all recipes at once got rejected. So I split them up again. Part of them got already merged, I will update this comment with the progress:

cmutel commented 1 year ago

@m-rossi Thanks a lot for your persistence, this is not an easy process and I very much appreciate your work.

I agree to be a maintainer on all packages in the https://github.com/brightway-lca/ org.

m-rossi commented 1 year ago

@cmutel I will merge all recipes first and add you and @michaelweinold later as maintainers. Otherwise you would have to comment on each PR, I think this way we are faster.

m-rossi commented 1 year ago

Ok, we got all in place. Please test carefully if everything works as expected. If not please open issues in the corresponding repositories. If you want to become recipe maintainer you can open an issue in the feedstock repository and choose Bot commands and use @conda-forge-admin, please add user @USERNAME as title. Then I just have to merge the request.

cmutel commented 1 year ago

@m-rossi Wow, amazing. The solution to get bw2calc working on Apple Silicon is simple in the end, but took some doing! Thanks A LOT.

m-rossi commented 1 year ago

Glad I could contribute something useful and improve some part of your project. Although I am just using the amazing magic the people at conda-forge are providing. I am always amazed how such a small group can manage such a huge infrastructure and improve it everyday.

Furthermore, as I said colleagues at the company I work for are happy that a project like yours exist. If there is anything related to packaging I can help with, feel free to ping me.

m-rossi commented 1 year ago

I want to bring another couple of packages to conda forge.

@cmutel could you close https://github.com/conda-forge/staged-recipes/pull/20035 so I can make clean start?

cmutel commented 1 year ago

@m-rossi Done!

m-rossi commented 1 year ago

Ok, there are also done.