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

Rework CI/CD #686

Merged
merged 37 commits into from
Nov 30, 2023
Merged

Rework CI/CD #686

merged 37 commits into from
Nov 30, 2023

Conversation

Alexboiboi
Copy link
Member

@Alexboiboi Alexboiboi commented Nov 28, 2023

Related Issues

This PR is a first attempt at reworking the CI/CD workflows and introduces several changes in the project structure.

Move to Github Actions

As mentioned in #683 we are currently using azure-pipelines and CircleCI to run our continuous integration jobs. In order to reduce maintenance work, we will now move to Github Workflows as main CI tool (see https://docs.github.com/en/actions).

The new python-app.yml Github workflow configuration file in .github/workflows encompasses the following actions:

  • run pylint
  • unit testing (needs pylint to pass before starting)
    • run matrix also on [ubuntu-latest, macos-latest, windows-latest]
    • run matrix on python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
  • publish to Pypi including wheel, triggered on tags

Other todos:

  • keep Code QL Github-Action
  • remove .circleci folder and content
  • remove azure-pipelines.yml config file

Github Apps

Even if there is a pre-commit github action available. I suggest to use the App, as it has the benefit to update the pre-commit dependencies automatically via PRs (see https://pre-commit.ci/lite.html)

  • add Pre-commit CI
  • remove CircleCI app
  • remove AzurePipeline app
  • keep CodeCov

Setup files

The new standard to structure python projects is defacto the move from setup.py to pyproject.toml. (see https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#declaring-project-metadata) All the metadata related to the project is store there, including the optional dependencies for testing and the docs.

  • move to pyproject.toml
  • keep minimalistic stetup.py

Further automation

We are currently already using tox to automate testing.
This PR extends the tox.ini to allow building the docs via the tox -e docs call. This feature is still susceptible to change and I'd prefer to deal with it in another PR. We will aslo need to update the docs README.md file to take this into account and maybe also add this to the CONTRIBUTING.md file.

@OrtnerMichael Could you please review this PR and especially thoroughly the pyproject.toml metadata. Thanks

Sorry, something went wrong.

@Alexboiboi Alexboiboi added the CI/CD Continuous Integration / Continuous Delivery label Nov 29, 2023
Copy link
Member

@OrtnerMichael OrtnerMichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this email correct ?

maintainers = [
{name = "Alexandre Boisselet", email = "[email protected]"}
]

@Alexboiboi
Copy link
Member Author

is this email correct ?

maintainers = [ {name = "Alexandre Boisselet", email = "[email protected]"} ]

yes (see https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html)

@Alexboiboi Alexboiboi marked this pull request as ready for review November 30, 2023 16:17
@Alexboiboi Alexboiboi merged commit e9475ae into magpylib:main Nov 30, 2023
@Alexboiboi Alexboiboi mentioned this pull request Dec 4, 2023
8 tasks
@Alexboiboi Alexboiboi added this to the 4.5 milestone Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Continuous Integration / Continuous Delivery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants