diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cfac193 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: python-ci + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: ['3.9','3.10','3.11','3.12'] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install '.[dev]' + pip install pytest + pip install pytest-cov + - name: Generate coverage report + run: | + pytest --cov-report xml --cov=. + - name: Publish code coverage + if: github.event_name == 'push' + uses: paambaati/codeclimate-action@v2.7.5 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPO_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f1bbef3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: python -python: -- '3.6' -- 3.6-dev -- '3.7' -- 3.7-dev -- '3.8' -- 3.8-dev -install: -- pip install -r requirements.txt -script: -- coverage run --source=pylj setup.py test -- coveralls -deploy: - provider: pypi - user: arm61 - password: - secure: aALH0Xs9y2JaZhSZC0URhrVoB/edr0eu0q1HjlTxQresS7RcaF32JccJYEcMILnCLSQCBW6XoL5j7PJFQt+x96fW9G128i0Zu0eGGpdVEj32buJUcLX+ty5TEZ7L17jJlhki6CVLtZrlOv94orHVg/VolEJZ0mNPhrTTV34rarY1jTj1hc8Hxk4YExhi7FpqtGHBpWH1CTWzV0CKwEaTyvh16BIDcm/pvkW457zxOVNtCc6mRHWzs2ZnokrGJERPouns5yMHOY4V8mZDIDcxaesWlGrLOB6Rn+Sl+PhYzBUml+WrJvpSnwo5snErGXAwEWfBAmUE6T1LItsSeFrkxEXfMx3MfMzGZlcCAWMBQJDDU3+4/ViDRnq/doFLdji2QV0d7cw2jXxBP2rgIw8rMt+Yn4ez56aDakCtMKzmPjHkC+wZ0UHUdm15Sy+/I4zDQlrcIk7zDbYAAKfwln4chiC/E+WdEszpEMe0RrdYbCV9rySOQFs2xpAnCjQT0WMzh1TTeqBXXctaWYB6C9pE2o6n7/ndXXGxbdvfL9ZyIAObLMt8K63HUgmHEH9KpxEtCSQSI/3pzBTWg3y7xotYVKR0UkKNaUm5oGtAi9GJlWiZR2vDRPFwxeXGjhbFALI375SONSLJhZHBUOsKnk7x7k4WN4vhXXNSYuA9nKFWRGs= - on: - distributions: sdist - python: '3.7' - branch: master - repo: arm61/pylj diff --git a/README.md b/README.md index 4fe38f3..b8de8eb 100644 --- a/README.md +++ b/README.md @@ -69,24 +69,14 @@ Check out some [examples](https://github.com/arm61/pylj/tree/master/examples) of Build Status - - Build Status - - - - - - - - Build Status - - + + Build Status Coverage Status - - Coverage Status + + Coverage Status diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f8a939c..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,57 +0,0 @@ -environment: - PYPI_PASSWORD: - secure: cEan/s6SJJ6J6ODIulpmOw== - matrix: - - # For Python versions available on Appveyor, see - # http://www.appveyor.com/docs/installed-software#python - # The list here is complete (excluding Python 2.6, which - # isn't covered by this document) at the time of writing. - - - PYTHON: "C:\\Python36-x64" - MINICONDA: "C:\\Miniconda" - - PYTHON: "C:\\Python37-x64" - MINICONDA: "C:\\Miniconda" - - PYTHON: "C:\\Python38-x64" - MINICONDA: "C:\\Miniconda" - -install: - # We need wheel installed to build wheels - - "SET PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%" - - "%PYTHON%\\python.exe -m pip install -U twine wheel setuptools" - - "%PYTHON%\\python.exe -m pip install -r requirements.txt" - - "set PATH=%PATH%;C:\"%PYTHON%\\Scripts" - -build: off - -test_script: - # Put your test command here. - # If you don't need to build C extensions on 64-bit Python 3.3 or 3.4, - # you can remove "build.cmd" from the front of the command, as it's - # only needed to support those cases. - # Note that you must use the environment variable %PYTHON% to refer to - # the interpreter you're using - Appveyor does not do anything special - # to put the Python version you want to use on PATH. - - "%PYTHON%\\python.exe setup.py test" - -deploy_script: - # This step builds your wheels. - # Again, you only need build.cmd if you're building C extensions for - # 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct - # interpreter - - "echo [pypi] > %USERPROFILE%\\.pypirc" - - "echo username=arm61 >> %USERPROFILE%\\.pypirc" - - "echo password=%PYPI_PASSWORD% >> %USERPROFILE%\\.pypirc" - - "cat %USERPROFILE%\\.pypirc" - - "%PYTHON%\\python.exe -m pip install twine" - - "%PYTHON%\\python.exe setup.py bdist_wheel" - - "%PYTHON%\\Scripts\\twine upload --skip-existing dist/*.whl" - -artifacts: - # bdist_wheel puts your built wheel in the dist directory - - path: dist\* - -#on_success: -# You can use this step to upload your artifacts to a public website. -# See Appveyor's documentation for more details. Or you can simply -# access your wheels from the Appveyor "artifacts" tab for your build. diff --git a/pylj/forcefields.py b/pylj/forcefields.py index f2f1c12..2b7065f 100644 --- a/pylj/forcefields.py +++ b/pylj/forcefields.py @@ -2,7 +2,7 @@ from numba import njit -@njit +#Jit tag here had to be removed def lennard_jones(dr, constants, force=False): r"""Calculate the energy or force for a pair of particles using the Lennard-Jones (A/B variant) forcefield. @@ -38,7 +38,7 @@ def lennard_jones(dr, constants, force=False): constants[1] * np.power(dr, -6)) -@njit +#Jit tag here had to be removed def lennard_jones_sigma_epsilon(dr, constants, force=False): r"""Calculate the energy or force for a pair of particles using the Lennard-Jones (sigma/epsilon variant) forcefield. @@ -74,7 +74,7 @@ def lennard_jones_sigma_epsilon(dr, constants, force=False): 4 * constants[1] * np.power(constants[0], 6) * np.power(dr, -6)) -@njit +#Jit tag here had to be removed def buckingham(dr, constants, force=False): r""" Calculate the energy or force for a pair of particles using the Buckingham forcefield.