-
Notifications
You must be signed in to change notification settings - Fork 5
Configuring Ansys Math repository #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
2e94e8c
Adding template files
clatapie ceb6293
Adding src files
clatapie ae6048c
Make start_mapdl.sh file executable
clatapie 5ac581a
Removing DPF Server Activation
clatapie bc68652
Modifying the doc content
clatapie 4b784f6
Modifying the related doc
clatapie 9728675
Update doc/source/conf.py
clatapie 9baa0d4
Reviewer comments
clatapie 4a41757
Requirement change
clatapie 5fb30c1
Removing scipy requirement
clatapie 441ba52
Apply suggestions from code review
clatapie 0fc0a2f
Adding unit tests
clatapie 61a13bf
Merge branch 'maint/configure-repository' of https://github.com/pyans…
clatapie 22b2449
Modifying CI/CD
clatapie cb33335
Fixing issues
clatapie 80fc95e
Modifying the pipeline
clatapie a740a66
Update .github/workflows/ci_cd.yml
clatapie 83a7539
Pipeline changes
clatapie 3b6819b
add changes
clatapie ea6ecd3
Pipeline changes
clatapie 6bdee11
Apply suggestions from code review
clatapie c7f841f
Fixing issues in the pipeline
clatapie 3eca1f6
Merge branch 'maint/configure-repository' of https://github.com/pyans…
clatapie a4c809c
Code style changes
clatapie bde2523
Fixing document dependencies
clatapie a2ff673
Changes for the unit tests
clatapie 9736ace
Changes related to pyansys/actions
clatapie 27a642a
Fixing unit tests
clatapie c801179
Fixing unit tests
clatapie 4ade022
Fixing Unit Test
clatapie 6f55738
Fixing some math.py issues
clatapie ae653dd
Installing pymapdl to do the testing
clatapie 2212103
Modifying pipeline
clatapie 0b1cacf
Removing smoke tests and fixing setups
clatapie 142bb28
Fixing the pipeline
clatapie 7208826
Fixing pipeline issues
clatapie bc1a8d8
Adding pyansys-actions features
clatapie 5642c9c
Fixing issues in the pipeline
clatapie af08af0
Fixing GH Workflows
clatapie 4a9e553
Fixing typo
clatapie f1c2cb3
Changes Code Style
clatapie 480b0d9
Typo
clatapie be013d0
Modifying the permission
clatapie b79f595
Fxing GH Workflow
clatapie 1a96cde
Fixing a typo
clatapie 3b4d8ee
Adding files related to Docker
clatapie 1001cb9
Changing file permissions
clatapie 0476a05
Removing the v22.2-ubuntu Unit Tests
clatapie 4221b4d
Apply suggestions from code review
clatapie 6fae946
Removing the launch_math function
clatapie 34d749e
Apply suggestions from code review
clatapie 1c6438a
Apply suggestions from code review
clatapie 7bbe83d
Merge branch 'maint/configure-repository' of https://github.com/pyans…
clatapie ab894fe
Fixing a typo
clatapie 1d8fcc7
Apply comments from reviewer
clatapie cab2539
PyAnsys code style checks
clatapie 2852b25
Fixing an issue in GH Workflow
clatapie ac489f5
Fixing issues int the GH Workflow
clatapie 2903090
Fiwing a typo
clatapie 972eabe
Adding a dependency
clatapie 3aa2561
Adding 404.rst file
clatapie 29c4971
PyAnsys code style checks
clatapie bbb219a
Apply suggestions from code review
clatapie 4a30cdd
Multi-versionning files
clatapie 16df018
PyAnsys code style checks
clatapie e702863
Fixing multi-version feature
clatapie 4a5ce91
Fixing typo
clatapie 70227d4
Trying to deploy the documentation
clatapie 73bd359
Modifying the pipeline
clatapie 79ae222
Fixing the pipeline
clatapie c979b7a
Apply suggestions from reviewers
clatapie 1dda912
Fixing doc deploy
clatapie 993ba33
Modifying Deploy development documentation
clatapie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
| docker pull $MAPDL_IMAGE | ||
| docker run \ | ||
| --name mapdl \ | ||
| --restart always \ | ||
| --health-cmd="ps aux | grep \"[/]ansys_inc/.*ansys\.e.*grpc\" -q && echo 0 || echo 1" \ | ||
| --health-interval=0.5s \ | ||
| --health-retries=4 \ | ||
| --health-timeout=0.5s \ | ||
| --health-start-period=10s \ | ||
| -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER \ | ||
| -e ANSYS_LOCK="OFF" \ | ||
| -p $PYMAPDL_PORT:50052 \ | ||
| -p $PYMAPDL_DB_PORT:50055 \ | ||
| $MAPDL_IMAGE \ | ||
| -smp > log.txt & | ||
| grep -q 'Server listening on' <(timeout 60 tail -f log.txt) | ||
| # python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [flake8] | ||
| exclude = venv, __init__.py, doc/_build, .venv, doc/source/technology_showcase_examples | ||
| select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403 | ||
| count = True | ||
| max-complexity = 10 | ||
| max-line-length = 100 | ||
| statistics = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "pip" # See documentation for possible values | ||
| directory: "/" # Location of package manifests | ||
| insecure-external-code-execution: allow | ||
| schedule: | ||
| interval: "weekly" | ||
| labels: | ||
| - "maintenance" | ||
| - "dependencies" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| Documentation: | ||
| - doc/source/**/* | ||
| Maintenance: | ||
| - .github/**/* | ||
| - .flake8 | ||
| - ignore_words.txt | ||
| - pyproject.toml | ||
| Dependencies: | ||
| - pyproject.toml | ||
| CI/CD: | ||
| - .github/**/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| - name: bug | ||
| description: Something isn't working | ||
| color: d42a34 | ||
|
|
||
| - name: dependencies | ||
| description: Related with project dependencies | ||
| color: ffc0cb | ||
|
|
||
| - name: documentation | ||
| description: Improvements or additions to documentation | ||
| color: 0677ba | ||
|
|
||
| - name: enhancement | ||
| description: New features or code improvements | ||
| color: FFD827 | ||
|
|
||
| - name: good first issue | ||
| description: Easy to solve for newcomers | ||
| color: 62ca50 | ||
|
|
||
| - name: maintenance | ||
| description: Package and maintenance related | ||
| color: f78c37 | ||
|
|
||
| - name: release | ||
| description: Anything related to an incoming release | ||
| color: ffffff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,241 @@ | ||
| # check spelling, codestyle | ||
| name: GitHub CI | ||
|
|
||
| # run only on main branch. This avoids duplicated actions on PRs | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: # UTC at 0300 | ||
| - cron: "0 3 * * *" | ||
| pull_request: | ||
| push: | ||
| tags: | ||
| - "*" | ||
| branches: | ||
| - main | ||
|
|
||
| env: | ||
| MAIN_PYTHON_VERSION: '3.9' | ||
| PACKAGE_NAME: 'ansys-math-core' | ||
| DOCKER_PACKAGE: ghcr.io/pyansys/pymapdl/mapdl | ||
| DOCKER_IMAGE_VERSION_DOCS_BUILD: v22.2.0 | ||
| RESET_PIP_CACHE: 0 | ||
| DOCUMENTATION_CNAME: 'math.docs.pyansys.com' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
|
|
||
| code-style: | ||
| name: "Code style" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: PyAnsys code style checks | ||
| uses: pyansys/actions/code-style@v2 | ||
| with: | ||
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
|
||
|
|
||
| doc-style: | ||
| name: "Documentation Style Check" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: PyAnsys documentation style checks | ||
| uses: pyansys/actions/doc-style@v2 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
|
|
||
| build_test: | ||
| name: "Build and unit testing" | ||
| runs-on: ubuntu-latest | ||
| needs: [doc-style, code-style] | ||
| strategy: | ||
| matrix: | ||
| mapdl-version: ['v21.1.1', 'v21.2.1', 'v22.1.0', 'v22.2.0'] #'v22.2-ubuntu' | ||
| env: | ||
| PYMAPDL_PORT: 21000 # default won't work on GitHub runners | ||
| PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners | ||
| PYMAPDL_START_INSTANCE: FALSE | ||
|
|
||
| steps: | ||
| - name: "Install Git and checkout project" | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: "Setup Python" | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
|
||
| - name: "Install os packages" | ||
| run: | | ||
| sudo apt update | ||
|
|
||
| - name: "Cache pip" | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: Python-v${{ env.RESET_PIP_CACHE }}-${{ runner.os }}-${{ matrix.mapdl-version }}-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| Python-v${{ env.RESET_PIP_CACHE }}-${{ runner.os }}-${{ matrix.mapdl-version }} | ||
|
|
||
| - name: Install ansys-mapdl-core | ||
| run: | | ||
| python -m pip install ansys-mapdl-core | ||
|
|
||
| # - name: Install ansys-math-core | ||
| # run: | | ||
| # python -m pip install build | ||
| # python -m build | ||
| # python -m pip install dist/*.whl | ||
| # xvfb-run python -c "from ansys.math import core as amath; print(amath.Report())" | ||
|
|
||
| - name: "Login in Github container registry" | ||
| uses: docker/login-action@v2.1.0 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ secrets.GH_USERNAME }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: "Pull, launch, and validate MAPDL service" | ||
| run: .ci/start_mapdl.sh | ||
| if: ${{ !contains( matrix.mapdl-version, 'ubuntu') }} | ||
| env: | ||
| LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | ||
| MAPDL_IMAGE: ${{ env.DOCKER_PACKAGE }}:${{ matrix.mapdl-version }} | ||
|
|
||
|
|
||
| - name: "Unit testing requirements installation" | ||
| run: | | ||
| python -m pip install .[tests] | ||
|
|
||
| - name: "Unit testing" | ||
| run: | | ||
| pytest -v --durations=10 --maxfail=10 --reruns 7 --reruns-delay 3 --only-rerun MapdlExitedError --only-rerun EmptyRecordError --cov=ansys.mapdl.core --cov-report=xml --cov-report=html | ||
|
|
||
| - uses: codecov/codecov-action@v3 | ||
| name: "Upload coverage to Codecov" | ||
|
|
||
| # - name: "Check package" | ||
| # run: | | ||
| # pip install twine | ||
| # twine check dist/* | ||
|
|
||
| - name: "Upload wheel and binaries" | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: Ansys-Math-packages | ||
| path: dist/ | ||
| retention-days: 7 | ||
|
|
||
| - name: "Display files structure" | ||
| if: always() | ||
| run: | | ||
| mkdir logs-${{ matrix.mapdl-version }} && echo "Successfully generated directory ${{ matrix.mapdl-version }}" | ||
| echo "::group:: Display files structure" && ls -R && echo "::endgroup::" | ||
| ls -R > ./logs-${{ matrix.mapdl-version }}/files_structure.txt | ||
|
|
||
| - name: "Display docker files structures" | ||
| if: always() | ||
| run: | | ||
| echo "::group:: Display files structure" && docker exec mapdl /bin/bash -c "ls -R" && echo "::endgroup::" | ||
| docker exec mapdl /bin/bash -c "ls -R" > ./logs-${{ matrix.mapdl-version }}/docker_files_structure.txt | ||
|
|
||
| - name: "Collect MAPDL logs on failure" | ||
| if: ${{ always() && !contains( matrix.mapdl-version, 'ubuntu') }} | ||
| run: | | ||
| docker exec mapdl /bin/bash -c "mkdir -p /mapdl_logs && echo 'Successfully created directory inside docker container'" | ||
| docker exec mapdl /bin/bash -c "if compgen -G 'file*.out' > /dev/null ;then cp -f /file*.out /mapdl_logs && echo 'Successfully copied out files.'; fi" | ||
| docker exec mapdl /bin/bash -c "if compgen -G 'file*.err' > /dev/null ;then cp -f /file*.err /mapdl_logs && echo 'Successfully copied err files.'; fi" | ||
| docker exec mapdl /bin/bash -c "if compgen -G 'file*.log' > /dev/null ;then cp -f /file*.log /mapdl_logs && echo 'Successfully copied log files.'; fi" | ||
| docker exec mapdl /bin/bash -c "if compgen -G '*.crash' > /dev/null ;then cp -f /*.crash /mapdl_logs && echo 'Successfully copied crash files.'; fi" | ||
| docker cp mapdl:/mapdl_logs/. ./logs-${{ matrix.mapdl-version }}/. | ||
|
|
||
|
|
||
| - name: "Collect MAPDL logs on failure for ubuntu image" | ||
| if: ${{ always() && contains( matrix.mapdl-version,'ubuntu') }} | ||
| run: | | ||
| docker exec mapdl /bin/bash -c "mkdir -p /mapdl_logs && echo 'Successfully created directory inside docker container'" | ||
| docker exec mapdl /bin/bash -c "if compgen -G '/jobs/file*.out' > /dev/null ;then cp -f /jobs/file*.out /mapdl_logs && echo 'Successfully copied out files.'; fi" | ||
| docker exec mapdl /bin/bash -c "if compgen -G '/jobs/file*.err' > /dev/null ;then cp -f /jobs/file*.err /mapdl_logs && echo 'Successfully copied err files.'; fi" | ||
| docker exec mapdl /bin/bash -c "if compgen -G '/jobs/file*.log' > /dev/null ;then cp -f /jobs/file*.log /mapdl_logs && echo 'Successfully copied log files.'; fi" | ||
| docker exec mapdl /bin/bash -c "if compgen -G '/jobs/*.crash' > /dev/null ;then cp -f /jobs/*.crash /mapdl_logs && echo 'Successfully copied crash files.'; fi" | ||
| docker cp mapdl:/mapdl_logs/. ./logs-${{ matrix.mapdl-version }}/. | ||
|
|
||
| - name: "Tar logs" | ||
| if: always() | ||
| run: | | ||
| cp log.txt ./logs-${{ matrix.mapdl-version }}/log.txt | ||
| tar cvzf ./logs-${{ matrix.mapdl-version }}.tgz ./logs-${{ matrix.mapdl-version }} | ||
|
|
||
| - name: "Upload logs to GitHub" | ||
| if: always() | ||
| uses: actions/upload-artifact@master | ||
| with: | ||
| name: logs-${{ matrix.mapdl-version }}.tgz | ||
| path: ./logs-${{ matrix.mapdl-version }}.tgz | ||
|
|
||
| - name: "Display MAPDL Logs" | ||
| if: always() | ||
| run: cat log.txt | ||
|
|
||
| - name: "List main files" | ||
| if: always() | ||
| run: | | ||
| if compgen -G './logs-${{ matrix.mapdl-version }}/*.err' > /dev/null ;then for f in ./logs-${{ matrix.mapdl-version }}/*.err; do echo "::group:: Error file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
| if compgen -G './logs-${{ matrix.mapdl-version }}/*.log' > /dev/null ;then for f in ./logs-${{ matrix.mapdl-version }}/*.log; do echo "::group:: Log file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
| if compgen -G './logs-${{ matrix.mapdl-version }}/*.out' > /dev/null ;then for f in ./logs-${{ matrix.mapdl-version }}/*.out; do echo "::group:: Output file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
|
|
||
|
|
||
| doc-build: | ||
| name: Doc building | ||
| runs-on: ubuntu-latest | ||
| needs: [build_test] | ||
| steps: | ||
| - name: "Run Ansys documentation building action" | ||
| uses: pyansys/actions/doc-build@v2 | ||
| with: | ||
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
|
||
|
|
||
| doc-deploy-dev: | ||
| name: "Deploy development documentation" | ||
| # Deploy development only when merging to main | ||
| if: github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| needs: doc-build | ||
| steps: | ||
| - name: "Deploy the latest documentation" | ||
| uses: pyansys/actions/doc-deploy-dev@v2 | ||
| with: | ||
| cname: ${{ env.DOCUMENTATION_CNAME }} | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
|
|
||
| doc-deploy-stable: | ||
| name: "Deploy stable documentation" | ||
| # Deploy release documentation when creating a new tag | ||
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
| runs-on: ubuntu-latest | ||
| needs: doc-build | ||
| steps: | ||
| - name: "Deploy the stable documentation" | ||
| uses: pyansys/actions/doc-deploy-stable@v2 | ||
| with: | ||
| cname: ${{ env.DOCUMENTATION_CNAME }} | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
|
||
|
|
||
| release: | ||
| name: "Release project to private PyPI, public PyPI and GitHub" | ||
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
| needs: [build_test, doc-deploy-stable] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
||
| - name: "Release to GitHub" | ||
| uses: pyansys/actions/release-github@v1 | ||
| with: | ||
| library-name: ${{ env.PACKAGE_NAME }} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.