Skip to content

Commit 202767d

Browse files
committed
migration
1 parent 085d426 commit 202767d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3602
-384
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,16 @@ on:
99
- main
1010

1111
jobs:
12-
build-package:
12+
build:
1313
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
18-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
18+
python: ['3.7', '3.8', '3.9', '3.10']
1919

2020
steps:
21-
- uses: actions/checkout@v2
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- uses: compas-dev/compas-actions.build@v1.1.1
21+
- uses: compas-dev/compas-actions.build@v3
2922
with:
30-
test_lint: true
23+
python: ${{ matrix.python }}
24+
invoke_lint: true

.github/workflows/docs.yml

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,9 @@ on:
1111
- main
1212

1313
jobs:
14-
build:
15-
name: build and deploy docs
14+
docs:
1615
runs-on: ubuntu-latest
1716
steps:
18-
- uses: actions/checkout@v2
19-
20-
- uses: compas-dev/compas-actions.docs@v1.4.1
21-
id: docs
22-
with:
23-
dest: deploy
24-
build_to_subfolder: true
25-
26-
- name: Deploy docs
27-
if: success() && steps.docs.outputs.commit_type != 'pull'
28-
uses: crazy-max/ghaction-github-pages@v2
29-
with:
30-
target_branch: gh-pages
31-
build_dir: deploy
32-
keep_history: true
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
36-
outputs:
37-
commit_type: ${{ steps.docs.outputs.commit_type }}
38-
current_version: ${{ steps.docs.outputs.current_version }}
39-
40-
docVersions:
41-
needs: build
42-
if: needs.build.outputs.commit_type == 'tag'
43-
name: update doc versions
44-
runs-on: ubuntu-latest
45-
steps:
46-
- uses: actions/checkout@v2
47-
with:
48-
ref: gh-pages
49-
50-
- uses: compas-dev/compas-actions.docversions@v1.3.0
51-
with:
52-
current_version: ${{ needs.build.outputs.current_version }}
53-
54-
- name: Deploy docs
55-
if: success()
56-
uses: crazy-max/ghaction-github-pages@v2
17+
- uses: compas-dev/compas-actions.docs@v2
5718
with:
58-
target_branch: gh-pages
59-
build_dir: ./
60-
keep_history: false
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 13 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,30 @@
11
on:
22
push:
3-
# Sequence of patterns matched against refs/tags
43
tags:
5-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
4+
- 'v*'
65

76
name: Create Release
87

98
jobs:
10-
Build:
9+
build:
1110
runs-on: ${{ matrix.os }}
1211
strategy:
1312
matrix:
1413
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
14+
python: ['3.8', '3.9', '3.10']
1615

1716
steps:
18-
- uses: actions/checkout@v2
19-
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v2
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
25-
- uses: compas-dev/compas-actions.build@v1.1.1
17+
- uses: compas-dev/compas-actions.build@v3
2618
with:
27-
test_lint: true
28-
test_compas: true
19+
python: ${{ matrix.python }}
20+
invoke_lint: true
21+
check_import: true
2922

30-
Release:
31-
needs: Build
32-
runs-on: ubuntu-latest
23+
publish:
24+
needs: build
25+
runs-on: windows-latest
3326
steps:
34-
- uses: actions/checkout@v2
35-
36-
- name: Get Version From Tag
37-
id: tag_name
38-
run: |
39-
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
40-
shell: bash
41-
42-
- name: Get Changelog Entry
43-
id: changelog_reader
44-
uses: mindsers/changelog-reader-action@v2
45-
with:
46-
version: ${{ steps.tag_name.outputs.current_version }}
47-
path: ./CHANGELOG.md
48-
49-
- name: Create Release
50-
id: create_release
51-
uses: actions/create-release@v1
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- uses: compas-dev/compas-actions.publish@v2
5428
with:
55-
tag_name: ${{ github.ref }}
56-
release_name: Release ${{ github.ref }}
57-
body: ${{ steps.changelog_reader.outputs.changes }}
58-
draft: false
59-
prerelease: false
60-
61-
Publish:
62-
needs: Release
63-
runs-on: ubuntu-latest
64-
steps:
65-
- uses: actions/checkout@v2
66-
- uses: actions/setup-python@v2
67-
with:
68-
python-version: '3.x'
69-
- uses: compas-dev/compas-actions.publish@v1.0.0
70-
with:
71-
token: ${{ secrets.PYPI }}
29+
pypi_token: ${{ secrets.PYPI }}
30+
github_token: ${{ secrets.GITHUB_TOKEN }}

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Authors
22

33
- tom van mele <<van.mele@arch.ethz.ch>> [@brgcode](https://github.com/brgcode)
4+
- li chen <<li.chen@arch.ethz.ch>> [@licini](https://github.com/licini)

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
# COMPAS IFC
22

3-
Package for working with IFC files.
3+
## Installation
4+
5+
Add the `conda-forge` package channel to the `conda` configuration file.
6+
Note that you only have to do this once.
7+
8+
```bash
9+
conda config --add channels conda-forge
10+
```
11+
12+
Create an environment and install the dependencies.
13+
14+
```bash
15+
conda create -n ifc python=3.9 compas compas_occ compas_cgal compas_view2 ifcopenshell --yes
16+
```
17+
18+
Activate the environment.
19+
20+
```bash
21+
conda activate ifc
22+
```
23+
24+
Install the compas_ifc package.
25+
26+
```bash
27+
pip install -e .
28+
```

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.black]
2+
line-length = 120
3+
4+
[tool.pytest.ini_options]
5+
minversion = "6.0"
6+
testpaths = ["tests"]
7+
python_files = [
8+
"test_*.py",
9+
"tests.py"
10+
]
11+
addopts = "-ra --strict --doctest-modules --doctest-glob=*.rst --tb=short"
12+
doctest_optionflags= "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES NUMBER"
13+
filterwarnings = "ignore::DeprecationWarning"
14+
15+
[tool.isort]
16+
line_length = 120
17+
multi_line_output = 3
18+
include_trailing_comma = true
19+
force_grid_wrap = 0
20+
use_parentheses = true
21+
force_single_line = true
22+
ensure_newline_before_comments = true
23+
known_first_party = "compas"
24+
default_section = "THIRDPARTY"
25+
forced_separate = "test_compas"
26+
skip = ["__init__.py"]

requirements-dev.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
autopep8
1+
flake8
2+
black
23
attrs >=17.4
34
bump2version >=1.0.1
45
check-manifest >=0.36
6+
compas_invocations
57
doc8
6-
flake8
78
graphviz
89
invoke >=0.14
910
ipykernel
@@ -12,10 +13,10 @@ isort
1213
m2r2
1314
nbsphinx
1415
pydocstyle
15-
pytest >=3.2
16+
pytest <7.1
1617
sphinx_compas_theme >=0.15.18
17-
sphinx >=3.4
18+
matplotlib
19+
sphinx
1820
twine
1921
wheel
20-
matplotlib
2122
-e .

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
compas >=1.16

setup.cfg

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,16 @@
22
universal = 1
33

44
[flake8]
5-
max-line-length = 180
6-
exclude = */migrations/*
5+
max-line-length = 120
6+
extend-ignore =
7+
# See https://github.com/PyCQA/pycodestyle/issues/373
8+
E203,
9+
# Only keep black line length check because flake8 forces it on comments as well
10+
E501,
711

812
[doc8]
9-
max-line-length = 180
13+
max-line-length = 120
1014
ignore = D001
1115

1216
[pydocstyle]
1317
convention = numpy
14-
15-
[tool:pytest]
16-
testpaths =
17-
tests
18-
src/compas_ifc
19-
norecursedirs =
20-
migrations
21-
python_files =
22-
test_*.py
23-
*_test.py
24-
tests.py
25-
addopts =
26-
-ra
27-
--strict
28-
--doctest-modules
29-
--doctest-glob=\*.rst
30-
--tb=short
31-
32-
[isort]
33-
force_single_line = True
34-
line_length = 180
35-
known_first_party = compas compas_ifc
36-
default_section = THIRDPARTY
37-
forced_separate = test_compas_ifc
38-
not_skip = __init__.py
39-
skip = migrations

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def read(*names, **kwargs):
3232
description="Package for working with IFC files.",
3333
long_description=long_description,
3434
long_description_content_type="text/markdown",
35-
url="https://github.com/blockresearchgroup/compas_ifc",
35+
url="https://github.com/compas-dev/compas_ifc",
3636
author="tom van mele",
3737
author_email="van.mele@arch.ethz.ch",
3838
license="MIT license",

src/compas_ifc/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
.. toctree::
1010
:maxdepth: 1
1111
12+
compas_ifc.attributes
13+
compas_ifc.entities
14+
compas_ifc.helpers
15+
compas_ifc.model
16+
compas_ifc.representation
17+
compas_ifc.resources
18+
compas_ifc.viewer
1219
1320
"""
1421

0 commit comments

Comments
 (0)